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 collapse
- URL =
'https://api.bufferapp.com/1/'.freeze
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
- #connection ⇒ 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
Returns a new instance of Client.
14 15 16 |
# File 'lib/buffer/client.rb', line 14 def initialize(access_token) @access_token = access_token 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
25 26 27 |
# File 'lib/buffer/client.rb', line 25 def auth_query { access_token: @access_token } end |
#connection ⇒ Object
18 19 20 21 22 23 |
# File 'lib/buffer/client.rb', line 18 def connection @connection ||= Faraday.new(url: URL) do |faraday| faraday.request :url_encoded faraday.adapter Faraday.default_adapter end end |