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

Remove nutrient hardcoding (nutrition table/edit mode) using new API #2357

Open
Tracked by #4170
teolemon opened this issue Mar 4, 2019 · 5 comments
Open
Tracked by #4170

Comments

@teolemon
Copy link
Member

teolemon commented Mar 4, 2019

The API is now available to use: https://fr.openfoodfacts.org/cgi/nutrients.pl

nutritiontable
https://world.openfoodfacts.org/product/1/pot-au-feu-golden-viginia

@teolemon
Copy link
Member Author

teolemon commented Mar 4, 2019

Currently the nutrient list is harcoded in

However, we have a Taxonomy of nutrients we can refresh.
https://static.openfoodfacts.org/data/taxonomies/nutrients.json

@VaiTon
Copy link
Member

VaiTon commented Jun 7, 2019

Also it doesn't show fields like Polyols

@VaiTon
Copy link
Member

VaiTon commented Jun 7, 2019

Currently the nutrient list is harcoded in

However, we have a Taxonomy of nutrients we can refresh.
https://static.openfoodfacts.org/data/taxonomies/nutrients.json

How could we get relations between them? (I'm thinking of minerals, vitamins, etc...) @teolemon

@VaiTon
Copy link
Member

VaiTon commented Jun 7, 2019

Also, if we create a map at runtime, we should change all occurrences like this

if (Nutriments.ENERGY.equals(nutrientShortName)) 

@teolemon
Copy link
Member Author

teolemon commented May 9, 2020

The API is now available to use: https://fr.openfoodfacts.org/cgi/nutrients.pl

@teolemon teolemon changed the title Extreme nutrition tables are not fully displayed Remove nutrient hardcoding in the nutrition table and in the edit mode May 9, 2020
@teolemon teolemon added the P1 label May 15, 2020
@teolemon teolemon changed the title Remove nutrient hardcoding in the nutrition table and in the edit mode Remove nutrient hardcoding (nutrition table/edit mode) using new API Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants