silverstripe / addons.silverstripe.org

Website hosting Silverstripe Framework extensions
BSD 3-Clause "New" or "Revised" License
13 stars 16 forks source link

Addon ratings endpoint should be more RESTful #203

Open ScopeyNZ opened 6 years ago

ScopeyNZ commented 6 years ago

Currently we have two ratings endpoints, api/rating[/vendor/module] for individual addons and api/ratings for bulk queries of ratings for addons. This can be quite confusing as there's only an "s" that is different. As "rating" is a metric for addons, the individual endpoint could be something like api/addon/vendor/module/rating. This would be intuitive if we extend the api to have endpoints like:

This would mean deprecating the rating endpoint, which is not used by any other module I know of (yet).

robbieaverill commented 6 years ago

I'd actually love to be exposing this with GraphQL instead once this site is upgraded to use SilverStripe 4, but if you wanted to do this in the meantime I guess that'd be OK =) just ensure the old ones still work since we've already baked them into things like bringyourownideas/silverstripe-maintenance

dhensby commented 6 years ago

A 301 redirect would work, right?