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: 831 - Open Prices API - "get prices" #845

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

  • First implementation around the Open Prices API: "get prices".

Part of

Files

New files:

  • api_prices_test.dart: Integration tests about the Open Prices API.
  • currency.dart: Currency of the price.
  • get_prices_result.dart: List of price objects returned by the "get prices" method.
  • get_prices_result.g.dart: generated
  • get_prices_results.dart: Either successful "get prices" result, or request validation errors.
  • location_osm_type.dart: Type of the OpenStreetMap location object.
  • open_prices_api_client.dart: Client calls of the Open Prices API.
  • price.dart: Price object.
  • price.g.dart: generated
  • validation_error.dart: Single API request validation error.
  • validation_error.g.dart: generated
  • validation_errors.dart: List of single API request validation errors.
  • validation_errors.g.dart: generated

Impacted files:

  • http_helper.dart: minor refactoring
  • labeler.yml: added the "prices" files
  • openfoodfacts.dart: exported the new "prices" files

New files:
* `api_prices_test.dart`: Integration tests about the Open Prices API.
* `currency.dart`: Currency of the price.
* `get_prices_result.dart`: List of price objects returned by the "get prices" method.
* `get_prices_result.g.dart`: generated
* `get_prices_results.dart`: Either successful "get prices" result, or request validation errors.
* `location_osm_type.dart`: Type of the OpenStreetMap location object.
* `open_prices_api_client.dart`: Client calls of the Open Prices API.
* `price.dart`: Price object.
* `price.g.dart`: generated
* `validation_error.dart`: Single API request validation error.
* `validation_error.g.dart`: generated
* `validation_errors.dart`: List of single API request validation errors.
* `validation_errors.g.dart`: generated

Impacted files:
* `http_helper.dart`: minor refactoring
* `labeler.yml`: added the "prices" files
* `openfoodfacts.dart`: exported the new "prices" files
Copy link
Member

@raphodn raphodn left a comment

Choose a reason for hiding this comment

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

Thanks for your work ! I have no experience in dart, so I can't comment or review further 😅

@raphael0202
Copy link

Thank you for the implementation :)

@monsieurtanuki monsieurtanuki merged commit eaeb1aa into openfoodfacts:master Dec 15, 2023
2 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @raphael0202 for your review!

@monsieurtanuki
Copy link
Contributor Author

And thank you @raphodn for your comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants