Trusted Activities¶
-
class
py42.clients.trustedactivities.
TrustedActivityType
¶ Bases:
py42.choices.Choices
Constants available for setting the type of a trusted activity.
DOMAIN
SLACK
-
class
py42.clients.trustedactivities.
TrustedActivitiesClient
(trusted_activities_service)¶ Bases:
object
A client to expose the trusted activities/data preferences API
-
create
(type, value, description=None)¶ Gets all trusted activities with the given type. Rest documentation <https://developer.code42.com/api>
Parameters: - type (str) – Type of the trusted activity. Defaults to None. Constants available at
py42.constants.TrustedActivityType
. - value (str) – The URL of the domain or name of the Slack workspace.
- description (str, optional) – Description of the trusted activity.
Returns: - type (str) – Type of the trusted activity. Defaults to None. Constants available at
-
delete
(id)¶ Deletes a trusted activity by given resource number. Rest documentation <https://developer.code42.com/api>
Parameters: id (int) – Resource number of the trusted activity or domain. Returns: py42.response.Py42Response
-
get
(id)¶ Retrieve trusted activity details by given resource number. Rest documentation <https://developer.code42.com/api>
Parameters: id (int) – Resource number of the trusted activity or domain. Returns: py42.response.Py42Response
-
get_all
(type=None, page_size=None)¶ Gets all trusted activities. Rest documentation <https://developer.code42.com/api>
Parameters: - type (str, optional) – Type of the trusted activity. Defaults to None. Constants available at
py42.constants.TrustedActivityType
. - page_size (int, optional) – Number of results to return per page. Defaults to 100.
Returns: An object that iterates over
py42.response.Py42Response
objects that each contain a page of cases.Return type: generator
- type (str, optional) – Type of the trusted activity. Defaults to None. Constants available at
-
update
(id, value=None, description=None)¶ Updates trusted activity details by given resource number. Rest documentation <https://developer.code42.com/api>
Parameters: - id (int) – Resource number of the trusted activity.
- value (str, optional) – The URL of the domain or name of the Slack workspace.
- description (str, optional) – Description of the trusted activity.
Returns:
-