telegram-api-client-python 1.0.0__tar.gz → 1.0.1__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.
Files changed (27) hide show
  1. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/PKG-INFO +2 -2
  2. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/README.md +1 -1
  3. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/setup.py +1 -1
  4. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/API.py +2 -3
  5. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/account.py +2 -2
  6. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/groups.py +2 -2
  7. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/sending.py +27 -6
  8. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/webhooks.py +1 -2
  9. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/telegram_api_client_python.egg-info/PKG-INFO +2 -2
  10. telegram_api_client_python-1.0.1/telegram_api_client_python.egg-info/SOURCES.txt +23 -0
  11. telegram_api_client_python-1.0.1/telegram_api_client_python.egg-info/top_level.txt +1 -0
  12. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/tests/test_methods.py +3 -3
  13. telegram_api_client_python-1.0.0/telegram_api_client_python.egg-info/SOURCES.txt +0 -23
  14. telegram_api_client_python-1.0.0/telegram_api_client_python.egg-info/top_level.txt +0 -1
  15. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/LICENSE +0 -0
  16. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/setup.cfg +0 -0
  17. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/__init__.py +0 -0
  18. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/response.py +0 -0
  19. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/__init__.py +0 -0
  20. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/journals.py +0 -0
  21. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/marking.py +0 -0
  22. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/partner.py +0 -0
  23. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/queues.py +0 -0
  24. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/receiving.py +0 -0
  25. {telegram_api_client_python-1.0.0/telegram-api-client-python → telegram_api_client_python-1.0.1/telegram_api_client_python}/tools/serviceMethods.py +0 -0
  26. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/telegram_api_client_python.egg-info/dependency_links.txt +0 -0
  27. {telegram_api_client_python-1.0.0 → telegram_api_client_python-1.0.1}/telegram_api_client_python.egg-info/requires.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: telegram-api-client-python
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: This library helps you easily create a Python application with telegram API.
5
5
  Home-page: https://github.com/green-api/telegram-api-client-python
6
6
  Author: GREEN API
@@ -91,7 +91,7 @@ python -m pip install telegram-api-client-python
91
91
  ## Import
92
92
 
93
93
  ```
94
- from telegram-api-client-python import API
94
+ from telegram_api_client_python import API
95
95
  ```
96
96
 
97
97
  ## Examples
@@ -43,7 +43,7 @@ python -m pip install telegram-api-client-python
43
43
  ## Import
44
44
 
45
45
  ```
46
- from telegram-api-client-python import API
46
+ from telegram_api_client_python import API
47
47
  ```
48
48
 
49
49
  ## Examples
@@ -5,7 +5,7 @@ with open("README.md", encoding="UTF-8") as file:
5
5
 
6
6
  setup(
7
7
  name="telegram-api-client-python",
8
- version="1.0.0",
8
+ version="1.0.1",
9
9
  description=(
10
10
  "This library helps you easily create"
11
11
  " a Python application with telegram API."
@@ -1,8 +1,7 @@
1
- import json
2
- import logging
1
+ import json, logging, aiohttp
2
+
3
3
  from typing import Any, NoReturn, Optional
4
4
 
5
- import aiohttp
6
5
  from requests import Response, Session
7
6
  from requests.adapters import HTTPAdapter, Retry
8
7
 
@@ -1,8 +1,8 @@
1
+ import aiofiles
2
+
1
3
  from pathlib import Path
2
4
  from typing import Dict, TYPE_CHECKING, Optional, Union
3
5
 
4
- import aiofiles
5
-
6
6
  from ..response import Response
7
7
 
8
8
  if TYPE_CHECKING:
@@ -1,8 +1,8 @@
1
+ import aiofiles
2
+
1
3
  from pathlib import Path
2
4
  from typing import List, TYPE_CHECKING
3
5
 
4
- import aiofiles
5
-
6
6
  from ..response import Response
7
7
 
8
8
  if TYPE_CHECKING:
@@ -1,9 +1,6 @@
1
- import mimetypes
2
- import pathlib
1
+ import mimetypes, pathlib, aiofiles
3
2
  from typing import Dict, List, Optional, TYPE_CHECKING, Union
4
3
 
5
- import aiofiles
6
-
7
4
  from ..response import Response
8
5
 
9
6
  if TYPE_CHECKING:
@@ -18,6 +15,8 @@ class Sending:
18
15
  self,
19
16
  chatId: str,
20
17
  message: str,
18
+ typingTime: Optional[int] = None,
19
+ typingType: Optional[str] = None,
21
20
  ) -> Response:
22
21
  """
23
22
  The method is aimed for sending a text message to a personal or
@@ -39,6 +38,8 @@ class Sending:
39
38
  self,
40
39
  chatId: str,
41
40
  message: str,
41
+ typingTime: Optional[int] = None,
42
+ typingType: Optional[str] = None,
42
43
  ) -> Response:
43
44
  request_body = self.__handle_parameters(locals())
44
45
 
@@ -54,6 +55,8 @@ class Sending:
54
55
  path: str,
55
56
  fileName: Optional[str] = None,
56
57
  caption: Optional[str] = None,
58
+ typingTime: Optional[int] = None,
59
+ typingType: Optional[str] = None,
57
60
  ) -> Response:
58
61
  """
59
62
  The method is aimed for sending a file uploaded by form
@@ -84,6 +87,8 @@ class Sending:
84
87
  path: str,
85
88
  fileName: Optional[str] = None,
86
89
  caption: Optional[str] = None,
90
+ typingTime: Optional[int] = None,
91
+ typingType: Optional[str] = None,
87
92
  ) -> Response:
