Module: Goodreads
- Includes:
- HTTParty
- Defined in:
- lib/goodreads.rb
Defined Under Namespace
Classes: Review
Constant Summary collapse
- @@user_id =
@defaults[:user_id]
Class Method Summary collapse
-
.reviews(opts = {}) ⇒ Object
page: 1 per_page: 1-200 shelf: read, currently-reading, to-read, etc key: Needed for private profiles.
Class Method Details
.reviews(opts = {}) ⇒ Object
page: 1 per_page: 1-200 shelf: read, currently-reading, to-read, etc key: Needed for private profiles. Different from developer key, and is unique to each member. Obtained from the member’s rss link on the “my books page” or the lookup via email method. order: a, d sort: position, votes, rating, shelves, avg_rating, isbn, comments, author, title, notes, cover, review, random, date_read, year_pub, date_added, num_ratings, date_updated
20 21 22 23 24 25 26 27 28 |
# File 'lib/goodreads.rb', line 20 def self.reviews(opts={}) defaults = {:page => 1, :per_page => 10, :shelf => 'read', :sort => 'date_read', :order => 'd'} opts = defaults.merge(opts) user_id = opts[:user_id] || @@user_id opts.delete(:user_id) result = self.get("/review/list_rss/#{user_id}", :query => opts) result["rss"]["channel"]["item"].map { |data| Goodreads::Review.new(data) } # now...what to do with these... end |