Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose rating counts grouped by star in API #4678

Closed
kumar303 opened this issue Aug 17, 2017 · 2 comments
Closed

Expose rating counts grouped by star in API #4678

kumar303 opened this issue Aug 17, 2017 · 2 comments
Labels
component:api repository:addons-server Issue relating to addons-server

Comments

@kumar303
Copy link
Contributor

The API (maybe add-on detail API?) needs to expose rating counts grouped by stars. It could look something like this (just an idea):

{
  "slug": "some-addon",
  "ratings": {
    "count": 1913,
    "count_per_star": {
      "5": 1478,
      "4": 237,
      "3": 95,
      "2": 41,
      "1": 62,
    }
  }
}

Here is how we will be rendering it in the UI:

screenshot 2017-08-17 17 03 44

@diox
Copy link
Member

diox commented Aug 18, 2017

The reviews API already has a show_grouped_ratings parameter for this : http://addons-server.readthedocs.io/en/latest/topics/api/reviews.html

Is that enough for you ? It's not ideal for perf to have this in the add-on detail API.

@kumar303
Copy link
Contributor Author

Oh! I somehow totally forgot about that one. Thanks, I'll try it with that and see if I run into any issues.

@KevinMind KevinMind transferred this issue from mozilla/addons-server May 4, 2024
@KevinMind KevinMind added repository:addons-server Issue relating to addons-server migration:2024 labels May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api repository:addons-server Issue relating to addons-server
Projects
None yet
Development

No branches or pull requests

4 participants