New commit (r189) with slight change to test case for rnrclient because I realised when testing my changes in the client that we should return a ReviewDetails object instead of json, for consistency. Therefore, diff for the rnrclient branch is now:
=== modified file 'rnrclient.py' --- rnrclient.py 2011-05-06 06:35:36 +0000 +++ rnrclient.py 2011-05-28 12:06:31 +0000 @@ -174,3 +174,14 @@ """Delete a review""" return self._post('/reviews/delete/%s/' % review_id, data={}, scheme=AUTHENTICATED_API_SCHEME) + + @validate('review_id', int) + @validate('rating', int) + @validate_pattern('summary', r'[^\n]+') + @validate_pattern('review_text', r'[^\n]+') + @returns(ReviewDetails) + def modify_review(self, review_id, rating, summary, review_text): + """Modify an existing review""" + data = {'rating':rating, 'summary':summary, 'review_text':review_text} + return self._put('/reviews/modify/%s/' % review_id, data=data, + scheme=AUTHENTICATED_API_SCHEME)
« Back to merge proposal
New commit (r189) with slight change to test case for rnrclient because I realised when testing my changes in the client that we should return a ReviewDetails object instead of json, for consistency.
Therefore, diff for the rnrclient branch is now:
=== modified file 'rnrclient.py' '/reviews/ delete/ %s/' % review_id, data={},
scheme= AUTHENTICATED_ API_SCHEME) 'review_ id', int) pattern( 'summary' , r'[^\n]+') pattern( 'review_ text', r'[^\n]+') ReviewDetails) text':review_ text} '/reviews/ modify/ %s/' % review_id, data=data, AUTHENTICATED_ API_SCHEME)
--- rnrclient.py 2011-05-06 06:35:36 +0000
+++ rnrclient.py 2011-05-28 12:06:31 +0000
@@ -174,3 +174,14 @@
"""Delete a review"""
return self._post(
+
+ @validate(
+ @validate('rating', int)
+ @validate_
+ @validate_
+ @returns(
+ def modify_review(self, review_id, rating, summary, review_text):
+ """Modify an existing review"""
+ data = {'rating':rating, 'summary':summary, 'review_
+ return self._put(
+ scheme=