CmfClient
cl_forge.cmf.CmfClient
¶
CmfClient(api_key: str)
Base client for interacting with the CMF API.
Notes
The API is free to use, but has a limit of 10.000 monthly requests per user and requires an API key for authentication, which can be requested in Contact and is usually sent to the given email during the day.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
The API ticket used for authenticating requests to the CMF API. |
base_url |
str
|
The base URL of the CMF API. |
Raises:
| Type | Description |
|---|---|
EmptyApiKey
|
If no API key is provided or it's empty. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
The API key for authenticating with the CMF API. |
required |
Source code in src/cl_forge/core/impl/rs_cl_forge/rs_cmf.pyi
get
¶
Sends a GET request to the specified CMF API endpoint.
Notes
See the API Docs for all the available endpoints.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The API endpoint path. Must start with |
required |
fmt
|
Literal['json', 'xml']
|
The format of the response. Can be |
'json'
|
Returns:
| Type | Description |
|---|---|
dict[str, list[dict[str, str]]] | str
|
The response from the CMF API. Returns a |