Class: ConsolidatedScreeningList::Client
- Inherits:
-
Object
- Object
- ConsolidatedScreeningList::Client
- Defined in:
- lib/consolidated_screening_list/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #search(params = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
11 12 13 |
# File 'lib/consolidated_screening_list/client.rb', line 11 def initialize( = {}) @api_key = [:api_key] || ENV["TRADE_API_KEY"] end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
9 10 11 |
# File 'lib/consolidated_screening_list/client.rb', line 9 def api_key @api_key end |
Class Method Details
.search(options = {}) ⇒ Object
4 5 6 |
# File 'lib/consolidated_screening_list/client.rb', line 4 def search( = {}) Client.new.search() end |
Instance Method Details
#search(params = {}) ⇒ Object
15 16 17 |
# File 'lib/consolidated_screening_list/client.rb', line 15 def search(params = {}) parse_response Query.new(params, api_key).call end |