Class: Buffer::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/buffer/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(auth = {}, options = {}) ⇒ Client

Returns a new instance of Client.



15
16
17
# File 'lib/buffer/client.rb', line 15

def initialize(auth = {}, options = {})
  @http_client = Buffer::HttpClient::HttpClient.new auth, options
end

Instance Method Details

#infoObject

Returns api instance to get auxilary information about Buffer useful when creating your app.



21
22
23
# File 'lib/buffer/client.rb', line 21

def info()
  Buffer::Api::Info.new @http_client
end

Returns api instance to get information about links shared through Buffer.



33
34
35
# File 'lib/buffer/client.rb', line 33

def link()
  Buffer::Api::Link.new @http_client
end

#profile(id) ⇒ Object

Returns a social media profile api instance.

id - Identifier of a social media profile



40
41
42
# File 'lib/buffer/client.rb', line 40

def profile(id)
  Buffer::Api::Profile.new id, @http_client
end

#schedule(id) ⇒ Object

Returns scheduling api instance for social media profile.

id - Identifier of a social media profile



47
48
49
# File 'lib/buffer/client.rb', line 47

def schedule(id)
  Buffer::Api::Schedule.new id, @http_client
end

#update(id) ⇒ Object

Returns a social media update api instance.

id - Identifier of a social media update



54
55
56
# File 'lib/buffer/client.rb', line 54

def update(id)
  Buffer::Api::Update.new id, @http_client
end

#userObject

Returns authenticated user api instance.



27
28
29
# File 'lib/buffer/client.rb', line 27

def user()
  Buffer::Api::User.new @http_client
end