Skip to content

Enhance Dawarich API with logging and URL building methods; fix typos…#5

Merged
AlbinLind merged 1 commit into
AlbinLind:mainfrom
tjorim:main
Jan 16, 2025
Merged

Enhance Dawarich API with logging and URL building methods; fix typos…#5
AlbinLind merged 1 commit into
AlbinLind:mainfrom
tjorim:main

Conversation

@tjorim
Copy link
Copy Markdown
Contributor

@tjorim tjorim commented Jan 16, 2025

… in parameters

Comment thread dawarich_api/api_calls.py
Comment on lines +87 to +89
def _build_url(self, path: str) -> str:
"""Build API URL with authentication."""
return f"{self.url}{path}?api_key={self.api_key}"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

New versions of Dawarich allow sending the API key through headers, which is more secure. I think it has been out long enough that it is safe to start using that. But I think adding a build url method is a good idea.

@AlbinLind AlbinLind merged commit 4323240 into AlbinLind:main Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants