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

feat: Force user agent in API #184

Merged
merged 3 commits into from
Dec 1, 2023

Conversation

butteredwaffles
Copy link
Contributor

Description

Forces the user agent to be provided in order to use openfoodfacts.API functions.

Solution

Adds a new field into APIConfig called "user_agent" and ensures it is not empty when passed in. The user agent is passed into the requests the session makes.

Related issue(s)

@butteredwaffles butteredwaffles requested a review from a team as a code owner November 13, 2023 16:01
@teolemon teolemon changed the title Force user agent in API feat: Force user agent in API Nov 15, 2023
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really cool, thank you :-)

@alexgarel
Copy link
Member

@butteredwaffles may I let you fix the checks ?

Copy link

sonarcloud bot commented Nov 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@butteredwaffles
Copy link
Contributor Author

@alexgarel sorry! didn't realize the flake8 lint had several commands under it - should hopefully be fixed now

@alexgarel
Copy link
Member

@butteredwaffles I invited you to our team, so that you will be able to open branches directly on this repository !

@alexgarel alexgarel merged commit 34024be into openfoodfacts:develop Dec 1, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants