Class: ISBNdb::Api::Publisher
- Inherits:
-
Object
- Object
- ISBNdb::Api::Publisher
- Defined in:
- lib/isbndb/api/publisher.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #batch(query, options = {}) ⇒ Object
- #find(name) ⇒ Object
-
#initialize(client:) ⇒ Publisher
constructor
A new instance of Publisher.
- #search(options = {}) ⇒ Object
Constructor Details
#initialize(client:) ⇒ Publisher
Returns a new instance of Publisher.
6 7 8 |
# File 'lib/isbndb/api/publisher.rb', line 6 def initialize(client:) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/isbndb/api/publisher.rb', line 4 def client @client end |
Instance Method Details
#batch(query, options = {}) ⇒ Object
14 15 16 |
# File 'lib/isbndb/api/publisher.rb', line 14 def batch(query, = {}) @client.request("/publishers/#{query}", ) end |
#find(name) ⇒ Object
10 11 12 |
# File 'lib/isbndb/api/publisher.rb', line 10 def find(name) @client.request("/publisher/#{name}") end |
#search(options = {}) ⇒ Object
18 19 20 |
# File 'lib/isbndb/api/publisher.rb', line 18 def search( = {}) @client.request("/search/publishers/", ) end |