Class: Buff::Client
- Inherits:
-
Object
- Object
- Buff::Client
- Defined in:
- lib/buff.rb,
lib/buff/core.rb,
lib/buff/link.rb,
lib/buff/user.rb,
lib/buff/update.rb,
lib/buff/profile.rb
Defined Under Namespace
Modules: Core, Link, Profile, Update, User
Constant Summary
Constants included from Core
Core::API_VERSION, Core::ERROR_TABLE
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#auth_query ⇒ Object
Returns the value of attribute auth_query.
Attributes included from Core
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(access_token) ⇒ Client
constructor
A new instance of Client.
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, #profile_schedules_by_id, #profiles, #set_schedules
Methods included from User
Methods included from Core
#basic_request, error_table, #get, #handle_response_code, #interpret_response, #post
Constructor Details
#initialize(access_token) ⇒ Client
Returns a new instance of Client.
54 55 56 57 58 59 60 |
# File 'lib/buff.rb', line 54 def initialize(access_token) @access_token = access_token @conn = Faraday.new(:url => "https://api.bufferapp.com/1/") do |faraday| faraday.request :url_encoded # form-encode POST params faraday.adapter Faraday.default_adapter # make requests with Net::HTTP end end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
52 53 54 |
# File 'lib/buff.rb', line 52 def access_token @access_token end |
#auth_query ⇒ Object
Returns the value of attribute auth_query.
52 53 54 |
# File 'lib/buff.rb', line 52 def auth_query @auth_query end |