MCPcopy Index your code
hub / github.com/slackapi/python-slack-sdk / send

Method send

slack/webhook/client.py:34–51  ·  view source on GitHub ↗
(
        self,
        *,
        text: Optional[str] = None,
        attachments: Optional[List[Union[Dict[str, any], Attachment]]] = None,
        blocks: Optional[List[Union[Dict[str, any], Block]]] = None,
        response_type: Optional[str] = None,
        headers: Optional[Dict[str, str]] = None,
    )

Source from the content-addressed store, hash-verified

32 self.default_headers = default_headers if default_headers else {}
33
34 def send(
35 self,
36 *,
37 text: Optional[str] = None,
38 attachments: Optional[List[Union[Dict[str, any], Attachment]]] = None,
39 blocks: Optional[List[Union[Dict[str, any], Block]]] = None,
40 response_type: Optional[str] = None,
41 headers: Optional[Dict[str, str]] = None,
42 ) -> WebhookResponse:
43 return self.send_dict(
44 body={
45 "text": text,
46 "attachments": attachments,
47 "blocks": blocks,
48 "response_type": response_type,
49 },
50 headers=headers,
51 )
52
53 def send_dict(self, body: Dict[str, any], headers: Optional[Dict[str, str]] = None) -> WebhookResponse:
54 return self._perform_http_request(

Callers 15

test_webhookMethod · 0.95
test_with_unfurls_offMethod · 0.95
test_with_unfurls_onMethod · 0.95
test_with_blocksMethod · 0.95
test_with_blocks_dictMethod · 0.95
test_with_attachmentsMethod · 0.95
test_metadataMethod · 0.95
test_sendMethod · 0.95
test_send_blocksMethod · 0.95
test_send_attachmentsMethod · 0.95

Calls 1

send_dictMethod · 0.95

Tested by 15

test_webhookMethod · 0.76
test_with_unfurls_offMethod · 0.76
test_with_unfurls_onMethod · 0.76
test_with_blocksMethod · 0.76
test_with_blocks_dictMethod · 0.76
test_with_attachmentsMethod · 0.76
test_metadataMethod · 0.76
test_sendMethod · 0.76
test_send_blocksMethod · 0.76
test_send_attachmentsMethod · 0.76