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

Use parameters countries= when fetching insights #1001

Closed
raphael0202 opened this issue Jul 19, 2024 · 0 comments · Fixed by #1002
Closed

Use parameters countries= when fetching insights #1001

raphael0202 opened this issue Jul 19, 2024 · 0 comments · Fixed by #1002
Labels
🐛 Bug Something isn't working filters insights 🎯 P0 question Further information is requested

Comments

@raphael0202
Copy link
Contributor

raphael0202 commented Jul 19, 2024

Country filtering does not work any longer (ex: https://hunger.openfoodfacts.org/questions?type=label&country=en%3Afrance), because country= parameter is not working any longer for the following endpoints:

  • /questions/random
  • /questions/popular
  • /questions/unanswered
  • /questions
  • /insights/random
  • /insights
    The countries parameter should be used instead with a two-letter code (it accepts several countries).
    I thought I had created an issue on Hunger Games, but I obviously didn't, sorry for that!

And by the way, /questions/random and /questions/popular are deprecated in favor of /questions?order_by={random,popularity}:
https://openfoodfacts.github.io/robotoff/references/api/#tag/Questions/paths/~1questions/get

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working filters insights 🎯 P0 question Further information is requested
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants