multibotkit 0.1.32__tar.gz → 0.1.34__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 (44) hide show
  1. {multibotkit-0.1.32 → multibotkit-0.1.34}/PKG-INFO +1 -1
  2. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/helpers/telegram.py +27 -25
  3. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/telegram/outgoing.py +6 -0
  4. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit.egg-info/PKG-INFO +1 -1
  5. {multibotkit-0.1.32 → multibotkit-0.1.34}/setup.py +1 -1
  6. {multibotkit-0.1.32 → multibotkit-0.1.34}/LICENSE +0 -0
  7. {multibotkit-0.1.32 → multibotkit-0.1.34}/README.md +0 -0
  8. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/__init__.py +0 -0
  9. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/dispatchers/__init__.py +0 -0
  10. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/dispatchers/base_dispatcher.py +0 -0
  11. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/dispatchers/fb.py +0 -0
  12. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/dispatchers/telegram.py +0 -0
  13. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/dispatchers/viber.py +0 -0
  14. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/dispatchers/vk.py +0 -0
  15. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/helpers/__init__.py +0 -0
  16. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/helpers/base_helper.py +0 -0
  17. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/helpers/fb.py +0 -0
  18. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/helpers/viber.py +0 -0
  19. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/helpers/vk.py +0 -0
  20. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/__init__.py +0 -0
  21. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/fb/__init__.py +0 -0
  22. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/fb/incoming.py +0 -0
  23. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/fb/outgoing.py +0 -0
  24. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/telegram/__init__.py +0 -0
  25. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/telegram/incoming.py +0 -0
  26. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/viber/__init__.py +0 -0
  27. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/viber/incoming.py +0 -0
  28. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/viber/outgoing.py +0 -0
  29. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/vk/__init__.py +0 -0
  30. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/vk/incoming.py +0 -0
  31. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/schemas/vk/outgoing.py +0 -0
  32. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/states/__init__.py +0 -0
  33. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/states/managers/__init__.py +0 -0
  34. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/states/managers/base.py +0 -0
  35. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/states/managers/memory.py +0 -0
  36. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/states/managers/mongo.py +0 -0
  37. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/states/managers/redis.py +0 -0
  38. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit/states/state.py +0 -0
  39. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit.egg-info/SOURCES.txt +0 -0
  40. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit.egg-info/dependency_links.txt +0 -0
  41. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit.egg-info/requires.txt +0 -0
  42. {multibotkit-0.1.32 → multibotkit-0.1.34}/multibotkit.egg-info/top_level.txt +0 -0
  43. {multibotkit-0.1.32 → multibotkit-0.1.34}/pyproject.toml +0 -0
  44. {multibotkit-0.1.32 → multibotkit-0.1.34}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.32
3
+ Version: 0.1.34
4
4
  Summary: Functional library for developing multiplatform chatbots
5
5
  Home-page: https://github.com/Appvelox/multibotkit
6
6
  Author: Appvelox LLC
@@ -31,7 +31,9 @@ from multibotkit.schemas.telegram.outgoing import (
31
31
  Location,
32
32
  DeleteWebhookParams,
33
33
  DeleteMessage,
34
- CopyMessage, BotCommand, SetMyCommands,
34
+ CopyMessage,
35
+ BotCommand,
36
+ SetMyCommands,
35
37
  )
36
38
 
37
39
 
@@ -58,16 +60,30 @@ class TelegramHelper(BaseHelper):
58
60
  return WebhookInfo(**r["result"])
59
61
  return None
60
62
 
61
- def sync_set_webhook(self, webhook_url: str):
63
+ def sync_set_webhook(
64
+ self,
65
+ webhook_url: str,
66
+ allowed_updates: Optional[List[str]] = None,
67
+ secret_token: Optional[str] = False,
68
+ ):
62
69
  url = self.tg_base_url + "setWebhook"
63
- params = SetWebhookParams(url=webhook_url)
70
+ params = SetWebhookParams(
71
+ url=webhook_url, allowed_updates=allowed_updates, secret_token=secret_token
72
+ )
64
73
  data = params.dict(exclude_none=True)
65
74
  r = self._perform_sync_request(url, data)
66
75
  return r
67
76
 
68
- async def async_set_webhook(self, webhook_url: str):
77
+ async def async_set_webhook(
78
+ self,
79
+ webhook_url: str,
80
+ allowed_updates: Optional[List[str]] = None,
81
+ secret_token: Optional[str] = False,
82
+ ):
69
83
  url = self.tg_base_url + "setWebhook"
70
- params = SetWebhookParams(url=webhook_url)
84
+ params = SetWebhookParams(
85
+ url=webhook_url, allowed_updates=allowed_updates, secret_token=secret_token
86
+ )
71
87
  data = params.dict(exclude_none=True)
72
88
  r = await self._perform_async_request(url, data)
73
89
  return r
@@ -1813,38 +1829,24 @@ class TelegramHelper(BaseHelper):
1813
1829
  r = await self._perform_async_request(url, data)
1814
1830
  return r
1815
1831
 
1816
- def sync_set_my_commands(
1817
- self,
1818
- commands: List[Tuple[str, str]]
1819
- ):
1832
+ def sync_set_my_commands(self, commands: List[Tuple[str, str]]):
1820
1833
  url = self.tg_base_url + "setMyCommands"
1821
1834
  commands_list = []
1822
1835
  for command, description in commands:
1823
- commands_list.append(
1824
- BotCommand(command=command, description=description)
1825
- )
1836
+ commands_list.append(BotCommand(command=command, description=description))
1826
1837
 
1827
- set_my_commands = SetMyCommands(
1828
- commands=commands_list
1829
- )
1838
+ set_my_commands = SetMyCommands(commands=commands_list)
1830
1839
 
1831
1840
  r = self._perform_sync_request(url, set_my_commands.dict())
1832
1841
  return r
1833
1842
 
1834
- async def async_set_my_commands(
1835
- self,
1836
- commands: List[Tuple[str, str]]
1837
- ):
1843
+ async def async_set_my_commands(self, commands: List[Tuple[str, str]]):
1838
1844
  url = self.tg_base_url + "setMyCommands"
1839
1845
  commands_list = []
1840
1846
  for command, description in commands:
1841
- commands_list.append(
1842
- BotCommand(command=command, description=description)
1843
- )
1847
+ commands_list.append(BotCommand(command=command, description=description))
1844
1848
 
1845
- set_my_commands = SetMyCommands(
1846
- commands=commands_list
1847
- )
1849
+ set_my_commands = SetMyCommands(commands=commands_list)
1848
1850
 
1849
1851
  r = await self._perform_async_request(url, set_my_commands.dict())
1850
1852
  return r
@@ -30,6 +30,12 @@ Please note that this parameter doesn't affect updates \
30
30
  created before the call to the setWebhook, so unwanted \
31
31
  updates may be received for a short period of time.",
32
32
  )
33
+ secret_token: Optional[str] = Field(
34
+ None,
35
+ title="A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256"
36
+ " characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the"
37
+ " request comes from a webhook set by you.",
38
+ )
33
39
 
34
40
 
35
41
  class DeleteWebhookParams(BaseModel):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.32
3
+ Version: 0.1.34
4
4
  Summary: Functional library for developing multiplatform chatbots
5
5
  Home-page: https://github.com/Appvelox/multibotkit
6
6
  Author: Appvelox LLC
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="multibotkit",
8
- version="0.1.32",
8
+ version="0.1.34",
9
9
  author="Appvelox LLC",
10
10
  author_email="team@appvelox.ru",
11
11
  description="Functional library for developing multiplatform chatbots",
File without changes
File without changes
File without changes