Class: Ralexa::Client
- Inherits:
-
Object
- Object
- Ralexa::Client
- Defined in:
- lib/ralexa/client.rb
Instance Attribute Summary collapse
-
#net_http ⇒ Object
writeonly
Dependency injectors.
Instance Method Summary collapse
- #get(host, path, query_values) ⇒ Object
-
#initialize(access_key_id, secret_access_key) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(access_key_id, secret_access_key) ⇒ Client
Returns a new instance of Client.
7 8 9 10 |
# File 'lib/ralexa/client.rb', line 7 def initialize(access_key_id, secret_access_key) @access_key_id = access_key_id @secret_access_key = secret_access_key end |
Instance Attribute Details
#net_http=(value) ⇒ Object
Dependency injectors.
13 14 15 |
# File 'lib/ralexa/client.rb', line 13 def net_http=(value) @net_http = value end |
Instance Method Details
#get(host, path, query_values) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/ralexa/client.rb', line 15 def get(host, path, query_values) uri = signed_uri(host, path, query_values) response = net_http.get_response(uri) response.error! unless response.is_a?(Net::HTTPSuccess) response.body end |