Currently rnrclient.get_reviews() allows filtering by language, origin and distroseries, but not version.
According to the mockup at https://wiki.ubuntu.com/SoftwareCenter/RatingsAndReviews#Presenting%20reviews we need to filter or sort by version.
Notes to QA:
Using *the latest* rnrclient.py you should be able to test this by using just the public part of the api. First ensure that there's a reasonable spread of reviews for a certain package/app on the vps, then use a Python snippet like the following:
>>> from rnrclient import RatingsAndReviewsAPI
>>> api_public = RatingsAndReviewsAPI('http://....../reviews/api/1.0')
>>> api_public.get_reviews(language='en', origin='ubuntu', distroseries='maverick', version='1.2.3', packagename='foobar', appname='baz')
All arguments here except packagname are optional. Omitting language, origin, distroseries or version will fetch reviews for any value of that parameter, and omitting appname will fetch reviews for the package itself.
In fact, the above mockup leaves me wondering whether we should be filtering by distroseries for this api request at all? If we instead returned all the reviews sorted by (1) version and then (2) rating/helpfulness factor, then the distroseries might just be another attribute of the review detail like this:
Reviews of this version (1.3)
1) 5 stars
This was excellent - blah blah.
OS: Ubuntu 10.10
2) 4 stars
This was ok - blah blah.
OS: Ubuntu 10.04
Reviews of version 1.2:
1) .....
I can't see anything yet on the spec about this situation.