88
93
  request_body = self.__handle_parameters(locals())
89
94
 
@@ -109,6 +114,8 @@ class Sending:
109
114
  urlFile: str,
110
115
  fileName: str,
111
116
  caption: Optional[str] = None,
117
+ typingTime: Optional[int] = None,
118
+ typingType: Optional[str] = None,
112
119
  ) -> Response:
113
120
  """
114
121
  The method is aimed for sending a file uploaded by URL.
@@ -131,6 +138,8 @@ class Sending:
131
138
  urlFile: str,
132
139
  fileName: str,
133
140
  caption: Optional[str] = None,
141
+ typingTime: Optional[int] = None,
142
+ typingType: Optional[str] = None,
134
143
  ) -> Response:
135
144
  request_body = self.__handle_parameters(locals())
136
145
 
@@ -184,6 +193,8 @@ class Sending:
184
193
  chatId: str,
185
194
  latitude: float,
186
195
  longitude: float,
196
+ typingTime: Optional[int] = None,
197
+ typingType: Optional[str] = None,
187
198
  ) -> Response:
188
199
  """
189
200
  The method is aimed for sending location message.
@@ -205,6 +216,8 @@ class Sending:
205
216
  chatId: str,
206
217
  latitude: float,
207
218
  longitude: float,
219
+ typingTime: Optional[int] = None,
220
+ typingType: Optional[str] = None,
208
221
  ) -> Response:
209
222
  request_body = self.__handle_parameters(locals())
210
223
 
@@ -218,6 +231,8 @@ class Sending:
218
231
  self,
219
232
  chatId: str,
220
233
  contact: Dict[str, Union[int, str]],
234
+ typingTime: Optional[int] = None,
235
+ typingType: Optional[str] = None,
221
236
  ) -> Response:
222
237
  """
223
238
  The method is aimed for sending a contact message.
@@ -238,6 +253,8 @@ class Sending:
238
253
  self,
239
254
  chatId: str,
240
255
  contact: Dict[str, Union[int, str]],
256
+ typingTime: Optional[int] = None,
257
+ typingType: Optional[str] = None,
241
258
  ) -> Response:
242
259
  request_body = self.__handle_parameters(locals())
243
260
 
@@ -254,7 +271,9 @@ class Sending:
254
271
  message: str,
255
272
  options: List[Dict[str, str]],
256
273
  multipleAnswers: Optional[bool] = None,
257
- isAnonymous: Optional[bool] = None
274
+ isAnonymous: Optional[bool] = None,
275
+ typingTime: Optional[int] = None,
276
+ typingType: Optional[str] = None,
258
277
  ) -> Response:
259
278
  """
260
279
  This method is intended for sending messages with a poll to a
@@ -278,7 +297,9 @@ class Sending:
278
297
  message: str,
279
298
  options: List[Dict[str, str]],
280
299
  multipleAnswers: Optional[bool] = None,
281
- isAnonymous: Optional[bool] = None
300
+ isAnonymous: Optional[bool] = None,
301
+ typingTime: Optional[int] = None,
302
+ typingType: Optional[str] = None,
282
303
  ) -> Response:
