Method: Freelancer::Client#initialize

Defined in:
lib/freelancer/client.rb

#initialize(consumer_token, consumer_secret, consumer_options = {}) ⇒ Client

Initialize a new Freelancer API client



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/freelancer/client.rb', line 21

def initialize(consumer_token, consumer_secret, consumer_options = {})
  
  default_options = {
    :request_token_path => "/RequestRequestToken/requestRequestToken.xml",
    :authorize_url => "http://www.sandbox.freelancer.com/users/api-token/auth.php",
    :access_token_path => "/RequestAccessToken/requestAccessToken.xml",
    :scheme => :query_string,
    :http_method => :get
  }
  
  @consumer_token, @consumer_secret, @consumer_options = consumer_token, consumer_secret, consumer_options.merge(default_options)
  @api_endpoint = "http://api.sandbox.freelancer.com"

end