Added the new field foursquare_type to the objects Venue, InlineQueryResultVenue and InputVenueMessageContent, and the parameter foursquare_type to the sendVenue method.

This commit is contained in:
Alex Root Junior 2018-07-29 03:08:33 +03:00
parent 8df8792f1c
commit a43e196d6d
3 changed files with 15 additions and 4 deletions

View file

@ -730,6 +730,7 @@ class Bot(BaseBot):
latitude: base.Float, longitude: base.Float,
title: base.String, address: base.String,
foursquare_id: typing.Union[base.String, None] = None,
foursquare_type: typing.Union[base.String, None] = None,
disable_notification: typing.Union[base.Boolean, None] = None,
reply_to_message_id: typing.Union[base.Integer, None] = None,
reply_markup: typing.Union[types.InlineKeyboardMarkup,
@ -753,6 +754,8 @@ class Bot(BaseBot):
:type address: :obj:`base.String`
:param foursquare_id: Foursquare identifier of the venue
:type foursquare_id: :obj:`typing.Union[base.String, None]`
:param foursquare_type: Foursquare type of the venue, if known.
:type foursquare_type: :obj:`typing.Union[base.String, None]`
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
:param reply_to_message_id: If the message is a reply, ID of the original message

View file

@ -405,6 +405,7 @@ class InlineQueryResultVenue(InlineQueryResult):
thumb_url: base.String = fields.Field()
thumb_width: base.Integer = fields.Field()
thumb_height: base.Integer = fields.Field()
foursquare_type: base.String = fields.Field()
def __init__(self, *,
id: base.String,
@ -417,12 +418,14 @@ class InlineQueryResultVenue(InlineQueryResult):
input_message_content: typing.Optional[InputMessageContent] = None,
thumb_url: typing.Optional[base.String] = None,
thumb_width: typing.Optional[base.Integer] = None,
thumb_height: typing.Optional[base.Integer] = None):
thumb_height: typing.Optional[base.Integer] = None,
foursquare_type: typing.Optional[base.String] = None):
super(InlineQueryResultVenue, self).__init__(id=id, latitude=latitude, longitude=longitude,
title=title, address=address, foursquare_id=foursquare_id,
reply_markup=reply_markup,
input_message_content=input_message_content, thumb_url=thumb_url,
thumb_width=thumb_width, thumb_height=thumb_height)
thumb_width=thumb_width, thumb_height=thumb_height,
foursquare_type=foursquare_type)
class InlineQueryResultContact(InlineQueryResult):
@ -446,6 +449,7 @@ class InlineQueryResultContact(InlineQueryResult):
thumb_url: base.String = fields.Field()
thumb_width: base.Integer = fields.Field()
thumb_height: base.Integer = fields.Field()
foursquare_type: base.String = fields.Field()
def __init__(self, *,
id: base.String,
@ -456,12 +460,14 @@ class InlineQueryResultContact(InlineQueryResult):
input_message_content: typing.Optional[InputMessageContent] = None,
thumb_url: typing.Optional[base.String] = None,
thumb_width: typing.Optional[base.Integer] = None,
thumb_height: typing.Optional[base.Integer] = None):
thumb_height: typing.Optional[base.Integer] = None,
foursquare_type: typing.Optional[base.String] = None):
super(InlineQueryResultContact, self).__init__(id=id, phone_number=phone_number,
first_name=first_name, last_name=last_name,
reply_markup=reply_markup,
input_message_content=input_message_content, thumb_url=thumb_url,
thumb_width=thumb_width, thumb_height=thumb_height)
thumb_width=thumb_width, thumb_height=thumb_height,
foursquare_type=foursquare_type)
class InlineQueryResultGame(InlineQueryResult):

View file

@ -13,3 +13,5 @@ class Venue(base.TelegramObject):
title: base.String = fields.Field()
address: base.String = fields.Field()
foursquare_id: base.String = fields.Field()
foursquare_type: base.String = fields.Field()