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: #531 - new StatesTagsParameter search filter #532

Merged
merged 3 commits into from
Aug 3, 2022

Conversation

monsieurtanuki
Copy link
Contributor

New files:

  • State.dart: States of a Product. To be used in search API, with StatesTagsParameter.
  • StatesTagsParameter.dart: States Tags as completed or to-be-completed. Filter combo mode is 'AND'.

Impacted file:

  • api_searchProducts_test.dart: added a group of tests around the new parameter StatesTagsParameter

What

  • New StatesTagsParameter search filter.
  • Based on new State enum, that lists the possible states. For each state, you'll have to say if it's completed or to-be-completed.

Closes issue

New files:
* `State.dart`: States of a `Product`. To be used in search API, with `StatesTagsParameter`.
* `StatesTagsParameter.dart`: States Tags as completed or to-be-completed. Filter combo mode is 'AND'.

Impacted file:
* `api_searchProducts_test.dart`: added a group of tests around the new parameter `StatesTagsParameter`
import 'package:openfoodfacts/interface/Parameter.dart';
import 'package:openfoodfacts/model/State.dart';

/// States Tags as completed or to-be-completed. 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.

Again, can't tell what a "Filter combo mode" is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@M123-dev Fair enough; I've changed the comment.

@monsieurtanuki monsieurtanuki merged commit 0fcd95d 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: states_tags=en:origins-completed,en:packaging-to-be-completed
2 participants