-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
fix: added "app_name" parameter for prices methods uploadProof and createPrice #938
fix: added "app_name" parameter for prices methods uploadProof and createPrice #938
Conversation
…eatePrice Impacted files: * `api_get_taxonomy_origins_server_test.dart`: minor refactoring * `api_get_user_products_test.dart`: set max page size to new server max page size (100) * `api_search_products_test.dart`: set default page size to new server default page size (50) * `api_suggestion_manager_test.dart`: now targeting PROD; minor refactoring * `currency.dart`: new `fromName` method * `open_prices_api_client.dart`: added `app_name` parameter for `uploadProof` and `createPrice`; refactored around new method `getUri` * `page_size.dart`: added comments * `price.dart`: added comments * `proof.dart`: new `getFileUrl` method; added comments * `proof_type.dart`: new `fromOffTag` method
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #938 +/- ##
==========================================
- Coverage 76.34% 75.20% -1.15%
==========================================
Files 239 247 +8
Lines 8494 8881 +387
==========================================
+ Hits 6485 6679 +194
- Misses 2009 2202 +193 ☔ View full report in Codecov by Sentry. |
Fyi in the prices web app I opted to pass the I guess in Sentry if there are any errors, the User Agent is sent and available in any case. But i realised that some browsers do not allow to edit the UA (for instance Chrome). |
DELETE and PATCH too? |
Yes every call to the API 👌 And you can send extra info like the I need to document at least the |
Impacted files: * `api_prices_test.dart`: test for new method `getFileUrl` * `open_prices_api_client.dart`: similar URI user agent management as off-dart * `proof.dart`: minor fix
@raphodn I've just pushed a change where all prices URLs will include "user agent" fields (when populated):
With the exception of the proof file URL where we don't add those parameters, e.g. https://prices.openfoodfacts.net/img/0002/yRw3zcph08.jpg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @monsieurtanuki
Co-authored-by: Marvin M <[email protected]>
Co-authored-by: Marvin M <[email protected]>
Thank you @M123-dev for your reviews! |
What
app_name
parameter to prices methodsuploadProof
andcreatePrice
, for tracking purposes.Impacted files
api_get_taxonomy_origins_server_test.dart
: minor refactoringapi_get_user_products_test.dart
: set max page size to new server max page size (100)api_search_products_test.dart
: set default page size to new server default page size (50)api_suggestion_manager_test.dart
: now targeting PROD; minor refactoringcurrency.dart
: newfromName
methodopen_prices_api_client.dart
: addedapp_name
parameter foruploadProof
andcreatePrice
; refactored around new methodgetUri
page_size.dart
: added commentsprice.dart
: added commentsproof.dart
: newgetFileUrl
method; added commentsproof_type.dart
: newfromOffTag
method