Class: Poms::Api::Request
- Inherits:
-
Object
- Object
- Poms::Api::Request
- Defined in:
- lib/poms/api/request.rb
Overview
A request to the Poms API. Does the authentication and allows you to execute the request.
Instance Method Summary collapse
-
#call ⇒ Object
Executes the request.
-
#initialize(uri, key, secret, origin) ⇒ Request
constructor
Create a new request to the Poms API.
Constructor Details
#initialize(uri, key, secret, origin) ⇒ Request
Create a new request to the Poms API. The request is initialized with a URI to be called and the key, secret and origin that are needed for authentication.
16 17 18 19 20 21 22 |
# File 'lib/poms/api/request.rb', line 16 def initialize(uri, key, secret, origin) @uri = uri @path = URI(@uri).path @key = key @secret = secret @origin = origin end |
Instance Method Details
#call ⇒ Object
Executes the request.
25 26 27 |
# File 'lib/poms/api/request.rb', line 25 def call open(@uri, headers) end |