You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main focus of Smoothie is currently OFF.
The next step is to explore OBF, OPF and OPFF too. Something like: "Hmm the barcode you've just scanned is not food, but pet food".
For that we need some consistency between OFF, OBF, OPF and OPFF.
The problem is that for OBF, even if we make an API V3 query, we get an old-fashioned API V1 result (https://world.openbeautyfacts.org/api/v3/product/3600550964738).
For instance, status is an int (and we expect a String? in API V3). And the packagings are different too.
Proposed solution
Possible solutions:
just know that OBF, OPF and OPFF must be queried with an api version < 3
=> for that we would need to re-implement a now removed different getProduct method (V < 3) and maintain both methods. Not a lot of code, but possibly confusion for the users of the package.
implement a different file for each source - open_food_api_client.dart, open_beauty_api_client.dart, ...
=> we would have to play it smart and not recopy all the code. Would a "beauty" product have the same fields as a "food" product anyway?
ask the server to really implement api V3 for OBF OPF OPFF
=> minimum impact on openfoodfacts-dart. That still does not solve the possible differences between a "beauty" and a "food" product.
The text was updated successfully, but these errors were encountered:
Problem
The main focus of Smoothie is currently OFF.
The next step is to explore OBF, OPF and OPFF too. Something like: "Hmm the barcode you've just scanned is not food, but pet food".
For that we need some consistency between OFF, OBF, OPF and OPFF.
The problem is that for OBF, even if we make an API V3 query, we get an old-fashioned API V1 result (https://world.openbeautyfacts.org/api/v3/product/3600550964738).
For instance,
status
is anint
(and we expect aString?
in API V3). And the packagings are different too.Proposed solution
Possible solutions:
=> for that we would need to re-implement a now removed different
getProduct
method (V < 3) and maintain both methods. Not a lot of code, but possibly confusion for the users of the package.open_food_api_client.dart
,open_beauty_api_client.dart
, ...=> we would have to play it smart and not recopy all the code. Would a "beauty" product have the same fields as a "food" product anyway?
=> minimum impact on openfoodfacts-dart. That still does not solve the possible differences between a "beauty" and a "food" product.
The text was updated successfully, but these errors were encountered: