Class: Medlink::Client
- Inherits:
-
Object
- Object
- Medlink::Client
- Defined in:
- lib/medlink/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #get(url, params = {}) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
4 5 6 |
# File 'lib/medlink/client.rb', line 4 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
8 9 10 |
# File 'lib/medlink/client.rb', line 8 def api_key @api_key end |
Instance Method Details
#get(url, params = {}) ⇒ Object
10 11 12 13 |
# File 'lib/medlink/client.rb', line 10 def get(url, params = {}) params[:api_key] = api_key client.get(api_url(url), params) end |