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

Update #29

Merged
merged 25 commits into from
Jun 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update wibuapi.py
  • Loading branch information
zYxDevs authored Oct 23, 2023
commit d3f516b6c0c4caa8dda0f51e6fb0004e88303d1a
2 changes: 1 addition & 1 deletion wibuapi/wibuapi.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@


class WibuAPI:
def __init__(self, apikey: str = None):
def __init__(self, apikey: str = ""):
Copy link

Choose a reason for hiding this comment

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

suggestion: Consider making 'apikey' a required parameter.

Making 'apikey' a required parameter would ensure that the API key is always provided, which might be necessary for the API calls to function correctly.

Suggested change
def __init__(self, apikey: str = ""):
def __init__(self, apikey: str):

self.base_url = "https://wibu-api.eu.org/api"
self.deprecated_url = "https://api.wibu-api.eu.org/api"
self.headers = {"x-wibu-key": apikey}
Copy link

Choose a reason for hiding this comment

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

issue (bug_risk): Check for empty API key.

Consider adding a check to ensure that 'apikey' is not empty. If it is, you might want to raise an exception or log a warning.

Loading