Class: Bcx::Client::OAuth
- Inherits:
-
Rapidash::Client
- Object
- Rapidash::Client
- Bcx::Client::OAuth
- Defined in:
- lib/bcx/client/oauth.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ OAuth
constructor
A new instance of OAuth.
Constructor Details
#initialize(options = {}) ⇒ OAuth
Returns a new instance of OAuth.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bcx/client/oauth.rb', line 23 def initialize( = {}) @account = [:account] || Bcx.configuration.account @api_version = Bcx.configuration.api_version @user_agent = [:user_agent] || Bcx.configuration.user_agent [:site] = "https://basecamp.com/#{@account}/api/#{@api_version}" [:uid] ||= [:client_id] [:secret] ||= [:client_secret] if @user_agent [:request_default_options] ||= {} [:request_default_options][:header] ||= {} [:request_default_options][:header][:user_agent] ||= @user_agent end super() end |