Skip to content

Commit b8016b7

Browse files
committed
add headers to _client.py since client.py is autogenerated
1 parent e7e7243 commit b8016b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fishjam/api/_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
from fishjam._openapi_client.types import Response
66
from fishjam.errors import HTTPError
77
from fishjam.utils import get_fishjam_url
8+
from fishjam.version import get_version
89

910

1011
class Client:
1112
def __init__(self, fishjam_id: str, management_token: str):
1213
self._fishjam_url = get_fishjam_url(fishjam_id)
13-
self.client = AuthenticatedClient(self._fishjam_url, token=management_token)
14+
self.client = AuthenticatedClient(self._fishjam_url, token=management_token, headers={"x-fishjam-api-client": f"python-server-{get_version()}"})
1415

1516
def _request(self, method, **kwargs):
1617
response = method.sync_detailed(client=self.client, **kwargs)

0 commit comments

Comments
 (0)