botapi-py 1.4.9__tar.gz → 1.4.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {botapi_py-1.4.9 → botapi_py-1.4.11}/PKG-INFO +1 -1
- {botapi_py-1.4.9 → botapi_py-1.4.11}/pyproject.toml +1 -1
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/core.py +13 -1
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/__init__.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/__init__.pyi +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/dispatchers/__init__.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/dispatchers/__init__.pyi +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/dispatchers/common.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/dispatchers/get_updates_handler.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/dispatchers/redis_pubsub_handler.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/enums.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/errors.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/methods.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/shortcuts.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/types.py +0 -0
- {botapi_py-1.4.9 → botapi_py-1.4.11}/src/botapi/utils.py +0 -0
|
@@ -49,7 +49,19 @@ class BaseBot:
|
|
|
49
49
|
url += 'test/'
|
|
50
50
|
url += method
|
|
51
51
|
return url
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
def _compose_api_file_url(self, file_path: str) -> str:
|
|
54
|
+
'''
|
|
55
|
+
Composes the URL for file downloads from the Telegram Bot API.
|
|
56
|
+
'''
|
|
57
|
+
# https://api.telegram.org/file/bot<token>/<file_path>
|
|
58
|
+
# https://api.telegram.org/file/bot<token>/test/<file_path>
|
|
59
|
+
url = f'{self.api_url}/file/bot{self.token}/'
|
|
60
|
+
if self.test_server:
|
|
61
|
+
url += 'test/'
|
|
62
|
+
url += file_path
|
|
63
|
+
return url
|
|
64
|
+
|
|
53
65
|
def _convert_data(self, data: dict[str, Any]) -> tuple[dict[str, Any], MultipartFiles]:
|
|
54
66
|
new_data: dict[str, Any] = {}
|
|
55
67
|
files: MultipartFiles = {} # (filename, file_content, mime_type)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|