@@ -290,6 +290,36 @@ about its business.
290290
291291 Now the method returns the sent message
292292
293+ .. py :method :: send_venue(latitude, longitude, title, address, [foursquare=None , reply_to=None , extra=None , notify=True ])
294+
295+ Send a venue to the user. A venue is made of its geographic coordinates
296+ (latitude and longitude), its title and address, and optionally the
297+ venue's Foursquare ID, if you want to integrate with that. Users will
298+ then see the venue in the map, along with the information you provided.
299+
300+ You can use this, for example, if you want to recommend to your bot's
301+ users a place to go to dinner tonight:
302+
303+ .. code-block :: python
304+
305+ @bot.command (" whereshouldigo" )
306+ def whereshouldigo_command (chat , message , args ):
307+ message.sender.send(" Here there is an unique place to go to dinner tonight!" )
308+ message.sender.send_venue(35 , - 45 , " The Abyss" , " Atlantic Ocean" )
309+
310+ :param float latitude: The latitude of the venue
311+ :param float longitude: The longitude of the venue
312+ :param str title: The name of the venue
313+ :param str address: The address of the venue
314+ :param str foursquare: The Foursquare ID of the venue
315+ :param int reply_to: The ID of the :py:class: `~botogram.Message ` this one is replying to
316+ :param object extra: An extra reply interface object to attach
317+ :param bool notify: If you want to trigger a notification on the client
318+ :returns: The message you sent
319+ :rtype: ~botogram.Message
320+
321+ .. versionadded :: 0.3
322+
293323 .. py :method :: send_sticker(sticker, [reply_to=None , extra=None , notify=True ])
294324
295325 Send the sticker to the user (in webp format). If the sticker you're
@@ -791,6 +821,36 @@ about its business.
791821
792822 Now the method returns the sent message
793823
824+ .. py :method :: send_venue(latitude, longitude, title, address, [foursquare=None , reply_to=None , extra=None , notify=True ])
825+
826+ Send a venue to the chat. A venue is made of its geographic coordinates
827+ (latitude and longitude), its title and address, and optionally the
828+ venue's Foursquare ID, if you want to integrate with that. Users will
829+ then see the venue in the map, along with the information you provided.
830+
831+ You can use this, for example, if you want to recommend to your bot's
832+ users a place to go to dinner tonight:
833+
834+ .. code-block :: python
835+
836+ @bot.command (" whereshouldigo" )
837+ def whereshouldigo_command (chat , message , args ):
838+ chat.send(" Here there is an unique place to go to dinner tonight!" )
839+ chat.send_venue(35 , - 45 , " The Abyss" , " Atlantic Ocean" )
840+
841+ :param float latitude: The latitude of the venue
842+ :param float longitude: The longitude of the venue
843+ :param str title: The name of the venue
844+ :param str address: The address of the venue
845+ :param str foursquare: The Foursquare ID of the venue
846+ :param int reply_to: The ID of the :py:class: `~botogram.Message ` this one is replying to
847+ :param object extra: An extra reply interface object to attach
848+ :param bool notify: If you want to trigger a notification on the client
849+ :returns: The message you sent
850+ :rtype: ~botogram.Message
851+
852+ .. versionadded :: 0.3
853+
794854 .. py :method :: send_sticker(sticker, [reply_to=None , extra=None , notify=True ])
795855
796856 Send the sticker to the chat (in webp format). If the sticker you're
@@ -1083,6 +1143,13 @@ about its business.
10831143
10841144 *This attribute can be None if it's not provided by Telegram. *
10851145
1146+ .. py :attribute :: venue
1147+
1148+ If the user sent a :py:class: `~botogram.Venue ` with this message, the
1149+ attribute contains its representation.
1150+
1151+ *This attribute can be None if the message isn't a venue. *
1152+
10861153 .. py :attribute :: new_chat_member
10871154
10881155 A :py:class: `~botogram.User ` object representing a new member of a group
@@ -1421,6 +1488,36 @@ about its business.
14211488
14221489 Now the method returns the sent message
14231490
1491+ .. py :method :: reply_with_venue(latitude, longitude, title, address, [foursquare=None , extra=None , notify=True ])
1492+
1493+ Reply to this message with a venue. A venue is made of its geographic
1494+ coordinates (latitude and longitude), its title and address, and
1495+ optionally the venue's Foursquare ID, if you want to integrate with that.
1496+ Users will then see the venue in the map, along with the information you
1497+ provided.
1498+
1499+ You can use this, for example, if you want to recommend to your bot's
1500+ users a place to go to dinner tonight:
1501+
1502+ .. code-block :: python
1503+
1504+ @bot.command (" whereshouldigo" )
1505+ def whereshouldigo_command (chat , message , args ):
1506+ message.reply(" Here there is an unique place to go to dinner tonight!" )
1507+ message.reply_with_venue(35 , - 45 , " The Abyss" , " Atlantic Ocean" )
1508+
1509+ :param float latitude: The latitude of the venue
1510+ :param float longitude: The longitude of the venue
1511+ :param str title: The name of the venue
1512+ :param str address: The address of the venue
1513+ :param str foursquare: The Foursquare ID of the venue
1514+ :param object extra: An extra reply interface object to attach
1515+ :param bool notify: If you want to trigger a notification on the client
1516+ :returns: The message you sent
1517+ :rtype: ~botogram.Message
1518+
1519+ .. versionadded :: 0.3
1520+
14241521 .. py :method :: reply_with_sticker(sticker, [reply_to=None , extra=None , notify=True ])
14251522
14261523 Reply with the sticker (in webp format) to the chat. *extra * is an
@@ -1820,6 +1917,36 @@ about its business.
18201917 The float latitude as defined by the sender.
18211918
18221919
1920+ .. py :class :: botogram.Venue
1921+
1922+ This object represents a venue (a location with attached a title and an
1923+ address). A venue may also have a Foursquare ID attached.
1924+
1925+ .. py :attribute :: location
1926+
1927+ The :py:class: `~botogram.Location ` of the venue. You can use this to get
1928+ the exact geographic coordinates of the venue.
1929+
1930+ .. py :attribute :: title
1931+
1932+ The name of the venue. The value might not match the venue sometimes,
1933+ because it's supplied by the user/bot who sent the venue.
1934+
1935+ .. py :attribute :: address
1936+
1937+ The address of the venue. The value might not match the venue sometimes,
1938+ because it's supplied by the user/bot who sent the venue.
1939+
1940+ .. py :attribute :: foursquare
1941+
1942+ The ID of the venue on Foursquare. You can use this to get more
1943+ information about the venue from the Foursquare API. The ID might not
1944+ match the venue sometimes because it's supplied by the user/bot who sent
1945+ the venue.
1946+
1947+ *This value can be None if the venue doesn't have a Foursquare ID. *
1948+
1949+
18231950.. py :class :: botogram.Update
18241951
18251952 This class represents an update received by the bot. You should not need to
0 commit comments