Table of Contents
slack
Slack Objects
class Slack()
The class includes all necessary methods to access the Slack endpoints
Arguments:
slack_api
SlackAPI - Inject a Slack API model object that includes all necessary values and informationcustom_notification
bool - Specify if the custom notification should be enabled or not (default False)
Attributes:
slack_api
SlackAPI - This is where we store the slack_apicustom_notification
bool - This is where we store the custom_notificationslack_client
httpx.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_cw
list - Specify the calendar eventscustom_successful_message
str - Specify the optional custom successful message (default None)custom_error_message
str - 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