Class: Bcx::Client::OAuth

Inherits:
Rapidash::Client
  • Object
show all
Defined in:
lib/bcx/client/oauth.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ OAuth

Returns a new instance of OAuth.



23
24
25
26
27
28
29
30
31
32
# File 'lib/bcx/client/oauth.rb', line 23

def initialize(options = {})
  @account = options[:account] || Bcx.configuration.
  @api_version = Bcx.configuration.api_version

  options[:site] = "https://basecamp.com/#{@account}/api/#{@api_version}"
  options[:uid] ||= options[:client_id]
  options[:secret] ||= options[:client_secret]

  super(options)
end