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

Being able to check off, obf, opf and opff #801

Closed
monsieurtanuki opened this issue Sep 7, 2023 · 0 comments · Fixed by #803
Closed

Being able to check off, obf, opf and opff #801

monsieurtanuki opened this issue Sep 7, 2023 · 0 comments · Fixed by #803
Assignees
Labels
🧴 Open Beauty Facts Our cosmetic analysis project https://world.openbeautyfacts.org

Comments

@monsieurtanuki
Copy link
Contributor

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.

@monsieurtanuki monsieurtanuki self-assigned this Sep 7, 2023
@monsieurtanuki monsieurtanuki added the 🧴 Open Beauty Facts Our cosmetic analysis project https://world.openbeautyfacts.org label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧴 Open Beauty Facts Our cosmetic analysis project https://world.openbeautyfacts.org
Development

Successfully merging a pull request may close this issue.

1 participant