mgnipy.emgapi_v2_client.api.authentication package#
Contains endpoint functions for accessing the API
Submodules#
mgnipy.emgapi_v2_client.api.authentication.token_obtain_sliding module#
- mgnipy.emgapi_v2_client.api.authentication.token_obtain_sliding.sync_detailed(*, client, body)[source]#
Obtain an authentication token using Webin credentials.
Obtain an authentication JWT token using Webin credentials. This token is sliding, i.e. it can be
used both to access private data endpoints and to refresh itself after expiry.
- Parameters:
body (WebinTokenRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Response[WebinTokenResponse]
- Return type:
- mgnipy.emgapi_v2_client.api.authentication.token_obtain_sliding.sync(*, client, body)[source]#
Obtain an authentication token using Webin credentials.
Obtain an authentication JWT token using Webin credentials. This token is sliding, i.e. it can be
used both to access private data endpoints and to refresh itself after expiry.
- Parameters:
body (WebinTokenRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
WebinTokenResponse
- Return type:
WebinTokenResponse | None
- async mgnipy.emgapi_v2_client.api.authentication.token_obtain_sliding.asyncio_detailed(*, client, body)[source]#
Obtain an authentication token using Webin credentials.
Obtain an authentication JWT token using Webin credentials. This token is sliding, i.e. it can be
used both to access private data endpoints and to refresh itself after expiry.
- Parameters:
body (WebinTokenRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Response[WebinTokenResponse]
- Return type:
- async mgnipy.emgapi_v2_client.api.authentication.token_obtain_sliding.asyncio(*, client, body)[source]#
Obtain an authentication token using Webin credentials.
Obtain an authentication JWT token using Webin credentials. This token is sliding, i.e. it can be
used both to access private data endpoints and to refresh itself after expiry.
- Parameters:
body (WebinTokenRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
WebinTokenResponse
- Return type:
WebinTokenResponse | None
mgnipy.emgapi_v2_client.api.authentication.token_refresh_sliding module#
- mgnipy.emgapi_v2_client.api.authentication.token_refresh_sliding.sync_detailed(*, client, body)[source]#
Refresh an authentication token to increase its validity duration.
If a tokenβs expiry has passed, but its (longer) refresh expiry remains valid, this endpoint can be
used to fetch a replacement token without logging in again.
- Parameters:
body (WebinTokenRefreshRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Response[WebinTokenResponse]
- Return type:
- mgnipy.emgapi_v2_client.api.authentication.token_refresh_sliding.sync(*, client, body)[source]#
Refresh an authentication token to increase its validity duration.
If a tokenβs expiry has passed, but its (longer) refresh expiry remains valid, this endpoint can be
used to fetch a replacement token without logging in again.
- Parameters:
body (WebinTokenRefreshRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
WebinTokenResponse
- Return type:
WebinTokenResponse | None
- async mgnipy.emgapi_v2_client.api.authentication.token_refresh_sliding.asyncio_detailed(*, client, body)[source]#
Refresh an authentication token to increase its validity duration.
If a tokenβs expiry has passed, but its (longer) refresh expiry remains valid, this endpoint can be
used to fetch a replacement token without logging in again.
- Parameters:
body (WebinTokenRefreshRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Response[WebinTokenResponse]
- Return type:
- async mgnipy.emgapi_v2_client.api.authentication.token_refresh_sliding.asyncio(*, client, body)[source]#
Refresh an authentication token to increase its validity duration.
If a tokenβs expiry has passed, but its (longer) refresh expiry remains valid, this endpoint can be
used to fetch a replacement token without logging in again.
- Parameters:
body (WebinTokenRefreshRequest)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
WebinTokenResponse
- Return type:
WebinTokenResponse | None
mgnipy.emgapi_v2_client.api.authentication.token_verify module#
- mgnipy.emgapi_v2_client.api.authentication.token_verify.sync_detailed(*, client, body)[source]#
Verify Token
- Parameters:
body (TokenVerifyInputSchema)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Response[Schema]
- Return type:
- mgnipy.emgapi_v2_client.api.authentication.token_verify.sync(*, client, body)[source]#
Verify Token
- Parameters:
body (TokenVerifyInputSchema)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Schema
- Return type:
Schema | None
- async mgnipy.emgapi_v2_client.api.authentication.token_verify.asyncio_detailed(*, client, body)[source]#
Verify Token
- Parameters:
body (TokenVerifyInputSchema)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Response[Schema]
- Return type:
- async mgnipy.emgapi_v2_client.api.authentication.token_verify.asyncio(*, client, body)[source]#
Verify Token
- Parameters:
body (TokenVerifyInputSchema)
client (AuthenticatedClient | Client)
- Raises:
errors.UnexpectedStatus β If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException β If the request takes longer than Client.timeout.
- Returns:
Schema
- Return type:
Schema | None