Skip to content

Commit

Permalink
* Removed unnecessary dev-requirements file
Browse files Browse the repository at this point in the history
* API types and functions regenerated
  • Loading branch information
pylakey committed Sep 16, 2021
1 parent 35373e8 commit dc46929
Show file tree
Hide file tree
Showing 31 changed files with 102 additions and 114 deletions.
6 changes: 3 additions & 3 deletions aiotdlib/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@
'chatStatisticsMessageInteractionInfo': ChatStatisticsMessageInteractionInfo,
'chatStatisticsMessageSenderInfo': ChatStatisticsMessageSenderInfo,
'chatTheme': ChatTheme,
'chatThemes': ChatThemes,
'chatType': ChatType,
'chatTypeBasicGroup': ChatTypeBasicGroup,
'chatTypePrivate': ChatTypePrivate,
Expand Down Expand Up @@ -919,6 +918,7 @@
'updateChatReadOutbox': UpdateChatReadOutbox,
'updateChatReplyMarkup': UpdateChatReplyMarkup,
'updateChatTheme': UpdateChatTheme,
'updateChatThemes': UpdateChatThemes,
'updateChatTitle': UpdateChatTitle,
'updateChatUnreadMentionCount': UpdateChatUnreadMentionCount,
'updateChatVoiceChat': UpdateChatVoiceChat,
Expand Down Expand Up @@ -1278,7 +1278,6 @@
'ChatStatisticsMessageInteractionInfo',
'ChatStatisticsMessageSenderInfo',
'ChatTheme',
'ChatThemes',
'ChatType',
'ChatTypeBasicGroup',
'ChatTypePrivate',
Expand Down Expand Up @@ -1480,7 +1479,6 @@
'GetChatSponsoredMessages',
'GetChatStatistics',
'GetChatStatisticsUrl',
'GetChatThemes',
'GetChats',
'GetCommands',
'GetConnectedWebsites',
Expand Down Expand Up @@ -1554,6 +1552,7 @@
'GetPushReceiverId',
'GetRecentInlineBots',
'GetRecentStickers',
'GetRecentlyOpenedChats',
'GetRecentlyVisitedTMeUrls',
'GetRecommendedChatFilters',
'GetRecoveryEmailAddress',
Expand Down Expand Up @@ -2388,6 +2387,7 @@
'UpdateChatReadOutbox',
'UpdateChatReplyMarkup',
'UpdateChatTheme',
'UpdateChatThemes',
'UpdateChatTitle',
'UpdateChatUnreadMentionCount',
'UpdateChatVoiceChat',
Expand Down
57 changes: 36 additions & 21 deletions aiotdlib/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ class Types:
CHAT_STATISTICS_MESSAGE_INTERACTION_INFO = 'chatStatisticsMessageInteractionInfo'
CHAT_STATISTICS_MESSAGE_SENDER_INFO = 'chatStatisticsMessageSenderInfo'
CHAT_THEME = 'chatTheme'
CHAT_THEMES = 'chatThemes'
CHAT_TYPE = 'chatType'
CHAT_TYPE_BASIC_GROUP = 'chatTypeBasicGroup'
CHAT_TYPE_PRIVATE = 'chatTypePrivate'
Expand Down Expand Up @@ -463,7 +462,6 @@ class Types:
GET_CHAT_SPONSORED_MESSAGES = 'getChatSponsoredMessages'
GET_CHAT_STATISTICS = 'getChatStatistics'
GET_CHAT_STATISTICS_URL = 'getChatStatisticsUrl'
GET_CHAT_THEMES = 'getChatThemes'
GET_CHATS = 'getChats'
GET_COMMANDS = 'getCommands'
GET_CONNECTED_WEBSITES = 'getConnectedWebsites'
Expand Down Expand Up @@ -537,6 +535,7 @@ class Types:
GET_PUSH_RECEIVER_ID = 'getPushReceiverId'
GET_RECENT_INLINE_BOTS = 'getRecentInlineBots'
GET_RECENT_STICKERS = 'getRecentStickers'
GET_RECENTLY_OPENED_CHATS = 'getRecentlyOpenedChats'
GET_RECENTLY_VISITED_T_ME_URLS = 'getRecentlyVisitedTMeUrls'
GET_RECOMMENDED_CHAT_FILTERS = 'getRecommendedChatFilters'
GET_RECOVERY_EMAIL_ADDRESS = 'getRecoveryEmailAddress'
Expand Down Expand Up @@ -1371,6 +1370,7 @@ class Types:
UPDATE_CHAT_READ_OUTBOX = 'updateChatReadOutbox'
UPDATE_CHAT_REPLY_MARKUP = 'updateChatReplyMarkup'
UPDATE_CHAT_THEME = 'updateChatTheme'
UPDATE_CHAT_THEMES = 'updateChatThemes'
UPDATE_CHAT_TITLE = 'updateChatTitle'
UPDATE_CHAT_UNREAD_MENTION_COUNT = 'updateChatUnreadMentionCount'
UPDATE_CHAT_VOICE_CHAT = 'updateChatVoiceChat'
Expand Down Expand Up @@ -4493,7 +4493,7 @@ async def edit_message_media(
skip_validation: bool = False
) -> Message:
"""
Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side
Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side

Params:
chat_id (:class:`int`)
Expand Down Expand Up @@ -5914,17 +5914,6 @@ async def get_chat_statistics_url(
request_timeout=request_timeout,
)

async def get_chat_themes(self, *, request_id: str = None, request_timeout: int = None) -> ChatThemes:
"""
Returns the list of available chat themes

