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
cf. openfoodfacts/smooth-app#4626
We need to be able to query other servers within a specific app. For instance, in an off app like Smoothie, being able to check if a product is in obf.
We cannot really do that currently because our current implementation is a bit "hand-made": basically we only have one static "host" string we compute the URLs from. We would change that static field to go to obf, meanwhile all the queries (even unrelated) would then point to obf, not off anymore.
What - Proposed solution
A solution would be to add a "server type" parameter (off obf opf opff) to the "get url" methods. And then to all the methods that call "get url" (e.g. "getProduct").
That may be a breaking change. Maybe not with off as default value.
Alternatives you've considered
We may also implement a very basic "bool isOtherProduct(barcode, serverType)" that would just check if the product exists on another server. But we probably need a more ambitious method anyway.
The text was updated successfully, but these errors were encountered:
Why - Problem description
cf. openfoodfacts/smooth-app#4626
We need to be able to query other servers within a specific app. For instance, in an off app like Smoothie, being able to check if a product is in obf.
We cannot really do that currently because our current implementation is a bit "hand-made": basically we only have one static "host" string we compute the URLs from. We would change that static field to go to obf, meanwhile all the queries (even unrelated) would then point to obf, not off anymore.
What - Proposed solution
A solution would be to add a "server type" parameter (off obf opf opff) to the "get url" methods. And then to all the methods that call "get url" (e.g. "getProduct").
That may be a breaking change. Maybe not with off as default value.
Alternatives you've considered
We may also implement a very basic "bool isOtherProduct(barcode, serverType)" that would just check if the product exists on another server. But we probably need a more ambitious method anyway.
The text was updated successfully, but these errors were encountered: