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

feat: #524 - added ingredients analysis tags (vegan, vegetarian, palm oil free) #525

Merged
merged 2 commits into from
Aug 3, 2022

Conversation

monsieurtanuki
Copy link
Contributor

New file:

  • IngredientsAnalysisParameter.dart: Ingredients Analysis search API parameter.

Impacted files:

  • api_searchProducts_test.dart: added tests related to new parameter IngredientsAnalysisParameter
  • IngredientsAnalysisTags.dart: refactored with extension, needed for reusability.

What

  • Now we have a new parameter, in order to restrict ingredients analysis tags
  • E.g. vegan(yes/no/maybe/unknown), vegetarian(yes/no/maybe/unknown), palm oil free (yes/no/maybe/unknown)
  • The parameters can be combined. One test is even checking that if a product is "not vegetarian", then it cannot be (yes/maybe/unknown) for vegan (as it must be "not vegan").

Closes issue

…etarian, palm oil free)

New file:
* `IngredientsAnalysisParameter.dart`: Ingredients Analysis search API parameter.

Impacted files:
* `api_searchProducts_test.dart`: added tests related to new parameter `IngredientsAnalysisParameter`
* `IngredientsAnalysisTags.dart`: refactored with `extension`, neede for reusability.
@monsieurtanuki monsieurtanuki merged commit 645d903 into openfoodfacts:master Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API v2: ingredients_analysis_tags=en:vegan
2 participants