docs: add documentation for upload_image() method#458
Closed
nithinskumar866 wants to merge 1 commit intoopenfoodfacts:developfrom
Closed
docs: add documentation for upload_image() method#458nithinskumar866 wants to merge 1 commit intoopenfoodfacts:developfrom
nithinskumar866 wants to merge 1 commit intoopenfoodfacts:developfrom
Conversation
|
Author
|
Hi maintainers , Just a gentle follow-up on this PR. This change adds documentation for the I’d really appreciate any feedback or suggestions for improvement whenever you have time. Happy to make updates as needed. Thanks for your time and for maintaining the project! |
|
|
||
| Authentication is required to perform write operations. You must provide a valid `username` and `password` when initializing the API object. | ||
|
|
||
| Example: |
Member
There was a problem hiding this comment.
i’m closing this pr for now. please discuss it in the appropriate slack channel (#api or #contributors) to see if it’s needed, and then you can raise a new pr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Developers can already upload product images to Open Food Facts using the
upload_image()method inProductResourceprovided by the Python SDK.But , developers(even i faced this issue) find it challenging to find and utilize this functionality because it is currently not documented in the README or usage examples.
The documentation for the
upload_image()method is added in this PR.Solution
This modification adds a new section explaining how to upload product images using the SDK under the Examples section of the README.
Among the documents are:
A working code example demonstrating how to upload an image,
code,image_path,image_data_base64, andselected.Making it clear that write operations require authenticationBy making the image upload feature simpler to find and utilize, this enhances the developer experience.
Related issue(s)
Fixes #55