dded a command to load a shelf to a user's wishlist

pull/1/head
Raymond Yee 2011-10-26 09:49:54 -07:00
parent 4a98a96aac
commit 07248f16c8
2 changed files with 2 additions and 1 deletions

View File

@ -161,6 +161,7 @@ class GoodreadsClient(object):
for review in reviews:
yield ({'id':review.find('id').text,
'book': {'id': review.find('book/id').text.strip(),
'isbn10':review.find('book/isbn').text,
'isbn13':review.find('book/isbn13').text,
'title':review.find('book/title').text.strip(),
'text_reviews_count':review.find('book/text_reviews_count').text.strip(),

View File

@ -11,4 +11,4 @@ class Command(BaseCommand):
max_books = int(max_books)
gc = GoodreadsClient(key=settings.GOODREADS_API_KEY, secret=settings.GOODREADS_API_SECRET)
for (i, review) in enumerate(islice(gc.review_list(user_id,shelf=shelf_name),max_books)):
print i, review["book"]["title"], review["book"]["small_image_url"]
print i, review["book"]["title"], review["book"]["isbn10"], review["book"]["small_image_url"]