"""
return await self.client.request(
GetChatThemes(),
request_id=request_id,
request_timeout=request_timeout,
)

async def get_chats(
self,
chat_list: ChatList,
Expand Down Expand Up @@ -6240,7 +6229,7 @@ async def get_file_downloaded_prefix_size(
skip_validation: bool = False
) -> Count:
"""
Returns file downloaded prefix size from a given offset
Returns file downloaded prefix size from a given offset, in bytes

Params:
file_id (:class:`int`)
Expand Down Expand Up @@ -7913,6 +7902,32 @@ async def get_recent_stickers(
request_timeout=request_timeout,
)

async def get_recently_opened_chats(
self,
limit: int,
*,
request_id: str = None,
request_timeout: int = None,
skip_validation: bool = False
) -> Chats:
"""
Returns recently opened chats, this is an offline request. Returns chats in the order of last opening

Params:
limit (:class:`int`)
The maximum number of chats to be returned

"""
_constructor = GetRecentlyOpenedChats.construct if skip_validation else GetRecentlyOpenedChats

return await self.client.request(
_constructor(
limit=limit,
),
request_id=request_id,
request_timeout=request_timeout,
)

async def get_recently_visited_t_me_urls(
self,
referrer: str,
Expand Down Expand Up @@ -9181,7 +9196,7 @@ async def optimize_storage(

Params:
size (:class:`int`)
Limit on the total size of files after deletion. Pass -1 to use the default limit
Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit

ttl (:class:`int`)
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit
Expand Down Expand Up @@ -12245,7 +12260,7 @@ async def set_chat_theme(
skip_validation: bool = False
) -> Ok:
"""
Changes the chat theme. Requires can_change_info administrator right in groups, supergroups and channels
Changes the chat theme. Supported only in private and secret chats

Params:
chat_id (:class:`int`)
Expand Down Expand Up @@ -14601,7 +14616,7 @@ async def view_messages(
async def view_sponsored_message(
self,
chat_id: int,
message_id: str,
sponsored_message_id: int,
*,
request_id: str = None,
request_timeout: int = None,
Expand All @@ -14612,9 +14627,9 @@ async def view_sponsored_message(

Params:
chat_id (:class:`int`)
Chat identifier
Identifier of the chat with the sponsored message

message_id (:class:`str`)
sponsored_message_id (:class:`int`)
The identifier of the sponsored message being viewed

"""
Expand All @@ -14623,7 +14638,7 @@ async def view_sponsored_message(
return await self.client.request(
_constructor(
chat_id=chat_id,
message_id=message_id,
sponsored_message_id=sponsored_message_id,
),
request_id=request_id,
request_timeout=request_timeout,
Expand Down
4 changes: 2 additions & 2 deletions aiotdlib/api/functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@
from .get_chat_sponsored_messages import GetChatSponsoredMessages
from .get_chat_statistics import GetChatStatistics
from .get_chat_statistics_url import GetChatStatisticsUrl
from .get_chat_themes import GetChatThemes
from .get_chats import GetChats
from .get_commands import GetCommands
from .get_connected_websites import GetConnectedWebsites
Expand Down Expand Up @@ -227,6 +226,7 @@
from .get_push_receiver_id import GetPushReceiverId
from .get_recent_inline_bots import GetRecentInlineBots
from .get_recent_stickers import GetRecentStickers
from .get_recently_opened_chats import GetRecentlyOpenedChats
from .get_recently_visited_t_me_urls import GetRecentlyVisitedTMeUrls
from .get_recommended_chat_filters import GetRecommendedChatFilters
from .get_recovery_email_address import GetRecoveryEmailAddress
Expand Down Expand Up @@ -606,7 +606,6 @@
"GetChatSponsoredMessages",
"GetChatStatistics",
"GetChatStatisticsUrl",
"GetChatThemes",
"GetChats",
"GetCommands",
"GetConnectedWebsites",
Expand Down Expand Up @@ -680,6 +679,7 @@
"GetPushReceiverId",
"GetRecentInlineBots",
"GetRecentStickers",
"GetRecentlyOpenedChats",
"GetRecentlyVisitedTMeUrls",
"GetRecommendedChatFilters",
"GetRecoveryEmailAddress",
Expand Down
2 changes: 1 addition & 1 deletion aiotdlib/api/functions/edit_message_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class EditMessageMedia(BaseObject):
"""
Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side
Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side
Params:
chat_id (:class:`int`)
Expand Down
23 changes: 0 additions & 23 deletions aiotdlib/api/functions/get_chat_themes.py

This file was deleted.

2 changes: 1 addition & 1 deletion aiotdlib/api/functions/get_file_downloaded_prefix_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class GetFileDownloadedPrefixSize(BaseObject):
"""
Returns file downloaded prefix size from a given offset
Returns file downloaded prefix size from a given offset, in bytes
Params:
file_id (:class:`int`)
Expand Down
2 changes: 1 addition & 1 deletion aiotdlib/api/functions/optimize_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class OptimizeStorage(BaseObject):
Params:
size (:class:`int`)
Limit on the total size of files after deletion. Pass -1 to use the default limit
Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit
ttl (:class:`int`)
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit
Expand Down
2 changes: 1 addition & 1 deletion aiotdlib/api/functions/set_chat_theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class SetChatTheme(BaseObject):
"""
Changes the chat theme. Requires can_change_info administrator right in groups, supergroups and channels
Changes the chat theme. Supported only in private and secret chats
Params:
chat_id (:class:`int`)
Expand Down
6 changes: 3 additions & 3 deletions aiotdlib/api/functions/view_sponsored_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ class ViewSponsoredMessage(BaseObject):
Params:
chat_id (:class:`int`)
Chat identifier
Identifier of the chat with the sponsored message
message_id (:class:`str`)
sponsored_message_id (:class:`int`)
The identifier of the sponsored message being viewed
"""

ID: str = Field("viewSponsoredMessage", alias="@type")
chat_id: int
message_id: str
sponsored_message_id: int

@staticmethod
def read(q: dict) -> ViewSponsoredMessage:
Expand Down
4 changes: 2 additions & 2 deletions aiotdlib/api/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@
from .chat_statistics_message_interaction_info import ChatStatisticsMessageInteractionInfo
from .chat_statistics_message_sender_info import ChatStatisticsMessageSenderInfo
from .chat_theme import ChatTheme
from .chat_themes import ChatThemes
from .chat_type import (
ChatType,
ChatTypeBasicGroup,
Expand Down Expand Up @@ -1077,6 +1076,7 @@
UpdateChatReadOutbox,
UpdateChatReplyMarkup,
UpdateChatTheme,
UpdateChatThemes,
UpdateChatTitle,
UpdateChatUnreadMentionCount,
UpdateChatVoiceChat,
Expand Down Expand Up @@ -1408,7 +1408,6 @@
"ChatStatisticsMessageInteractionInfo",
"ChatStatisticsMessageSenderInfo",
"ChatTheme",
"ChatThemes",
"ChatType",
"ChatTypeBasicGroup",
"ChatTypePrivate",
Expand Down Expand Up @@ -2107,6 +2106,7 @@
"UpdateChatReadOutbox",
"UpdateChatReplyMarkup",
"UpdateChatTheme",
"UpdateChatThemes",
"UpdateChatTitle",
"UpdateChatUnreadMentionCount",
"UpdateChatVoiceChat",
Expand Down
6 changes: 3 additions & 3 deletions aiotdlib/api/types/auto_download_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ class AutoDownloadSettings(BaseObject):
True, if the auto-download is enabled
max_photo_file_size (:class:`int`)
The maximum size of a photo file to be auto-downloaded
The maximum size of a photo file to be auto-downloaded, in bytes
max_video_file_size (:class:`int`)
The maximum size of a video file to be auto-downloaded
The maximum size of a video file to be auto-downloaded, in bytes
max_other_file_size (:class:`int`)
The maximum size of other file types to be auto-downloaded
The maximum size of other file types to be auto-downloaded, in bytes
video_upload_bitrate (:class:`int`)
The maximum suggested bitrate for uploaded videos, in kbit/s
Expand Down
6 changes: 5 additions & 1 deletion aiotdlib/api/types/background_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ class BackgroundTypePattern(BackgroundType):
Description of the background fill
intensity (:class:`int`)
Intensity of the pattern when it is shown above the filled background; -100-100. If negative, the pattern color and the filled background colors needs to be inverted
Intensity of the pattern when it is shown above the filled background; 0-100.
is_inverted (:class:`bool`)
True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only
is_moving (:class:`bool`)
True, if the background needs to be slightly moved when device is tilted
Expand All @@ -57,6 +60,7 @@ class BackgroundTypePattern(BackgroundType):
ID: str = Field("backgroundTypePattern", alias="@type")
fill: BackgroundFill
intensity: int
is_inverted: bool
is_moving: bool

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion aiotdlib/api/types/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Chat(BaseObject):
Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
theme_name (:class:`str`)
If non-empty, name of the theme set for the chat
If non-empty, name of a theme set for the chat
action_bar (:class:`ChatActionBar`)
Describes actions which should be possible to do through a chat action bar; may be null
Expand Down
Loading

0 comments on commit dc46929

Please sign in to comment.