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
Issue: User Agent Parameter Missing in OpenFoodFacts SDK Despite Documentation
What
A discrepancy has been identified in the OpenFoodFacts SDK documentation regarding the ability to set a user agent. The documentation suggests setting a user agent during API initialization, but the SDK's API class constructor does not support this functionality.
Steps to Observe the Discrepancy
The documentation indicates the use of a user_agent parameter in the API initialization as follows:
api=API(
user_agent="<application name>",
...
)
However, the actual API class constructor in the SDK lacks the user_agent parameter:
The SDK's documentation should accurately reflect its current functionality. If the SDK is intended to support the user_agent parameter, this should be correctly implemented. If not, the documentation should be updated to avoid such mentions.
Suggested Action
Based on this inconsistency, I recommend either:
Updating the SDK to include a user_agent parameter in the API class constructor as per the documentation.
Amending the documentation to remove any references to setting a user agent if this feature is not supported.
Platform
OpenFoodFacts SDK and its official documentation.
Context of Discovery
This issue was discovered during my first use of the OpenFoodFacts SDK, leading to initial confusion.
I look forward to a resolution that aligns the SDK with its documentation, ensuring clarity for all future users.
The text was updated successfully, but these errors were encountered:
I think this only happens if you install the package with pip. I had the same issue. But when I cloned the repo and installed via setup.py, that worked for me. I'm guessing the pypi package just isn't up to date?
Issue: User Agent Parameter Missing in OpenFoodFacts SDK Despite Documentation
What
A discrepancy has been identified in the OpenFoodFacts SDK documentation regarding the ability to set a user agent. The documentation suggests setting a user agent during API initialization, but the SDK's
API
class constructor does not support this functionality.Steps to Observe the Discrepancy
user_agent
parameter in theAPI
initialization as follows:API
class constructor in the SDK lacks theuser_agent
parameter:Expected Behavior
The SDK's documentation should accurately reflect its current functionality. If the SDK is intended to support the
user_agent
parameter, this should be correctly implemented. If not, the documentation should be updated to avoid such mentions.Suggested Action
Based on this inconsistency, I recommend either:
user_agent
parameter in theAPI
class constructor as per the documentation.Platform
Context of Discovery
I look forward to a resolution that aligns the SDK with its documentation, ensuring clarity for all future users.
The text was updated successfully, but these errors were encountered: