IncidentUpdates¶
Resource¶
Methods¶
-
IndicentUpdate.
update
() → cachetclient.v1.incident_updates.IndicentUpdate¶ Update/save changes
Returns: Updated IncidentUpdate instance
-
IndicentUpdate.
delete
() → None¶ Deletes the incident update
Attributes¶
-
IndicentUpdate.
id
¶ Resource id
Type: int
-
IndicentUpdate.
incident_id
¶ The incident id this update belongs to
Type: int
-
IndicentUpdate.
status
¶ Get or set incident status. See
enums
.Type: int
-
IndicentUpdate.
message
¶ Get or set message
Type: str
-
IndicentUpdate.
user_id
¶ The user id creating the update
Type: int
-
IndicentUpdate.
created_at
¶ when the resource was created
Type: datetime
-
IndicentUpdate.
updated_at
¶ When the resource as last updated
Type: datetime
-
IndicentUpdate.
human_status
¶ Human readable status
Type: str
Manager¶
-
IncidentUpdatesManager.
create
(*, incident_id: int, status: int, message: str) → cachetclient.v1.incident_updates.IndicentUpdate¶ Create an incident update
Keyword Arguments: - incident_id (int) – The incident to update
- status (int) – New status id
- message (str) – Update message
Returns: IndicentUpdate
instance
-
IncidentUpdatesManager.
update
(*, id: int, incident_id: int, status: int = None, message: str = None, **kwargs) → cachetclient.v1.incident_updates.IndicentUpdate¶ Update an incident update
Parameters: - incident_id (int) – The incident
- id (int) – The incident update id to update
Keyword Arguments: - status (int) – New status id
- message (str) – New message
Returns: The updated
IncidentUpdate
instance
-
IncidentUpdatesManager.
count
(incident_id) → int¶ Count the number of indicent update for an incident
Parameters: incident_id (int) – The incident Returns: Number of incident updates for the incident Return type: int
-
IncidentUpdatesManager.
list
(incident_id: int, page: int = 1, per_page: int = 20) → Generator[cachetclient.v1.incident_updates.IndicentUpdate, None, None]¶ List updates for an issue
Parameters: incident_id – The incident to list updates
Keyword Arguments: - page (int) – The first page to request
- per_page (int) – Entires per page
Returns: Generator of :py:data:`IncidentUpdate`s
-
IncidentUpdatesManager.
get
(incident_id: int, update_id: int) → cachetclient.v1.incident_updates.IndicentUpdate¶ Get an incident update
Parameters: - incident_id (int) – The incident
- update_id (int) – The indicent update id to obtain
Returns: IncidentUpdate
instance
-
IncidentUpdatesManager.
delete
(incident_id: int, update_id: int) → None¶ Delete an incident update
-
IncidentUpdatesManager.
instance_from_dict
(data: dict) → cachetclient.base.Resource¶ Creates a resource instance from a dictionary.
This doesn’t hit any endpoints in cachet, but rather enables us to create a resource class instance from dictionary data. This can be useful when caching data from cachet in memcache or databases.
Parameters: data (dict) – dictionary containing the instance data Returns: The resource class instance Return type: Resource
-
IncidentUpdatesManager.
instance_from_json
(data: str) → cachetclient.base.Resource¶ Creates a resource instance from a json string.
This doesn’t hit any endpoints in cachet, but rather enables us to create a resource class instance from dictionary data. This can be useful when caching data from cachet in memcache or databases.
Parameters: data (str) – json string containing the instance data Returns: The resource class instance Return type: Resource