Table of Contents
slack
Slack Objects
class Slack()
The class includes all necessary methods to access the Slack endpoints
Arguments:
slack_apiSlackAPI - Inject a Slack API model object that includes all necessary values and informationcustom_notificationbool - Specify if the custom notification should be enabled or not (default False)
Attributes:
slack_apiSlackAPI - This is where we store the slack_apicustom_notificationbool - This is where we store the custom_notificationslack_clienthttpx.Client - This is where we store the slack_client
send_slack_message
def send_slack_message(events_cw: list,
custom_successful_message: str = None,
custom_error_message: str = None)
The method includes a functionality to send the Slack messages
Arguments:
events_cwlist - Specify the calendar eventscustom_successful_messagestr - Specify the optional custom successful message (default None)custom_error_messagestr - Specify the optional custom error message (default None)
Raises:
ConnectionError- It is not possible to establish a connection to the endpointValueError- The return value of the Slack API call is not valid
Returns:
None