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: #526 - new AllergensParameter search filter #527

Merged
merged 5 commits into from
Aug 3, 2022

Conversation

monsieurtanuki
Copy link
Contributor

New file:

  • AllergensParameter.dart: List of allergens to filter in and out. Filter combo mode is 'AND'.

Impacted files:

  • Allergens.dart: added AllergensTag for the 14 main allergens.
  • api_searchProducts_test.dart: added a group and 5 tests around the new AllergensParameter API parameter.

What

  • New class AllergensParameter for the search API.
  • With that we can restrict to products with and/or without allergens among the 14 main allergens.

Closes issue

New file:
* `AllergensParameter.dart`: List of allergens to filter in and out. Filter combo mode is 'AND'.

Impacted files:
* `Allergens.dart`: added `AllergensTag` for the 14 main allergens.
* `api_searchProducts_test.dart`: added a group and 5 tests around the new `AllergensParameter` API parameter.
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner July 23, 2022 07:28
@monsieurtanuki monsieurtanuki linked an issue Jul 23, 2022 that may be closed by this pull request
import 'package:openfoodfacts/interface/Parameter.dart';
import 'package:openfoodfacts/model/Allergens.dart';

/// List of allergens to filter in and out. Filter combo mode is 'AND'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this comment a bit more explainatory

@monsieurtanuki monsieurtanuki merged commit 3872351 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: allergens_tags:=-en:gluten
3 participants