Closed monsieurtanuki closed 3 months ago
cc @raphodn @raphael0202
Attention: Patch coverage is 83.72093%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 75.20%. Comparing base (
820d145
) to head (641d195
). Report is 34 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
lib/src/prices/currency.dart | 0.00% | 3 Missing :warning: |
lib/src/prices/proof_type.dart | 0.00% | 2 Missing :warning: |
test/api_search_products_test.dart | 71.42% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fyi in the prices web app I opted to pass the app_name
in the URL of every request (so not only POST, but also GET).
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).
Fyi in the prices web app I opted to pass the
app_name
in the URL of every request (so not only POST, but also GET).
DELETE and PATCH too?
Yes every call to the API 👌
And you can send extra info like the app_version
and any other relevant data as extra url params if you want.
I need to document at least the app_name
in the API documentation
@raphodn I've just pushed a change where all prices URLs will include "user agent" fields (when populated):
app_name
app_version
(optional)app_uuid
(optional)app_platform
(optional)comment
(optional)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
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