Class: ProsperWorks::Client
- Inherits:
-
Object
- Object
- ProsperWorks::Client
- Extended by:
- Forwardable
- Defined in:
- lib/prosperworks/client.rb
Constant Summary collapse
- API_VERSION_NUMBER =
1
Instance Method Summary collapse
- #base_url ⇒ Object
- #configuration ⇒ Object
- #configure {|configuration| ... } ⇒ Object
- #headers ⇒ Object
Instance Method Details
#base_url ⇒ Object
16 17 18 |
# File 'lib/prosperworks/client.rb', line 16 def base_url "https://api.prosperworks.com/developer_api/v#{API_VERSION_NUMBER}/" end |
#configuration ⇒ Object
24 25 26 |
# File 'lib/prosperworks/client.rb', line 24 def configuration @configuration ||= Configuration.new end |
#configure {|configuration| ... } ⇒ Object
20 21 22 |
# File 'lib/prosperworks/client.rb', line 20 def configure yield configuration if block_given? end |
#headers ⇒ Object
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 |