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: new "Barcodes" parameter; deprecated configurations #538

Merged
merged 3 commits into from
Aug 4, 2022

Conversation

monsieurtanuki
Copy link
Contributor

New files:

  • Barcodes.dart: "Barcodes" search API parameter.
  • BoolMapParameter.dart: Abstract map of bool as Parameter.

Impacted files:

  • AllergensParameter.dart: refactored as BoolMapParameter<AllergensTag>
  • api_getToBeCompletedProducts_test.dart: minor refactoring around a deprecated class
  • api_matchedProductV2_test.dart: minor refactoring around a deprecated class
  • api_searchProducts_test.dart: fixed test duration; refactoring
  • openfoodfacts.dart: minor refactoring around a deprecated class
  • ProductListQueryConfiguration.dart: deprecated
  • StatesTagsParameter.dart: refactored as BoolMapParameter<State>
  • ToBeCompletedConfiguration.dart: deprecated

What

  • New Barcodes search parameter
  • Deprecated both ToBeCompletedConfiguration and ProductListQueryConfiguration in favor of ProductSearchQueryConfiguration with adapted parameters.
  • Refactored AllergensParameter and StatesTagsParameter around the new BoolMapParameter

New files:
* `Barcodes.dart`: "Barcodes" search API parameter.
* `BoolMapParameter.dart`: Abstract map of `bool` as `Parameter`.

Impacted files:
* `AllergensParameter.dart`: refactored as `BoolMapParameter<AllergensTag>`
* `api_getToBeCompletedProducts_test.dart`: minor refactoring around a deprecated class
* `api_matchedProductV2_test.dart`: minor refactoring around a deprecated class
* `api_searchProducts_test.dart`: fixed test duration; refactoring
* `openfoodfacts.dart`: minor refactoring around a deprecated class
* `ProductListQueryConfiguration.dart`: deprecated
* `StatesTagsParameter.dart`: refactored as `BoolMapParameter<State>`
* `ToBeCompletedConfiguration.dart`: deprecated
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner August 3, 2022 17:42
import 'package:openfoodfacts/interface/Parameter.dart';

/// "Barcodes" search API parameter.
class Barcodes extends Parameter {
Copy link
Member

Choose a reason for hiding this comment

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

Thats a bit generic, what about BarcodeParameter

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 Good point. "Filter" would even be better, but the rest is rather named "Parameter".
Renamed.

Impacted files:
* `BarcodeParameter.dart`
* `api_matchedProductV2_test.dart`
* `api_searchProducts_test.dart`
* `openfoodfacts.dart`
Impacted file:
* `api_getProduct_test.dart`
@monsieurtanuki monsieurtanuki merged commit 582775b into openfoodfacts:master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants