multibotkit 0.1.33__py3-none-any.whl → 0.1.34__py3-none-any.whl

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.
@@ -61,19 +61,29 @@ class TelegramHelper(BaseHelper):
61
61
  return None
62
62
 
63
63
  def sync_set_webhook(
64
- self, webhook_url: str, allowed_updates: Optional[List[str]] = None
64
+ self,
65
+ webhook_url: str,
66
+ allowed_updates: Optional[List[str]] = None,
67
+ secret_token: Optional[str] = False,
65
68
  ):
66
69
  url = self.tg_base_url + "setWebhook"
67
- params = SetWebhookParams(url=webhook_url, allowed_updates=allowed_updates)
70
+ params = SetWebhookParams(
71
+ url=webhook_url, allowed_updates=allowed_updates, secret_token=secret_token
72
+ )
68
73
  data = params.dict(exclude_none=True)
69
74
  r = self._perform_sync_request(url, data)
70
75
  return r
71
76
 
72
77
  async def async_set_webhook(
73
- self, webhook_url: str, allowed_updates: Optional[List[str]] = None
78
+ self,
79
+ webhook_url: str,
80
+ allowed_updates: Optional[List[str]] = None,
81
+ secret_token: Optional[str] = False,
74
82
  ):
75
83
  url = self.tg_base_url + "setWebhook"
76
- params = SetWebhookParams(url=webhook_url, allowed_updates=allowed_updates)
84
+ params = SetWebhookParams(
85
+ url=webhook_url, allowed_updates=allowed_updates, secret_token=secret_token
86
+ )
77
87
  data = params.dict(exclude_none=True)
78
88
  r = await self._perform_async_request(url, data)
79
89
  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.33
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
@@ -8,7 +8,7 @@ multibotkit/dispatchers/vk.py,sha256=EsFOL2g3ju-nhsdyRY4JBTJxqQPmaPAB7Mkn462s4tk
8
8
  multibotkit/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  multibotkit/helpers/base_helper.py,sha256=b4vlmwELwGUIJE0DvD2Lkk0LO-b-w0VWAnEnnYawOKQ,1462
10
10
  multibotkit/helpers/fb.py,sha256=Z2Vo6A_fepVBQNcWCeelmH72zf_eKyXOXheUIlaIiBI,4329
11
- multibotkit/helpers/telegram.py,sha256=wZ9JN2fDV4wYZXK9rqe9DqGfB2DRa1Ga42m8z_s6hUs,67354
11
+ multibotkit/helpers/telegram.py,sha256=iZjSM_-zLVyuy1i2r9tevdvZexx7Lsqc4cBxUnjk8-k,67576
12
12
  multibotkit/helpers/viber.py,sha256=74UQ3RtHS3iR8qA5XVeMOYfXaaMq2pF0cpItwehdr4o,9246
13
13
  multibotkit/helpers/vk.py,sha256=QlI9rGEjhzqS-jcFrnZJ651lDbC4m33SSHAC1zWDyUU,5930
14
14
  multibotkit/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -17,7 +17,7 @@ multibotkit/schemas/fb/incoming.py,sha256=sp4CeQohaDMOxz113dNxJDv_fSaGW5i8qzVS7F
17
17
  multibotkit/schemas/fb/outgoing.py,sha256=Qm0gPHHipAolXpnOJC4J4bfYjQEWpX54vYygSwKtIV4,8036
18
18
  multibotkit/schemas/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  multibotkit/schemas/telegram/incoming.py,sha256=gD5i5NdIwTDLXEYBMNBCNCthNOKnFXghRTd81SKuPb4,15345
20
- multibotkit/schemas/telegram/outgoing.py,sha256=YeAvTkmBYJrRK46pZwYdF74SlyRqJgKDxU-WKnewYCE,13194
20
+ multibotkit/schemas/telegram/outgoing.py,sha256=5koNY9GXmYdnlJDzbvZ0UCPB_gfmodBDq1subS9awqc,13559
21
21
  multibotkit/schemas/viber/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  multibotkit/schemas/viber/incoming.py,sha256=0sS9g-NmQFl_uoVz8pkbQ9zdNsXvGE52KxmzADoFIRM,4193
23
23
  multibotkit/schemas/viber/outgoing.py,sha256=KI73IX-aawtAx3ejW2Hx0ivXBYuMVudUxhwyp1wv6rc,8252
@@ -31,8 +31,8 @@ multibotkit/states/managers/base.py,sha256=KOO-wtbj984-lLq6u6LhxR79NTftQV2c5uUG6
31
31
  multibotkit/states/managers/memory.py,sha256=uN064uj2Q0ivK9LGEHJFaaaG6FEyXkIajS87TCAuYsI,1328
32
32
  multibotkit/states/managers/mongo.py,sha256=K8upbLT0892YA2Qi9dDPXDP5jvQoS16T8FW-qapv1Xk,1927
33
33
  multibotkit/states/managers/redis.py,sha256=XMpQ8LUdO9mZq3cZXlYOcGCC0VsSbsxBsEzVFH7TeEM,1681
34
- multibotkit-0.1.33.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
- multibotkit-0.1.33.dist-info/METADATA,sha256=TMpmpoFeRVJDpR9pTR4O7YliKP7o9SRTqAD1MVhRXFw,826
36
- multibotkit-0.1.33.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
37
- multibotkit-0.1.33.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
- multibotkit-0.1.33.dist-info/RECORD,,
34
+ multibotkit-0.1.34.dist-info/LICENSE,sha256=3iCLdX93Z5F6PpDqN6q7wufsBixXuTAYwgzntBQjYBQ,1069
35
+ multibotkit-0.1.34.dist-info/METADATA,sha256=0hQsufSluSi8vixOwQTarPHd9juqmM4TmjxC-mWE050,826
36
+ multibotkit-0.1.34.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
37
+ multibotkit-0.1.34.dist-info/top_level.txt,sha256=Meo5tTNdc5pf6_qwW6x4Cqz5iJJlXFqUDMti96pzV2I,12
38
+ multibotkit-0.1.34.dist-info/RECORD,,