@@ -612,12 +612,26 @@ def to_json(self):
612612
613613
614614class InlineQueryResultPhoto (JsonSerializable ):
615- def __init__ (self , id , photo_url , thumb_url , mime_type = None , photo_width = None , photo_height = None , title = None ,
615+ def __init__ (self , id , photo_url , thumb_url , photo_width = None , photo_height = None , title = None ,
616616 description = None , caption = None , message_text = None , parse_mode = None , disable_web_page_preview = None ):
617+ """
618+ Represents a link to a photo.
619+ :param id: Unique identifier for this result, 1-64 bytes
620+ :param photo_url: A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB
621+ :param thumb_url: URL of the thumbnail for the photo
622+ :param photo_width: Width of the photo.
623+ :param photo_height: Height of the photo.
624+ :param title: Title for the result.
625+ :param description: Short description of the result.
626+ :param caption: Caption of the photo to be sent, 0-200 characters.
627+ :param message_text: Text of a message to be sent instead of the photo, 1-512 characters.
628+ :param parse_mode: Send “Markdown”, if you want Telegram apps to show bold, italic and inline URLs in your bot's message.
629+ :param disable_web_page_preview: Disables link previews for links in the sent message.
630+ :return:
631+ """
617632 self .type = 'photo'
618633 self .id = id
619634 self .photo_url = photo_url
620- self .mime_type = mime_type
621635 self .photo_width = photo_width
622636 self .photo_height = photo_height
623637 self .thumb_url = thumb_url
@@ -630,8 +644,6 @@ def __init__(self, id, photo_url, thumb_url, mime_type=None, photo_width=None, p
630644
631645 def to_json (self ):
632646 json_dict = {'type' : self .type , 'id' : self .id , 'photo_url' : self .photo_url , 'thumb_url' : self .thumb_url }
633- if self .mime_type :
634- json_dict ['mime_type' ] = self .mime_type
635647 if self .photo_width :
636648 json_dict ['photo_width' ] = self .photo_width
637649 if self .photo_height :
@@ -654,6 +666,20 @@ def to_json(self):
654666class InlineQueryResultGif (JsonSerializable ):
655667 def __init__ (self , id , gif_url , thumb_url , gif_width = None , gif_height = None , title = None , caption = None ,
656668 message_text = None , parse_mode = None , disable_web_page_preview = None ):
669+ """
670+ Represents a link to an animated GIF file.
671+ :param id: Unique identifier for this result, 1-64 bytes.
672+ :param gif_url: A valid URL for the GIF file. File size must not exceed 1MB
673+ :param thumb_url: URL of the static thumbnail (jpeg or gif) for the result.
674+ :param gif_width: Width of the GIF.
675+ :param gif_height: Height of the GIF.
676+ :param title: Title for the result.
677+ :param caption: Caption of the GIF file to be sent, 0-200 characters
678+ :param message_text: Text of a message to be sent instead of the animation, 1-512 characters.
679+ :param parse_mode: Send “Markdown”, if you want Telegram apps to show bold, italic and inline URLs in your bot's message.
680+ :param disable_web_page_preview: Disables link previews for links in the sent message.
681+ :return:
682+ """
657683 self .type = 'gif'
658684 self .id = id
659685 self .gif_url = gif_url
0 commit comments