Class: Buffer::Client
- Inherits:
-
Object
- Object
- Buffer::Client
- Defined in:
- lib/buffer/core.rb,
lib/buffer/info.rb,
lib/buffer/link.rb,
lib/buffer/user.rb,
lib/buffer/client.rb,
lib/buffer/update.rb,
lib/buffer/profile.rb
Defined Under Namespace
Modules: Core, Info, Link, Profile, Update, User
Constant Summary
Constants included from Core
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
Instance Method Summary collapse
- #auth_query ⇒ Object
-
#initialize(access_token) ⇒ Client
constructor
A new instance of Client.
Methods included from Info
Methods included from Link
Methods included from Update
#check_id, #create_update, #destroy_update, #interactions_by_update_id, #modify_update_text, #reorder_updates, #share_update, #shuffle_updates, #update_by_id, #updates_by_profile_id
Methods included from Profile
#profile_by_id, #profiles, #schedules_by_profile_id, #set_schedules
Methods included from User
Constructor Details
#initialize(access_token) ⇒ Client
12 13 14 15 16 17 18 19 |
# File 'lib/buffer/client.rb', line 12 def initialize(access_token) @access_token = access_token url = "https://api.bufferapp.com/1/" @connection = Faraday.new(url: url) do |faraday| faraday.request :url_encoded faraday.adapter Faraday.default_adapter end end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
10 11 12 |
# File 'lib/buffer/client.rb', line 10 def access_token @access_token end |
Instance Method Details
#auth_query ⇒ Object
21 22 23 |
# File 'lib/buffer/client.rb', line 21 def auth_query { access_token: @access_token } end |