dded a command to load a shelf to a user's wishlist
parent
4a98a96aac
commit
07248f16c8
|
@ -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(),
|
||||
|
|
|
@ -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"]
|
Loading…
Reference in New Issue