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