multibotkit 0.1.14__tar.gz → 0.1.16__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.14 → multibotkit-0.1.16}/PKG-INFO +1 -1
  2. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/helpers/telegram.py +43 -1
  3. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/telegram/incoming.py +15 -0
  4. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/telegram/outgoing.py +18 -0
  5. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit.egg-info/PKG-INFO +1 -1
  6. {multibotkit-0.1.14 → multibotkit-0.1.16}/setup.py +1 -1
  7. {multibotkit-0.1.14 → multibotkit-0.1.16}/LICENSE +0 -0
  8. {multibotkit-0.1.14 → multibotkit-0.1.16}/README.md +0 -0
  9. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/__init__.py +0 -0
  10. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/dispatchers/__init__.py +0 -0
  11. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/dispatchers/base_dispatcher.py +0 -0
  12. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/dispatchers/fb.py +0 -0
  13. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/dispatchers/telegram.py +0 -0
  14. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/dispatchers/viber.py +0 -0
  15. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/dispatchers/vk.py +0 -0
  16. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/helpers/__init__.py +0 -0
  17. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/helpers/base_helper.py +0 -0
  18. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/helpers/fb.py +0 -0
  19. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/helpers/viber.py +0 -0
  20. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/helpers/vk.py +0 -0
  21. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/__init__.py +0 -0
  22. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/fb/__init__.py +0 -0
  23. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/fb/incoming.py +0 -0
  24. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/fb/outgoing.py +0 -0
  25. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/telegram/__init__.py +0 -0
  26. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/viber/__init__.py +0 -0
  27. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/viber/incoming.py +0 -0
  28. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/viber/outgoing.py +0 -0
  29. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/vk/__init__.py +0 -0
  30. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/vk/incoming.py +0 -0
  31. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/schemas/vk/outgoing.py +0 -0
  32. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/states/__init__.py +0 -0
  33. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/states/managers/__init__.py +0 -0
  34. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/states/managers/base.py +0 -0
  35. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/states/managers/memory.py +0 -0
  36. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/states/managers/mongo.py +0 -0
  37. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/states/managers/redis.py +0 -0
  38. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit/states/state.py +0 -0
  39. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit.egg-info/SOURCES.txt +0 -0
  40. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit.egg-info/dependency_links.txt +0 -0
  41. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit.egg-info/requires.txt +0 -0
  42. {multibotkit-0.1.14 → multibotkit-0.1.16}/multibotkit.egg-info/top_level.txt +0 -0
  43. {multibotkit-0.1.14 → multibotkit-0.1.16}/pyproject.toml +0 -0
  44. {multibotkit-0.1.14 → multibotkit-0.1.16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.14
3
+ Version: 0.1.16
4
4
  Summary: Functional library for developing multiplatform chatbots
5
5
  Home-page: https://github.com/Appvelox/multibotkit
6
6
  Author: Appvelox LLC
@@ -26,7 +26,9 @@ from multibotkit.schemas.telegram.outgoing import (
26
26
  WebhookInfo,
27
27
  MediaGroup,
28
28
  ReplyKeyboardRemove,
29
- Sticker, Video,
29
+ Sticker,
30
+ Video,
31
+ Location,
30
32
  )
31
33
 
32
34
 
@@ -67,6 +69,46 @@ class TelegramHelper(BaseHelper):
67
69
  r = await self._perform_async_request(url, data)
68
70
  return r
69
71
 
72
+ def sync_send_locations(
73
+ self,
74
+ chat_id: int,
75
+ latitude: float,
76
+ longitude: float,
77
+ reply_markup: Optional[
78
+ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove]
79
+ ] = None,
80
+ ):
81
+ url = self.tg_base_url + "sendLocation"
82
+ params = Location(
83
+ chat_id=chat_id,
84
+ latitude=latitude,
85
+ longitude=longitude,
86
+ reply_markup=reply_markup,
87
+ )
88
+ data = params.dict(exclude_none=True)
89
+ r = self._perform_sync_request(url, data)
90
+ return r
91
+
92
+ async def async_send_locations(
93
+ self,
94
+ chat_id: int,
95
+ latitude: float,
96
+ longitude: float,
97
+ reply_markup: Optional[
98
+ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove]
99
+ ] = None,
100
+ ):
101
+ url = self.tg_base_url + "sendLocation"
102
+ params = Location(
103
+ chat_id=chat_id,
104
+ latitude=latitude,
105
+ longitude=longitude,
106
+ reply_markup=reply_markup,
107
+ )
108
+ data = params.dict(exclude_none=True)
109
+ r = await self._perform_async_request(url, data)
110
+ return r
111
+
70
112
  def sync_send_message(
71
113
  self,
72
114
  chat_id: int,
@@ -224,6 +224,18 @@ class User(BaseModel):
224
224
  )
225
225
 
226
226
 
227
+ class WebAppData(BaseModel):
228
+ data: str = Field(
229
+ ...,
230
+ title="The data. Be aware that a bad client can send arbitrary data in this field.",
231
+ )
232
+ button_text: str = Field(
233
+ ...,
234
+ title="Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can "
235
+ "send arbitrary data in this field.",
236
+ )
237
+
238
+
227
239
  class Message(BaseModel):
228
240
  message_id: int = Field(..., title="Unique message identifier inside this chat")
229
241
  date: int = Field(..., title="Date the message was sent in Unix time")
@@ -268,6 +280,9 @@ video message",
268
280
  title="Message is a shared location, information about \
269
281
  the location",
270
282
  )
283
+ web_app_data: Optional[WebAppData] = Field(
284
+ None, title="Service message: data sent by a Web App"
285
+ )
271
286
 
272
287
  class Config:
273
288
  fields = {"from_": "from"}
@@ -84,6 +84,12 @@ Array of InlineKeyboardButton objects",
84
84
  )
85
85
 
86
86
 
87
+ class WebAppInfo(BaseModel):
88
+ url: str = Field(
89
+ ..., title="HTTP url of WebApp to be started when button is pressed"
90
+ )
91
+
92
+
87
93
  class KeyboardButton(BaseModel):
88
94
  text: str = Field(..., title="Text of the button")
89
95
  request_contact: Optional[bool] = Field(
@@ -96,6 +102,9 @@ contact when the button is pressed",
96
102
  title="If True, the user's current location will be sent \
97
103
  when the button is pressed",
98
104
  )
105
+ web_app: Optional[WebAppInfo] = Field(
106
+ None, title="Info about WebApp to be started when button is pressed"
107
+ )
99
108
 
100
109
 
101
110
  class ReplyKeyboardMarkup(BaseModel):
@@ -124,6 +133,15 @@ class ReplyKeyboardRemove(BaseModel):
124
133
  remove_keyboard: bool = Field(True, title="Remove reply keyboard")
125
134
 
126
135
 
136
+ class Location(BaseModel):
137
+ chat_id: int = Field(..., title="Unique identifier for the chat")
138
+ latitude: float = Field(..., title="Latitude of the location")
139
+ longitude: float = Field(..., title="Longitude of the location")
140
+ reply_markup: Optional[
141
+ Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove]
142
+ ] = Field(None, title="Inline or Reply keyboard attached to the message")
143
+
144
+
127
145
  class Message(BaseModel):
128
146
  chat_id: int = Field(..., title="Unique identifier for the chat")
129
147
  text: str = Field(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: multibotkit
3
- Version: 0.1.14
3
+ Version: 0.1.16
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.14",
8
+ version="0.1.16",
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