mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Initial docs for WebPage
This commit is contained in:
parent
9687ef2820
commit
d363a18e84
@ -54,6 +54,7 @@ Messages & Media
|
||||
- :class:`Venue`
|
||||
- :class:`Sticker`
|
||||
- :class:`Game`
|
||||
- :class:`WebPage`
|
||||
- :class:`Poll`
|
||||
- :class:`PollOption`
|
||||
|
||||
@ -137,6 +138,7 @@ Details
|
||||
.. autoclass:: Venue()
|
||||
.. autoclass:: Sticker()
|
||||
.. autoclass:: Game()
|
||||
.. autoclass:: WebPage()
|
||||
.. autoclass:: Poll()
|
||||
.. autoclass:: PollOption()
|
||||
|
||||
|
@ -177,11 +177,8 @@ class Message(Object, Update):
|
||||
venue (:obj:`Venue`, *optional*):
|
||||
Message is a venue, information about the venue.
|
||||
|
||||
web_page (``bool``, *optional*):
|
||||
web_page (:obj:`WebPage`, *optional*):
|
||||
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*):
|
||||
Message is a native poll, information about the poll.
|
||||
|
@ -36,10 +36,10 @@ class WebPage(Object):
|
||||
Display URL for this webpage.
|
||||
|
||||
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.
|
||||
Webpage site name.
|
||||
|
||||
title (``str``, *optional*):
|
||||
Title of this webpage.
|
||||
@ -48,25 +48,25 @@ class WebPage(Object):
|
||||
Description of this webpage.
|
||||
|
||||
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*):
|
||||
Webpage is a general file, information about the file.
|
||||
Webpage preview is a general file, information about the file.
|
||||
|
||||
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*):
|
||||
Webpage is an animation, information about the animation.
|
||||
Webpage preview is an animation, information about the animation.
|
||||
|
||||
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*):
|
||||
Embedded content URL.
|
||||
|
||||
embed_type (``str``, *optional*):
|
||||
Embedded content type, can be `iframe` #TODO
|
||||
Embedded content type, like `iframe`
|
||||
|
||||
embed_width (``int``, *optional*):
|
||||
Embedded content width.
|
||||
@ -75,10 +75,10 @@ class WebPage(Object):
|
||||
Embedded content height.
|
||||
|
||||
duration (``int``, *optional*):
|
||||
:shrug:
|
||||
Uknown at the time of writing.
|
||||
|
||||
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__ = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user