Class: Buffer::Client
- Inherits:
-
Object
- Object
- Buffer::Client
- Defined in:
- lib/buffer/client.rb
Instance Method Summary collapse
-
#info ⇒ Object
Returns api instance to get auxilary information about Buffer useful when creating your app.
-
#initialize(auth = {}, options = {}) ⇒ Client
constructor
A new instance of Client.
-
#link ⇒ Object
Returns api instance to get information about links shared through Buffer.
-
#profile(id) ⇒ Object
Returns a social media profile api instance.
-
#schedule(id) ⇒ Object
Returns scheduling api instance for social media profile.
-
#update(id) ⇒ Object
Returns a social media update api instance.
-
#user ⇒ Object
Returns authenticated user api instance.
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 = {}, = {}) @http_client = Buffer::HttpClient::HttpClient.new auth, end |
Instance Method Details
#info ⇒ Object
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 |
#link ⇒ Object
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 |