Joins the base Slack URL and an API method to form an absolute URL. Args: base_url (str): The base URL api_method (str): The Slack Web API method. e.g. 'chat.postMessage' Returns: The absolute API URL. e.g. 'https://slack.com/api/chat.postMessage'
(base_url: str, api_method: str)
| 24 | |
| 25 | |
| 26 | def _get_url(base_url: str, api_method: str) -> str: |
| 27 | """Joins the base Slack URL and an API method to form an absolute URL. |
| 28 | |
| 29 | Args: |
| 30 | base_url (str): The base URL |
| 31 | api_method (str): The Slack Web API method. e.g. 'chat.postMessage' |
| 32 | |
| 33 | Returns: |
| 34 | The absolute API URL. |
| 35 | e.g. 'https://slack.com/api/chat.postMessage' |
| 36 | """ |
| 37 | return urljoin(base_url, api_method) |
| 38 | |
| 39 | |
| 40 | def _get_headers( |