mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Move force_large_media, force_small_media, manual fields closer to each other
This commit is contained in:
parent
020ce7e6fc
commit
1535d4a61c
@ -36,9 +36,6 @@ class WebPage(Object):
|
|||||||
display_url (``str``):
|
display_url (``str``):
|
||||||
Display URL for this webpage.
|
Display URL for this webpage.
|
||||||
|
|
||||||
has_large_media (``bool``, *optional*):
|
|
||||||
Whether the webpage preview is large.
|
|
||||||
|
|
||||||
type (``str``, *optional*):
|
type (``str``, *optional*):
|
||||||
Type of webpage preview, known types (at the time of writing) are:
|
Type of webpage preview, known types (at the time of writing) are:
|
||||||
*"article"*, *"photo"*, *"gif"*, *"video"* and *"document"*,
|
*"article"*, *"photo"*, *"gif"*, *"video"* and *"document"*,
|
||||||
@ -80,11 +77,8 @@ class WebPage(Object):
|
|||||||
embed_height (``int``, *optional*):
|
embed_height (``int``, *optional*):
|
||||||
Embedded content height.
|
Embedded content height.
|
||||||
|
|
||||||
duration (``int``, *optional*):
|
has_large_media (``bool``, *optional*):
|
||||||
Unknown at the time of writing.
|
Whether the webpage preview is large.
|
||||||
|
|
||||||
author (``str``, *optional*):
|
|
||||||
Author of the webpage, eg the Twitter user for a tweet, or the author in an article.
|
|
||||||
|
|
||||||
force_large_media (``bool``, *optional*):
|
force_large_media (``bool``, *optional*):
|
||||||
Request the client to enlarge the webpage preview.
|
Request the client to enlarge the webpage preview.
|
||||||
@ -94,6 +88,12 @@ class WebPage(Object):
|
|||||||
|
|
||||||
manual (``bool``, *optional*):
|
manual (``bool``, *optional*):
|
||||||
Whether the webpage preview was changed by the user.
|
Whether the webpage preview was changed by the user.
|
||||||
|
|
||||||
|
duration (``int``, *optional*):
|
||||||
|
Unknown at the time of writing.
|
||||||
|
|
||||||
|
author (``str``, *optional*):
|
||||||
|
Author of the webpage, eg the Twitter user for a tweet, or the author in an article.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -103,7 +103,6 @@ class WebPage(Object):
|
|||||||
id: str,
|
id: str,
|
||||||
url: str,
|
url: str,
|
||||||
display_url: str,
|
display_url: str,
|
||||||
has_large_media: bool = None,
|
|
||||||
type: str = None,
|
type: str = None,
|
||||||
site_name: str = None,
|
site_name: str = None,
|
||||||
title: str = None,
|
title: str = None,
|
||||||
@ -117,18 +116,18 @@ class WebPage(Object):
|
|||||||
embed_type: str = None,
|
embed_type: str = None,
|
||||||
embed_width: int = None,
|
embed_width: int = None,
|
||||||
embed_height: int = None,
|
embed_height: int = None,
|
||||||
duration: int = None,
|
has_large_media: bool = None,
|
||||||
author: str = None,
|
|
||||||
force_large_media: bool = None,
|
force_large_media: bool = None,
|
||||||
force_small_media: bool = None,
|
force_small_media: bool = None,
|
||||||
manual: bool = None
|
manual: bool = None,
|
||||||
|
duration: int = None,
|
||||||
|
author: str = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
self.id = id
|
self.id = id
|
||||||
self.url = url
|
self.url = url
|
||||||
self.display_url = display_url
|
self.display_url = display_url
|
||||||
self.has_large_media = has_large_media
|
|
||||||
self.type = type
|
self.type = type
|
||||||
self.site_name = site_name
|
self.site_name = site_name
|
||||||
self.title = title
|
self.title = title
|
||||||
@ -142,11 +141,12 @@ class WebPage(Object):
|
|||||||
self.embed_type = embed_type
|
self.embed_type = embed_type
|
||||||
self.embed_width = embed_width
|
self.embed_width = embed_width
|
||||||
self.embed_height = embed_height
|
self.embed_height = embed_height
|
||||||
self.duration = duration
|
self.has_large_media = has_large_media
|
||||||
self.author = author
|
|
||||||
self.force_large_media = force_large_media
|
self.force_large_media = force_large_media
|
||||||
self.force_small_media = force_small_media
|
self.force_small_media = force_small_media
|
||||||
self.manual = manual
|
self.manual = manual
|
||||||
|
self.duration = duration
|
||||||
|
self.author = author
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _parse(
|
def _parse(
|
||||||
@ -195,7 +195,6 @@ class WebPage(Object):
|
|||||||
id=str(webpage.id),
|
id=str(webpage.id),
|
||||||
url=webpage.url,
|
url=webpage.url,
|
||||||
display_url=webpage.display_url,
|
display_url=webpage.display_url,
|
||||||
has_large_media=webpage.has_large_media,
|
|
||||||
type=webpage.type,
|
type=webpage.type,
|
||||||
site_name=webpage.site_name,
|
site_name=webpage.site_name,
|
||||||
title=webpage.title,
|
title=webpage.title,
|
||||||
@ -209,9 +208,10 @@ class WebPage(Object):
|
|||||||
embed_type=webpage.embed_type,
|
embed_type=webpage.embed_type,
|
||||||
embed_width=webpage.embed_width,
|
embed_width=webpage.embed_width,
|
||||||
embed_height=webpage.embed_height,
|
embed_height=webpage.embed_height,
|
||||||
duration=webpage.duration,
|
has_large_media=webpage.has_large_media,
|
||||||
author=webpage.author,
|
|
||||||
force_large_media=force_large_media,
|
force_large_media=force_large_media,
|
||||||
force_small_media=force_small_media,
|
force_small_media=force_small_media,
|
||||||
manual=manual
|
manual=manual,
|
||||||
|
duration=webpage.duration,
|
||||||
|
author=webpage.author
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user