Module: Goodreads::Authors
- Included in:
- Client
- Defined in:
- lib/goodreads/client/authors.rb
Instance Method Summary collapse
-
#author(id, params = {}) ⇒ Object
Get author details.
-
#author_by_name(name, params = {}) ⇒ Object
Search for an author by name.
Instance Method Details
#author(id, params = {}) ⇒ Object
Get author details
5 6 7 8 9 |
# File 'lib/goodreads/client/authors.rb', line 5 def (id, params={}) params[:id] = id data = request('/author/show', params) Hashie::Mash.new(data['author']) end |
#author_by_name(name, params = {}) ⇒ Object
Search for an author by name
13 14 15 16 17 |
# File 'lib/goodreads/client/authors.rb', line 13 def (name, params={}) params[:id] = name data = request('/api/author_url', params) Hashie::Mash.new(data['author']) end |