divera.api.v2.crud package
Module contents
- class divera.api.v2.crud.CrudAPI[source]
Bases:
ABC- URL_TYPE: str = None
- add_attachment(base_url: str, access_token: str, object_id: int, *args, **kwargs)[source]
Methode zum Hinzufügen eines Anhangs
Method to add an attachment
- Parameters:
base_url – The URL of you divera instance
access_token – You personal access token
object_id – the id of the model
args –
kwargs –
- Returns:
- archive(base_url: str, access_token: str, object_id: int, *args, **kwargs)[source]
Methode zum Archivieren des Modells
Method to archive an alarm
- Parameters:
base_url – The URL of you divera instance
access_token – You personal access token
object_id – the id of the model
args –
kwargs –
- Returns:
- change(base_url: str, access_token: str, object_id: int, *args, **kwargs)[source]
Methode zum Bearbeiten des Modells anhand der ID
Method to edit an item based on its id
- Parameters:
base_url – The URL of you divera instance
access_token – You personal access token
object_id – the id of the model
args –
kwargs –
- Returns:
- create(base_url: str, access_token: str, *args, **kwargs)[source]
Methode zum Erstellen eines neuen Modells
Method to create a new item
- Parameters:
base_url – The URL of you divera instance
access_token – You personal access token
args –
kwargs –
- Returns:
- delete(base_url: str, access_token: str, object_id: int, *args, **kwargs)[source]
Methode zum Löschen des Modells
Method to delete an item
- Parameters:
base_url – The URL of you divera instance
access_token – You personal access token
object_id – the id of the model
args –
kwargs –
- Returns:
- async get(base_url: str, access_token: str, object_id: int = None, *args, **kwargs)[source]
Methode zum Abrufen aller nicht archivierten Modelle
Method to read all non archived models
- Parameters:
base_url – The URL of you divera instance
access_token – You personal access token
object_id – the id of the model
args –
kwargs –
- Returns:
- get_detail(base_url: str, access_token: str, object_id: int, *args, **kwargs)[source]
Methode zum Anzeigen des Modells anhand der ID
Method to show an alarm based on its id
- Parameters:
base_url – The URL of you divera instance
access_token – You personal access token
object_id – the id of the model
args –
kwargs –
- Returns: