iqm.iqm_client.api.APIConfig

iqm.iqm_client.api.APIConfig#

class iqm.iqm_client.api.APIConfig(variant: APIVariant, iqm_server_url: str)#

Bases: object

Provides supported API endpoints for a given API variant.

Methods

_get_api_urls()

returns:

Relative URLs for each supported API endpoints.

is_supported(endpoint)

param endpoint:

API endpoint.

url(endpoint, *args)

param endpoint:

API endpoint.

Parameters:
is_supported(endpoint: APIEndpoint) bool#
Parameters:

endpoint (APIEndpoint) – API endpoint.

Returns:

True if the endpoint is supported, False otherwise.

Return type:

bool

url(endpoint: APIEndpoint, *args) str#
Parameters:
  • endpoint (APIEndpoint) – API endpoint.

  • args – Arguments to be passed to the URL.

Returns:

URL for the given endpoint.

Raises:

ValueError – If the endpoint is not supported.

Return type:

str