Class: RestBooks::Lists
Constant Summary
Constants included from Api
Api::AUTHOR_PARAMETERS, Api::BOOK_PARAMETERS, Api::LIST_PARAMETERS, Api::ORDERED_AUTHOR_PARAMETERS, Api::ORDERED_BOOK_PARAMETERS, Api::RANGED_AUTHOR_PARAMETERS, Api::RANGED_BOOK_PARAMETERS
Instance Method Summary collapse
-
#all(options = {}) ⇒ Object
Endpoint: /lists Formats: Atom Description: View the lists, use pagination Parameters: * favorites: normally, only the lists with at least 2 favorites are displayed.
-
#books(list_id, options = {}) ⇒ Object
Endpoint: /list/:id Formats: Atom Description: View the books on the lists, use pagination.
Instance Method Details
#all(options = {}) ⇒ Object
Endpoint: /lists
Formats: Atom
Description: View the lists, use pagination
Parameters:
* favorites: normally, only the lists with at least 2 favorites are displayed. You can change the minimum value using this parameter.
* order: normally based on the number of favorites, use comments to order them by most discussed lists
34 35 36 37 |
# File 'lib/restbooks/lists.rb', line 34 def all( ={} ) create_url( "/lists", , LIST_PARAMETERS ) return do_request( :list ) end |
#books(list_id, options = {}) ⇒ Object
Endpoint: /list/:id
Formats: Atom
Description: View the books on the lists, use pagination
42 43 44 45 46 |
# File 'lib/restbooks/lists.rb', line 42 def books( list_id, ={} ) list_id = list_id.id if list_id.kind_of? RestBooks::Models::List create_url( "/list/#{list_id}", , LIST_PARAMETERS ) return do_request( :book ) end |