Class: ProsperWorks::Client

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/prosperworks/client.rb

Constant Summary collapse

API_VERSION_NUMBER =
1

Instance Method Summary collapse

Instance Method Details

#base_urlObject



16
17
18
# File 'lib/prosperworks/client.rb', line 16

def base_url
  "https://api.prosperworks.com/developer_api/v#{API_VERSION_NUMBER}/"
end

#configurationObject



24
25
26
# File 'lib/prosperworks/client.rb', line 24

def configuration
  @configuration ||= Configuration.new
end

#configure {|configuration| ... } ⇒ Object

Yields:



20
21
22
# File 'lib/prosperworks/client.rb', line 20

def configure
  yield configuration if block_given?
end

#headersObject



7
8
9
10
11
12
13
14
# File 'lib/prosperworks/client.rb', line 7

def headers
  {
    "Content-Type" => "application/json",
    "X-PW-Application" => "developer_api",
    "X-PW-UserEmail" => configuration.user_email,
    "X-PW-AccessToken" => configuration.access_token
  }
end