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