2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Initial docs for WebPage

This commit is contained in:
Mendel E 2019-07-02 10:46:08 -04:00
parent 9687ef2820
commit d363a18e84
3 changed files with 13 additions and 14 deletions

View File

@ -54,6 +54,7 @@ Messages & Media
- :class:`Venue` - :class:`Venue`
- :class:`Sticker` - :class:`Sticker`
- :class:`Game` - :class:`Game`
- :class:`WebPage`
- :class:`Poll` - :class:`Poll`
- :class:`PollOption` - :class:`PollOption`
@ -137,6 +138,7 @@ Details
.. autoclass:: Venue() .. autoclass:: Venue()
.. autoclass:: Sticker() .. autoclass:: Sticker()
.. autoclass:: Game() .. autoclass:: Game()
.. autoclass:: WebPage()
.. autoclass:: Poll() .. autoclass:: Poll()
.. autoclass:: PollOption() .. autoclass:: PollOption()

View File

@ -177,11 +177,8 @@ class Message(Object, Update):
venue (:obj:`Venue`, *optional*): venue (:obj:`Venue`, *optional*):
Message is a venue, information about the venue. Message is a venue, information about the venue.
web_page (``bool``, *optional*): web_page (:obj:`WebPage`, *optional*):
Message was sent with a webpage preview. Message was sent with a webpage preview.
**Note:** Support for web pages is still basic; a simple boolean is set in case the message contains a
web page preview. In future versions this property could turn into a full web page object that contains
more details.
poll (:obj:`Poll`, *optional*): poll (:obj:`Poll`, *optional*):
Message is a native poll, information about the poll. Message is a native poll, information about the poll.

View File

@ -36,10 +36,10 @@ class WebPage(Object):
Display URL for this webpage. Display URL for this webpage.
type (``str``, *optional*): type (``str``, *optional*):
Type of webpage, can be `article`, `photo`, `gif`, `video` or `document` afaik. #TODO Type of webpage preview, known types (at the time of writing) are `article`, `photo`, `gif`, `video` and `document`.
site_name (``str``, *optional*): site_name (``str``, *optional*):
Site name. Webpage site name.
title (``str``, *optional*): title (``str``, *optional*):
Title of this webpage. Title of this webpage.
@ -48,25 +48,25 @@ class WebPage(Object):
Description of this webpage. Description of this webpage.
audio (:obj:`Audio`, *optional*): audio (:obj:`Audio`, *optional*):
Webpage is an audio file, information about the file. Webpage preview is an audio file, information about the file.
document (:obj:`Document`, *optional*): document (:obj:`Document`, *optional*):
Webpage is a general file, information about the file. Webpage preview is a general file, information about the file.
photo (:obj:`Photo`, *optional*): photo (:obj:`Photo`, *optional*):
Webpage is a photo, information about the photo. Webpage preview is a photo, information about the photo.
animation (:obj:`Animation`, *optional*): animation (:obj:`Animation`, *optional*):
Webpage is an animation, information about the animation. Webpage preview is an animation, information about the animation.
video (:obj:`Video`, *optional*): video (:obj:`Video`, *optional*):
Webpage is a video, information about the video.abs Webpage preview is a video, information about the video.
embed_url (``str``, *optional*): embed_url (``str``, *optional*):
Embedded content URL. Embedded content URL.
embed_type (``str``, *optional*): embed_type (``str``, *optional*):
Embedded content type, can be `iframe` #TODO Embedded content type, like `iframe`
embed_width (``int``, *optional*): embed_width (``int``, *optional*):
Embedded content width. Embedded content width.
@ -75,10 +75,10 @@ class WebPage(Object):
Embedded content height. Embedded content height.
duration (``int``, *optional*): duration (``int``, *optional*):
:shrug: Uknown at the time of writing.
author (``str``, *optional*): author (``str``, *optional*):
Author of the webpage, eg the Twitter user. Author of the webpage, eg the Twitter user for a tweet, or the author in an article.
""" """
__slots__ = [ __slots__ = [