Class: TimesBooks::Client
- Inherits:
-
Object
- Object
- TimesBooks::Client
- Defined in:
- lib/times_books/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from List
#getListByName, #getLists, #getListsByDate, #searchLists, #searchReviews
Methods included from Request
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 11 |
# File 'lib/times_books/client.rb', line 8 def initialize( = {}) fail(ArgumentError, "Options hash required.") unless .is_a?(Hash) @api_key = [:api_key] || TimesBooks.configuration[:api_key] end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/times_books/client.rb', line 6 def api_key @api_key end |