Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Fix user.reviews and shelf.name #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion goodreads/shelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __repr__(self):

@property
def name(self):
return self._shelf_dict['@name']
return self._shelf_dict['name']

@property
def count(self):
Expand Down
2 changes: 1 addition & 1 deletion goodreads/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def owned_books(self, page=1):

def reviews(self, page=1):
"""Get all books and reviews on user's shelves"""
resp = self._client.session.get("/review/list.xml",
resp = self._client.request("/review/list.xml",
{'v': 2, 'id': self.gid, 'page': page})
return [review.GoodreadsReview(r) for r in resp['reviews']['review']]

Expand Down
6 changes: 6 additions & 0 deletions tests/review_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ def test_review(self):
review = self.client.review('2')
eq_(review.gid, '2')
pass

def test_reviews(self):
# me = self.client.auth_user()
me = self.client.user(3132795)
reviews = me.reviews(page=1)
# eq_(review.gid, '2')