-
-
Notifications
You must be signed in to change notification settings - Fork 14
Allow filtering by store #369
Comments
Hi @teolemon I would like to work on this filter issue. Could you give some more description? |
Hi. I have one question in general about Hunger games, not particularly about this issue. If I have understood Hunger games correctly almost all the functionality is done by API. Is there anywhere we use the database, I understand that Open Food Facts uses MongoDB for the backend. I wanted to understand when we use API and when do we use the database? Or do we use only API? |
Also, is there documentation to understand the APIs better? |
Hi @teolemon Since I was working with robotoff APIs earlier, I have an idea of how to proceed.
What did you mean by not supported by API? I cannot continue with the task? |
To answer your first question, hungergame is a vueJS app so it runs fully on client-side. Then the only way to access data from servers is the API. About your second question, in this game robotoff is the API we call the get a list of questions. For now, this API does not allows to get only question about products in a given store The parameters you can pass in the API request are here: And
|
This means, that we want to sort by So I need to write a function in JavaScript to sort by
In the API response, I didn't find the store names? |
Hey @alexfauquette Do I get the store list from this API here? https://world.openfoodfacts.org/stores.json |
I was going through the code, the data in the
I can filter data in I have understood the problem. The thing is I am not able to figure out where to get the |
As said previously, the API is not ready and without it, you can not solve this issue. Either you like python and add filtering by the store on robotoff API, or you just wait for it to be added by the team. I do not know any other solutions. Stores are accessible in openfoodfact API, questions are from robotoff API. And trying to make a join between two APIs is clearly a bad idea |
What
Mockup
Part of
The text was updated successfully, but these errors were encountered: