Class: Harvest::OAuthCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/harvest/credentials.rb

Instance Method Summary collapse

Constructor Details

#initialize(access_token) ⇒ OAuthCredentials

Returns a new instance of OAuthCredentials


24
25
26
# File 'lib/harvest/credentials.rb', line 24

def initialize(access_token)
  @access_token = access_token
end

Instance Method Details

#hostObject


33
34
35
# File 'lib/harvest/credentials.rb', line 33

def host
  "https://api.harvestapp.com"
end

#set_authentication(request_options) ⇒ Object


28
29
30
31
# File 'lib/harvest/credentials.rb', line 28

def set_authentication(request_options)
  request_options[:query] ||= {}
  request_options[:query]["access_token"] = @access_token
end