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:
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:

Response[WebinTokenResponse]

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:
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:
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:

Response[WebinTokenResponse]

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:
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:
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:

Response[WebinTokenResponse]

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:
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:
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:

Response[WebinTokenResponse]

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:
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:
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:

Response[Schema]

mgnipy.emgapi_v2_client.api.authentication.token_verify.sync(*, client, body)[source]#

Verify Token

Parameters:
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:
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:

Response[Schema]

async mgnipy.emgapi_v2_client.api.authentication.token_verify.asyncio(*, client, body)[source]#

Verify Token

Parameters:
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