Class: Readernaut
Class Method Summary collapse
- .books(username, options = {}) ⇒ Object
- .books_abandoned(username, options = {}) ⇒ Object
- .books_finished(username, options = {}) ⇒ Object
- .books_plan_to_read(username, options = {}) ⇒ Object
- .books_reading(username, options = {}) ⇒ Object
- .books_reference(username, options = {}) ⇒ Object
- .books_wishlist(username, options = {}) ⇒ Object
- .contacts(username, options = {}) ⇒ Object
- .notes(username, options = {}) ⇒ Object
Class Method Details
.books(username, options = {}) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/readernaut.rb', line 14 def self.books(username, ={}) path = "/#{username}/books/" list = .delete(:list) path += "#{list}/" unless list.blank? Mash.new self.get(path, :query => ) end |
.books_abandoned(username, options = {}) ⇒ Object
46 47 48 49 |
# File 'lib/readernaut.rb', line 46 def self.books_abandoned(username, ={}) opts = .merge({:list => 'abandoned'}) self.books(username, opts) end |
.books_finished(username, options = {}) ⇒ Object
21 22 23 24 |
# File 'lib/readernaut.rb', line 21 def self.books_finished(username, ={}) opts = .merge({:list => 'finished'}) self.books(username, opts) end |
.books_plan_to_read(username, options = {}) ⇒ Object
31 32 33 34 |
# File 'lib/readernaut.rb', line 31 def self.books_plan_to_read(username, ={}) opts = .merge({:list => 'plan-to-read'}) self.books(username, opts) end |
.books_reading(username, options = {}) ⇒ Object
26 27 28 29 |
# File 'lib/readernaut.rb', line 26 def self.books_reading(username, ={}) opts = .merge({:list => 'reading'}) self.books(username, opts) end |
.books_reference(username, options = {}) ⇒ Object
36 37 38 39 |
# File 'lib/readernaut.rb', line 36 def self.books_reference(username, ={}) opts = .merge({:list => 'reference'}) self.books(username, opts) end |
.books_wishlist(username, options = {}) ⇒ Object
41 42 43 44 |
# File 'lib/readernaut.rb', line 41 def self.books_wishlist(username, ={}) opts = .merge({:list => 'wishlist'}) self.books(username, opts) end |
.contacts(username, options = {}) ⇒ Object
55 56 57 |
# File 'lib/readernaut.rb', line 55 def self.contacts(username, ={}) Mash.new self.get("/#{username}/contacts/", :query => ) end |
.notes(username, options = {}) ⇒ Object
51 52 53 |
# File 'lib/readernaut.rb', line 51 def self.notes(username, ={}) Mash.new self.get("/#{username}/notes/", :query => ) end |