Class: Buffer::Client

Inherits:
Object
  • Object
show all
Includes:
Core, Info, Link, Profile, Update, User
Defined in:
lib/buffer/user.rb,
lib/buffer/info.rb,
lib/buffer/core.rb,
lib/buffer/link.rb,
lib/buffer/update.rb,
lib/buffer/client.rb,
lib/buffer/profile.rb

Defined Under Namespace

Modules: Core, Info, Link, Profile, Update, User

Constant Summary

Constants included from Core

Core::API_VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Info

#info

Methods included from Link

#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

#user_info

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_tokenObject

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_queryObject


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

def auth_query
  { access_token: @access_token }
end