Skip to content

Commit abdfc87

Browse files
Fix base url according to official documentation (#1485)
Co-authored-by: William Bergamin <[email protected]>
1 parent 5f941f4 commit abdfc87

File tree

13 files changed

+20
-20
lines changed

13 files changed

+20
-20
lines changed

slack/web/async_base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class AsyncBaseClient:
20-
BASE_URL = "https://www.slack.com/api/"
20+
BASE_URL = "https://slack.com/api/"
2121

2222
def __init__(
2323
self,

slack/web/async_internal_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _get_url(base_url: str, api_method: str) -> str:
3232
3333
Returns:
3434
The absolute API URL.
35-
e.g. 'https://www.slack.com/api/chat.postMessage'
35+
e.g. 'https://slack.com/api/chat.postMessage'
3636
"""
3737
return urljoin(base_url, api_method)
3838

slack/web/base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838

3939
class BaseClient:
40-
BASE_URL = "https://www.slack.com/api/"
40+
BASE_URL = "https://slack.com/api/"
4141

4242
def __init__(
4343
self,

slack_sdk/rtm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class RTMClient(object): # skipcq: PYL-R0205
4848
Default is 30.
4949
base_url (str): The base url for all HTTP requests.
5050
Note: This is only used in the WebClient.
51-
Default is "https://www.slack.com/api/".
51+
Default is "https://slack.com/api/".
5252
connect_method (str): An string specifying if the client
5353
will connect with `rtm.connect` or `rtm.start`.
5454
Default is `rtm.connect`.

slack_sdk/web/async_base_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
class AsyncBaseClient:
28-
BASE_URL = "https://www.slack.com/api/"
28+
BASE_URL = "https://slack.com/api/"
2929

3030
def __init__(
3131
self,
@@ -48,7 +48,7 @@ def __init__(
4848
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
4949
self.base_url = base_url
5050
"""A string representing the Slack API base URL.
51-
Default is `'https://www.slack.com/api/'`."""
51+
Default is `'https://slack.com/api/'`."""
5252
self.timeout = timeout
5353
"""The maximum number of seconds the client will wait
5454
to connect and receive a response from Slack.

slack_sdk/web/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AsyncWebClient(AsyncBaseClient):
4545
Attributes:
4646
token (str): A string specifying an `xoxp-*` or `xoxb-*` token.
4747
base_url (str): A string representing the Slack API base URL.
48-
Default is `'https://www.slack.com/api/'`
48+
Default is `'https://slack.com/api/'`
4949
timeout (int): The maximum number of seconds the client will wait
5050
to connect and receive a response from Slack.
5151
Default is 30 seconds.

slack_sdk/web/base_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141

4242
class BaseClient:
43-
BASE_URL = "https://www.slack.com/api/"
43+
BASE_URL = "https://slack.com/api/"
4444

4545
def __init__(
4646
self,
@@ -61,7 +61,7 @@ def __init__(
6161
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
6262
self.base_url = base_url
6363
"""A string representing the Slack API base URL.
64-
Default is `'https://www.slack.com/api/'`."""
64+
Default is `'https://slack.com/api/'`."""
6565
self.timeout = timeout
6666
"""The maximum number of seconds the client will wait
6767
to connect and receive a response from Slack.
@@ -225,7 +225,7 @@ def _urllib_api_call(
225225
226226
Args:
227227
token: Slack API Token (either bot token or user token)
228-
url: Complete URL (e.g., https://www.slack.com/api/chat.postMessage)
228+
url: Complete URL (e.g., https://slack.com/api/chat.postMessage)
229229
query_params: Query string
230230
json_body: JSON data structure (it's still a dict at this point),
231231
if you give this argument, body_params and files will be skipped
@@ -326,7 +326,7 @@ def _perform_urllib_http_request(self, *, url: str, args: Dict[str, Dict[str, An
326326
"""Performs an HTTP request and parses the response.
327327
328328
Args:
329-
url: Complete URL (e.g., https://www.slack.com/api/chat.postMessage)
329+
url: Complete URL (e.g., https://slack.com/api/chat.postMessage)
330330
args: args has "headers", "data", "params", and "json"
331331
"headers": Dict[str, str]
332332
"data": Dict[str, Any]

slack_sdk/web/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class WebClient(BaseClient):
3636
Attributes:
3737
token (str): A string specifying an `xoxp-*` or `xoxb-*` token.
3838
base_url (str): A string representing the Slack API base URL.
39-
Default is `'https://www.slack.com/api/'`
39+
Default is `'https://slack.com/api/'`
4040
timeout (int): The maximum number of seconds the client will wait
4141
to connect and receive a response from Slack.
4242
Default is 30 seconds.

slack_sdk/web/internal_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _get_url(base_url: str, api_method: str) -> str:
6565
6666
Returns:
6767
The absolute API URL.
68-
e.g. 'https://www.slack.com/api/chat.postMessage'
68+
e.g. 'https://slack.com/api/chat.postMessage'
6969
"""
7070
return urljoin(base_url, api_method)
7171

slack_sdk/web/legacy_base_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141

4242
class LegacyBaseClient:
43-
BASE_URL = "https://www.slack.com/api/"
43+
BASE_URL = "https://slack.com/api/"
4444

4545
def __init__(
4646
self,
@@ -64,7 +64,7 @@ def __init__(
6464
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
6565
self.base_url = base_url
6666
"""A string representing the Slack API base URL.
67-
Default is `'https://www.slack.com/api/'`."""
67+
Default is `'https://slack.com/api/'`."""
6868
self.timeout = timeout
6969
"""The maximum number of seconds the client will wait
7070
to connect and receive a response from Slack.
@@ -300,7 +300,7 @@ def _urllib_api_call(
300300
301301
Args:
302302
token: Slack API Token (either bot token or user token)
303-
url: Complete URL (e.g., https://www.slack.com/api/chat.postMessage)
303+
url: Complete URL (e.g., https://slack.com/api/chat.postMessage)
304304
query_params: Query string
305305
json_body: JSON data structure (it's still a dict at this point),
306306
if you give this argument, body_params and files will be skipped
@@ -400,7 +400,7 @@ def _perform_urllib_http_request(self, *, url: str, args: Dict[str, Dict[str, An
400400
"""Performs an HTTP request and parses the response.
401401
402402
Args:
403-
url: Complete URL (e.g., https://www.slack.com/api/chat.postMessage)
403+
url: Complete URL (e.g., https://slack.com/api/chat.postMessage)
404404
args: args has "headers", "data", "params", and "json"
405405
"headers": Dict[str, str]
406406
"data": Dict[str, Any]

0 commit comments

Comments
 (0)