Class: Harvest::OAuthCredentials
- Inherits:
-
Object
- Object
- Harvest::OAuthCredentials
- Defined in:
- lib/harvest/credentials.rb
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(access_token: nil, client_id: nil) ⇒ OAuthCredentials
constructor
A new instance of OAuthCredentials.
- #set_authentication(request_options) ⇒ Object
Constructor Details
#initialize(access_token: nil, client_id: nil) ⇒ OAuthCredentials
Returns a new instance of OAuthCredentials.
20 21 22 23 |
# File 'lib/harvest/credentials.rb', line 20 def initialize(access_token: nil, client_id: nil) @access_token = access_token @client_id = client_id end |
Instance Method Details
#host ⇒ Object
30 31 32 |
# File 'lib/harvest/credentials.rb', line 30 def host 'https://api.harvestapp.com/v2' end |
#set_authentication(request_options) ⇒ Object
25 26 27 28 |
# File 'lib/harvest/credentials.rb', line 25 def set_authentication() [:query] ||= {} [:query]["access_token"] = @access_token end |