Code review comment for lp:~paulliu/unity-scope-click/showratings

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Hi Rodney, let me know if you'd rather a call, but RE the points below:

On Thu, Jan 9, 2014 at 3:22 PM, Rodney Dawes <email address hidden> wrote:
> The framework is needed because the reviews API requires distroseries. It's required because the API is for some reason a URL path, and not a POST request to an endpoint, with some JSON to describe what we want.

The request for reviews filtered by a package is a GET request to a
URL. The request for creating a new review is a POST to an endpoint
(/api/1.0/reviews/) with some JSON to describe what you want.

And yep, creating a new review requires a distroseries because it was
created for USC. We could use distroseries="click" which would enable
the server to differentiate the reviews easily (distroseries is
already indexed), or we could also quite easily create a separate
resource for click apps which doesn't have these hacks (origin and
distroseries), but this started as a way to re-use what we already
had.

>
> Using the framework for the distroseries makes sense to me, but we can just as well use "saucy" or "trusty" or whatever the Ubuntu distroseries is, if we have that information on the device. I don't know how the reviews system on Android works or not. But it doesn't really matter, because we're not using their system. We're stuck with using the weird API we have, which requires a distroseries. The way software-center was written, was to get reviews for the "previous" series, if the current series results were empty. That should really be handled on the server side, and we really should have a proper API, but it's not.
>

If it's worth creating a separate API for click (with separate specs
from what we already do for USC), then let's do that. If we want to
re-use what we've already got for USC, let's do that. That decision
isn't my call, but I do want to be able to support you whichever way
that decision goes.

« Back to merge proposal