ApiKey
- class fabman.api_key.ApiKey(requester: Requester, attributes: dict)
Class for interacting with the api-keys endpoints on the Fabman API
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs) Response
Deletes an api-key. WARNING: This is irreversible.
- Calls:
“DELETE /api-keys/{apiKeyId}” <https://fabman.io/api/v1/documentation#/api-keys/deleteApiKeysId>
- Returns:
Response from the API with status code 204 (No Content) if successful
- Return type:
requests.Response
- get_token(**kwargs) ApiKeyToken
Returns the token for an api-key. Must be called with a valid api-key.
- Calls:
“GET /api-keys/{apiKeyId}/token” <https://fabman.io/api/v1/documentation#/api-keys/getApiKeysIdToken>
- Returns:
Response from the API with status code 200 (OK) if successful
- Return type:
requests.Response
- update(**kwargs) None
Updates the api-key. Attributes are updated in place with new information returned by the API.
- Calls:
“PUT /api-keys/{apiKeyId}” <https://fabman.io/api/v1/documentation#/api-keys/putApiKeysId>
- Returns:
None
- Return type:
None
- class fabman.api_key.ApiKeyToken(requester: Requester, attributes: dict)
Simple Class to hold the token for an api-key
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with