-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: [WIP] Robotoff documentation #30
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
…facts/api-documentation into test-update-from-pierre
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
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.
A few things:
-
Use the already defined Postman variables, like
DOMAIN_NAME
,API_VERSION
andPRODUCT_NUMBER
. This makes it effectively easier to maintain the documentation over time, and switch between environments (.net
, .org` etc...) -
Add
ROBOTOFF_API_VERSION = 1
variable to the two Postman environments (.net and .org JSON files) -
Add
INSIGHT_ID=9a320966-c1dd-4699-aea4-fe6f3bf953be
variable to the two Postman environments (.net and .org JSON files) -
Get a random insight
URL should behttps://robotoff.{{DOMAIN_NAME}}/api/v{{ROBOTOFF_API_VERSION}}/insights/random
instead of.../questions/...
-
Get a specific insight
URL should be filled (e.g:https://robotoff.{{DOMAIN_NAME}}/api/v{{ROBOTOFF_API_VERSION}}/insights/detail/{{INSIGHT_ID}}
-
Get all insights for a specific product
URL can be set tohttps://robotoff.{{DOMAIN_NAME}}/api/v{{ROBOTOFF_API_VERSION}}/insights?barcode={{PRODUCT_NUMBER}}
orhttps://robotoff.openfoodfacts.org/api/v1/insights/24094870
(not sure why the two work but they don't return the same number of fields, maybe explain this in the docs) -
Get questions
can be changed toGet random question
and URL set tohttps://robotoff.{{DOMAIN_NAME}}/api/v{{ROBOTOFF_API_VERSION}}/questions/random
-
Get spelling corrections
URL can be set tohttps://robotoff.{{DOMAIN_NAME}}/api/v{{ROBOTOFF_API_VERSION}}/predict/ingredients/spellcheck
For reference, here is the list of endpoint not documented yet (can be added in further PRs):
api.add_route("/api/v1/insights", InsightCollection())
api.add_route("/api/v1/insights/annotate", AnnotateInsightResource())
api.add_route("/api/v1/predict/nutrient", NutrientPredictorResource())
api.add_route("/api/v1/predict/ocr_insights", OCRInsightsPredictorResource())
api.add_route("/api/v1/predict/category", CategoryPredictorResource())
api.add_route("/api/v1/products/dataset", UpdateDatasetResource())
api.add_route("/api/v1/webhook/product", WebhookProductResource())
api.add_route("/api/v1/images/import", ImageImporterResource())
api.add_route("/api/v1/images/crop", ImageCropResource())
api.add_route("/api/v1/images/predictions/import", ImagePredictionImporterResource())
api.add_route("/api/v1/images/predictions", ImagePredictionFetchResource())
api.add_route("/api/v1/images/predict", ImagePredictorResource())
api.add_route("/api/v1/images/logos", ImageLogoResource())
api.add_route("/api/v1/images/logos/{logo_id:int}", ImageLogoDetailResource())
api.add_route("/api/v1/images/logos/annotate", ImageLogoAnnotateResource())
api.add_route("/api/v1/images/logos/update", ImageLogoUpdateResource())
api.add_route("/api/v1/status", StatusResource())
api.add_route("/api/v1/dump", DumpResource())
api.add_route("/api/v1/users/statistics/{username}", UserStatisticsResource())
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
…facts/api-documentation into test-update-from-pierre
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
…facts/api-documentation into test-update-from-pierre
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
…facts/api-documentation into test-update-from-pierre
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
…facts/api-documentation into test-update-from-pierre
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
… in available models
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
…facts/api-documentation into test-update-from-pierre
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
Signed-off-by: GitHub Actions <[email protected]>
Staging documentation deployed to https://openfoodfacts.github.io/api-documentation-staging |
Robotoff documentation. The non Robotoff docs have been copied to a new PR.