283
304
  request_body = self.__handle_parameters(locals())
284
305
 
@@ -1,5 +1,4 @@
1
- import asyncio
2
- import logging
1
+ import asyncio, logging
3
2
  from typing import Any, Callable, Optional, TYPE_CHECKING
4
3
 
5
4
  if TYPE_CHECKING:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: telegram-api-client-python
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: This library helps you easily create a Python application with telegram API.
5
5
  Home-page: https://github.com/green-api/telegram-api-client-python
6
6
  Author: GREEN API
@@ -91,7 +91,7 @@ python -m pip install telegram-api-client-python
91
91
  ## Import
92
92
 
93
93
  ```
94
- from telegram-api-client-python import API
94
+ from telegram_api_client_python import API
95
95
  ```
96
96
 
97
97
  ## Examples
@@ -0,0 +1,23 @@
1
+ LICENSE
2
+ README.md
3
+ setup.py
4
+ telegram_api_client_python/API.py
5
+ telegram_api_client_python/__init__.py
6
+ telegram_api_client_python/response.py
7
+ telegram_api_client_python.egg-info/PKG-INFO
8
+ telegram_api_client_python.egg-info/SOURCES.txt
9
+ telegram_api_client_python.egg-info/dependency_links.txt
10
+ telegram_api_client_python.egg-info/requires.txt
11
+ telegram_api_client_python.egg-info/top_level.txt
12
+ telegram_api_client_python/tools/__init__.py
13
+ telegram_api_client_python/tools/account.py
14
+ telegram_api_client_python/tools/groups.py
15
+ telegram_api_client_python/tools/journals.py
16
+ telegram_api_client_python/tools/marking.py
17
+ telegram_api_client_python/tools/partner.py
18
+ telegram_api_client_python/tools/queues.py
19
+ telegram_api_client_python/tools/receiving.py
20
+ telegram_api_client_python/tools/sending.py
21
+ telegram_api_client_python/tools/serviceMethods.py
22
+ telegram_api_client_python/tools/webhooks.py
23
+ tests/test_methods.py
@@ -0,0 +1 @@
1
+ telegram_api_client_python
@@ -2,8 +2,8 @@ import typing
2
2
  import unittest
3
3
  from unittest.mock import Mock, patch
4
4
 
5
- from telegram-api-client-python.API import GreenAPI
6
- from telegram-api-client-python.response import Response
5
+ from telegram_api_client_python.API import GreenAPI
6
+ from telegram_api_client_python.response import Response
7
7
 
8
8
  api = GreenAPI("", "")
9
9
 
@@ -11,7 +11,7 @@ path = "examples/data/logo.jpg"
11
11
 
12
12
 
13
13
  class MethodsTestCase(unittest.TestCase):
14
- @patch("telegram-api-client-python.API.Session.request")
14
+ @patch("telegram_api_client_python.API.Session.request")
15
15
  def test_methods(self, mock_request):
16
16
  mock_request.return_value = Mock(
17
17
  status_code=200, text="""{"example": {"key": "value"}}"""
@@ -1,23 +0,0 @@
1
- LICENSE
2
- README.md
3
- setup.py
4
- telegram-api-client-python/API.py
5
- telegram-api-client-python/__init__.py
6
- telegram-api-client-python/response.py
7
- telegram-api-client-python/tools/__init__.py
8
- telegram-api-client-python/tools/account.py
9
- telegram-api-client-python/tools/groups.py
10
- telegram-api-client-python/tools/journals.py
11
- telegram-api-client-python/tools/marking.py
12
- telegram-api-client-python/tools/partner.py
13
- telegram-api-client-python/tools/queues.py
14
- telegram-api-client-python/tools/receiving.py
15
- telegram-api-client-python/tools/sending.py
16
- telegram-api-client-python/tools/serviceMethods.py
17
- telegram-api-client-python/tools/webhooks.py
18
- telegram_api_client_python.egg-info/PKG-INFO
19
- telegram_api_client_python.egg-info/SOURCES.txt
20
- telegram_api_client_python.egg-info/dependency_links.txt
21
- telegram_api_client_python.egg-info/requires.txt
22
- telegram_api_client_python.egg-info/top_level.txt
23
- tests/test_methods.py
@@ -1 +0,0 @@
1
- telegram-api-client-python