tdlib-ruby 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/ChangeLog.md +5 -0
- data/README.md +9 -2
- data/bin/parser +32 -11
- data/lib/tdlib/client.rb +10 -5
- data/lib/tdlib/client_methods.rb +923 -386
- data/lib/tdlib/types.rb +176 -11
- data/lib/tdlib/types/animation.rb +2 -0
- data/lib/tdlib/types/audio.rb +2 -0
- data/lib/tdlib/types/authorization_state.rb +1 -0
- data/lib/tdlib/types/authorization_state/wait_code.rb +1 -6
- data/lib/tdlib/types/authorization_state/wait_password.rb +2 -2
- data/lib/tdlib/types/authorization_state/wait_registration.rb +9 -0
- data/lib/tdlib/types/auto_download_settings.rb +21 -0
- data/lib/tdlib/types/auto_download_settings_presets.rb +15 -0
- data/lib/tdlib/types/background.rb +19 -0
- data/lib/tdlib/types/background_type.rb +12 -0
- data/lib/tdlib/types/background_type/pattern.rb +12 -0
- data/lib/tdlib/types/background_type/solid.rb +8 -0
- data/lib/tdlib/types/background_type/wallpaper.rb +11 -0
- data/lib/tdlib/types/backgrounds.rb +8 -0
- data/lib/tdlib/types/basic_group.rb +0 -2
- data/lib/tdlib/types/basic_group_full_info.rb +2 -0
- data/lib/tdlib/types/call_problem.rb +16 -0
- data/lib/tdlib/types/call_problem/distorted_speech.rb +5 -0
- data/lib/tdlib/types/call_problem/dropped.rb +5 -0
- data/lib/tdlib/types/call_problem/echo.rb +5 -0
- data/lib/tdlib/types/call_problem/interruptions.rb +5 -0
- data/lib/tdlib/types/call_problem/noise.rb +5 -0
- data/lib/tdlib/types/call_problem/silent_local.rb +5 -0
- data/lib/tdlib/types/call_problem/silent_remote.rb +5 -0
- data/lib/tdlib/types/call_state/ready.rb +2 -0
- data/lib/tdlib/types/chat.rb +10 -0
- data/lib/tdlib/types/chat_event_action.rb +2 -0
- data/lib/tdlib/types/chat_event_action/invites_toggled.rb +3 -3
- data/lib/tdlib/types/chat_event_action/permissions_changed.rb +10 -0
- data/lib/tdlib/types/chat_event_action/photo_changed.rb +4 -4
- data/lib/tdlib/types/chat_event_action/poll_stopped.rb +8 -0
- data/lib/tdlib/types/chat_invite_link_info.rb +1 -1
- data/lib/tdlib/types/chat_member_status/administrator.rb +3 -3
- data/lib/tdlib/types/chat_member_status/restricted.rb +2 -13
- data/lib/tdlib/types/chat_members_filter.rb +1 -0
- data/lib/tdlib/types/chat_members_filter/contacts.rb +5 -0
- data/lib/tdlib/types/chat_notification_settings.rb +12 -0
- data/lib/tdlib/types/chat_permissions.rb +28 -0
- data/lib/tdlib/types/chat_photo.rb +2 -0
- data/lib/tdlib/types/chat_report_reason.rb +1 -0
- data/lib/tdlib/types/chat_report_reason/child_abuse.rb +5 -0
- data/lib/tdlib/types/check_chat_username_result/public_chats_too_much.rb +1 -1
- data/lib/tdlib/types/connection_state/waiting_for_network.rb +1 -1
- data/lib/tdlib/types/database_statistics.rb +8 -0
- data/lib/tdlib/types/device_token.rb +2 -2
- data/lib/tdlib/types/device_token/apple_push_vo_ip.rb +2 -0
- data/lib/tdlib/types/device_token/firebase_cloud_messaging.rb +10 -0
- data/lib/tdlib/types/document.rb +4 -1
- data/lib/tdlib/types/emojis.rb +8 -0
- data/lib/tdlib/types/file_part.rb +8 -0
- data/lib/tdlib/types/file_type/wallpaper.rb +1 -1
- data/lib/tdlib/types/http_url.rb +8 -0
- data/lib/tdlib/types/inline_keyboard_button_type.rb +1 -0
- data/lib/tdlib/types/inline_keyboard_button_type/login_url.rb +12 -0
- data/lib/tdlib/types/input_background.rb +11 -0
- data/lib/tdlib/types/input_background/local.rb +10 -0
- data/lib/tdlib/types/input_background/remote.rb +8 -0
- data/lib/tdlib/types/input_file/generated.rb +1 -0
- data/lib/tdlib/types/input_inline_query_result/animated_gif.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/animated_mpeg4.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/article.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/audio.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/contact.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/document.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/game.rb +2 -1
- data/lib/tdlib/types/input_inline_query_result/location.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/photo.rb +5 -3
- data/lib/tdlib/types/input_inline_query_result/sticker.rb +7 -6
- data/lib/tdlib/types/input_inline_query_result/venue.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/video.rb +5 -4
- data/lib/tdlib/types/input_inline_query_result/voice_note.rb +5 -4
- data/lib/tdlib/types/input_message_content.rb +1 -0
- data/lib/tdlib/types/input_message_content/forwarded.rb +7 -0
- data/lib/tdlib/types/input_message_content/poll.rb +11 -0
- data/lib/tdlib/types/input_thumbnail.rb +2 -2
- data/lib/tdlib/types/json_object_member.rb +10 -0
- data/lib/tdlib/types/json_value.rb +15 -0
- data/lib/tdlib/types/json_value/array.rb +8 -0
- data/lib/tdlib/types/json_value/boolean.rb +8 -0
- data/lib/tdlib/types/json_value/null.rb +5 -0
- data/lib/tdlib/types/json_value/number.rb +8 -0
- data/lib/tdlib/types/json_value/object.rb +8 -0
- data/lib/tdlib/types/json_value/string.rb +8 -0
- data/lib/tdlib/types/language_pack_info.rb +21 -0
- data/lib/tdlib/types/language_pack_string_value/pluralized.rb +1 -0
- data/lib/tdlib/types/link_state/is_contact.rb +1 -1
- data/lib/tdlib/types/link_state/knows_phone_number.rb +1 -1
- data/lib/tdlib/types/local_file.rb +5 -2
- data/lib/tdlib/types/log_stream.rb +12 -0
- data/lib/tdlib/types/log_stream/default.rb +5 -0
- data/lib/tdlib/types/log_stream/empty.rb +5 -0
- data/lib/tdlib/types/log_stream/file.rb +11 -0
- data/lib/tdlib/types/log_tags.rb +8 -0
- data/lib/tdlib/types/log_verbosity_level.rb +8 -0
- data/lib/tdlib/types/message.rb +3 -1
- data/lib/tdlib/types/message_content.rb +1 -0
- data/lib/tdlib/types/message_content/game_score.rb +1 -1
- data/lib/tdlib/types/message_content/pin_message.rb +1 -1
- data/lib/tdlib/types/message_content/poll.rb +8 -0
- data/lib/tdlib/types/message_forward_info.rb +13 -7
- data/lib/tdlib/types/message_forward_origin.rb +12 -0
- data/lib/tdlib/types/message_forward_origin/channel.rb +12 -0
- data/lib/tdlib/types/message_forward_origin/hidden_user.rb +8 -0
- data/lib/tdlib/types/message_forward_origin/user.rb +8 -0
- data/lib/tdlib/types/message_link_info.rb +14 -0
- data/lib/tdlib/types/message_sending_state/failed.rb +10 -0
- data/lib/tdlib/types/minithumbnail.rb +12 -0
- data/lib/tdlib/types/notification.rb +12 -0
- data/lib/tdlib/types/notification_group.rb +16 -0
- data/lib/tdlib/types/notification_group_type.rb +13 -0
- data/lib/tdlib/types/notification_group_type/calls.rb +5 -0
- data/lib/tdlib/types/notification_group_type/mentions.rb +6 -0
- data/lib/tdlib/types/notification_group_type/messages.rb +6 -0
- data/lib/tdlib/types/notification_group_type/secret_chat.rb +5 -0
- data/lib/tdlib/types/notification_settings_scope.rb +1 -0
- data/lib/tdlib/types/notification_settings_scope/channel_chats.rb +5 -0
- data/lib/tdlib/types/notification_settings_scope/group_chats.rb +2 -2
- data/lib/tdlib/types/notification_type.rb +13 -0
- data/lib/tdlib/types/notification_type/new_call.rb +8 -0
- data/lib/tdlib/types/notification_type/new_message.rb +8 -0
- data/lib/tdlib/types/notification_type/new_push_message.rb +15 -0
- data/lib/tdlib/types/notification_type/new_secret_chat.rb +5 -0
- data/lib/tdlib/types/option_value/boolean.rb +1 -1
- data/lib/tdlib/types/option_value/empty.rb +1 -1
- data/lib/tdlib/types/option_value/integer.rb +1 -1
- data/lib/tdlib/types/option_value/string.rb +1 -1
- data/lib/tdlib/types/page_block.rb +5 -0
- data/lib/tdlib/types/page_block/animation.rb +2 -2
- data/lib/tdlib/types/page_block/audio.rb +2 -2
- data/lib/tdlib/types/page_block/block_quote.rb +2 -2
- data/lib/tdlib/types/page_block/collage.rb +2 -2
- data/lib/tdlib/types/page_block/details.rb +12 -0
- data/lib/tdlib/types/page_block/embedded.rb +4 -4
- data/lib/tdlib/types/page_block/embedded_post.rb +4 -4
- data/lib/tdlib/types/page_block/kicker.rb +8 -0
- data/lib/tdlib/types/page_block/list.rb +3 -5
- data/lib/tdlib/types/page_block/map.rb +16 -0
- data/lib/tdlib/types/page_block/photo.rb +4 -2
- data/lib/tdlib/types/page_block/pull_quote.rb +2 -2
- data/lib/tdlib/types/page_block/related_articles.rb +10 -0
- data/lib/tdlib/types/page_block/slideshow.rb +2 -2
- data/lib/tdlib/types/page_block/table.rb +14 -0
- data/lib/tdlib/types/page_block/video.rb +2 -2
- data/lib/tdlib/types/page_block_caption.rb +10 -0
- data/lib/tdlib/types/page_block_horizontal_alignment.rb +12 -0
- data/lib/tdlib/types/page_block_horizontal_alignment/center.rb +5 -0
- data/lib/tdlib/types/page_block_horizontal_alignment/left.rb +5 -0
- data/lib/tdlib/types/page_block_horizontal_alignment/right.rb +5 -0
- data/lib/tdlib/types/page_block_list_item.rb +10 -0
- data/lib/tdlib/types/page_block_related_article.rb +18 -0
- data/lib/tdlib/types/page_block_table_cell.rb +18 -0
- data/lib/tdlib/types/page_block_vertical_alignment.rb +12 -0
- data/lib/tdlib/types/page_block_vertical_alignment/bottom.rb +5 -0
- data/lib/tdlib/types/page_block_vertical_alignment/middle.rb +5 -0
- data/lib/tdlib/types/page_block_vertical_alignment/top.rb +5 -0
- data/lib/tdlib/types/passport_authorization_form.rb +1 -5
- data/lib/tdlib/types/passport_element_error_source/file.rb +3 -0
- data/lib/tdlib/types/passport_element_error_source/translation_file.rb +3 -0
- data/lib/tdlib/types/passport_elements_with_errors.rb +10 -0
- data/lib/tdlib/types/password_state.rb +7 -7
- data/lib/tdlib/types/phone_number_authentication_settings.rb +16 -0
- data/lib/tdlib/types/photo.rb +2 -2
- data/lib/tdlib/types/poll.rb +16 -0
- data/lib/tdlib/types/poll_option.rb +16 -0
- data/lib/tdlib/types/profile_photo.rb +2 -0
- data/lib/tdlib/types/public_message_link.rb +1 -1
- data/lib/tdlib/types/push_message_content.rb +35 -0
- data/lib/tdlib/types/push_message_content/animation.rb +12 -0
- data/lib/tdlib/types/push_message_content/audio.rb +10 -0
- data/lib/tdlib/types/push_message_content/basic_group_chat_create.rb +5 -0
- data/lib/tdlib/types/push_message_content/chat_add_members.rb +12 -0
- data/lib/tdlib/types/push_message_content/chat_change_photo.rb +5 -0
- data/lib/tdlib/types/push_message_content/chat_change_title.rb +8 -0
- data/lib/tdlib/types/push_message_content/chat_delete_member.rb +12 -0
- data/lib/tdlib/types/push_message_content/chat_join_by_link.rb +5 -0
- data/lib/tdlib/types/push_message_content/contact.rb +10 -0
- data/lib/tdlib/types/push_message_content/contact_registered.rb +5 -0
- data/lib/tdlib/types/push_message_content/document.rb +10 -0
- data/lib/tdlib/types/push_message_content/game.rb +10 -0
- data/lib/tdlib/types/push_message_content/game_score.rb +12 -0
- data/lib/tdlib/types/push_message_content/hidden.rb +8 -0
- data/lib/tdlib/types/push_message_content/invoice.rb +10 -0
- data/lib/tdlib/types/push_message_content/location.rb +10 -0
- data/lib/tdlib/types/push_message_content/media_album.rb +12 -0
- data/lib/tdlib/types/push_message_content/message_forwards.rb +8 -0
- data/lib/tdlib/types/push_message_content/photo.rb +14 -0
- data/lib/tdlib/types/push_message_content/poll.rb +10 -0
- data/lib/tdlib/types/push_message_content/screenshot_taken.rb +5 -0
- data/lib/tdlib/types/push_message_content/sticker.rb +12 -0
- data/lib/tdlib/types/push_message_content/text.rb +10 -0
- data/lib/tdlib/types/push_message_content/video.rb +14 -0
- data/lib/tdlib/types/push_message_content/video_note.rb +10 -0
- data/lib/tdlib/types/push_message_content/voice_note.rb +10 -0
- data/lib/tdlib/types/push_receiver_id.rb +9 -0
- data/lib/tdlib/types/rich_text.rb +6 -0
- data/lib/tdlib/types/rich_text/anchor.rb +10 -0
- data/lib/tdlib/types/rich_text/icon.rb +13 -0
- data/lib/tdlib/types/rich_text/marked.rb +8 -0
- data/lib/tdlib/types/rich_text/phone_number.rb +10 -0
- data/lib/tdlib/types/rich_text/subscript.rb +8 -0
- data/lib/tdlib/types/rich_text/superscript.rb +8 -0
- data/lib/tdlib/types/scope_notification_settings.rb +6 -0
- data/lib/tdlib/types/search_messages_filter/unread_mention.rb +1 -1
- data/lib/tdlib/types/session.rb +3 -0
- data/lib/tdlib/types/sticker.rb +2 -0
- data/lib/tdlib/types/sticker_set.rb +10 -2
- data/lib/tdlib/types/sticker_set_info.rb +5 -0
- data/lib/tdlib/types/storage_statistics_fast.rb +4 -0
- data/lib/tdlib/types/supergroup.rb +2 -3
- data/lib/tdlib/types/supergroup_full_info.rb +2 -2
- data/lib/tdlib/types/supergroup_members_filter.rb +1 -0
- data/lib/tdlib/types/supergroup_members_filter/contacts.rb +8 -0
- data/lib/tdlib/types/terms_of_service.rb +1 -1
- data/lib/tdlib/types/update.rb +9 -0
- data/lib/tdlib/types/update/active_notifications.rb +10 -0
- data/lib/tdlib/types/update/chat_online_member_count.rb +12 -0
- data/lib/tdlib/types/update/chat_order.rb +1 -1
- data/lib/tdlib/types/update/chat_permissions.rb +10 -0
- data/lib/tdlib/types/update/chat_pinned_message.rb +11 -0
- data/lib/tdlib/types/update/delete_messages.rb +1 -1
- data/lib/tdlib/types/update/have_pending_notifications.rb +13 -0
- data/lib/tdlib/types/update/message_send_failed.rb +1 -1
- data/lib/tdlib/types/update/new_message.rb +0 -4
- data/lib/tdlib/types/update/notification.rb +10 -0
- data/lib/tdlib/types/update/notification_group.rb +26 -0
- data/lib/tdlib/types/update/poll.rb +8 -0
- data/lib/tdlib/types/update/selected_background.rb +10 -0
- data/lib/tdlib/types/updates.rb +8 -0
- data/lib/tdlib/types/user.rb +4 -0
- data/lib/tdlib/types/user_privacy_setting.rb +3 -0
- data/lib/tdlib/types/user_privacy_setting/allow_peer_to_peer_calls.rb +5 -0
- data/lib/tdlib/types/user_privacy_setting/show_link_in_forwarded_messages.rb +5 -0
- data/lib/tdlib/types/user_privacy_setting/show_profile_photo.rb +5 -0
- data/lib/tdlib/types/user_profile_photo.rb +12 -0
- data/lib/tdlib/types/user_profile_photos.rb +2 -2
- data/lib/tdlib/types/video.rb +2 -0
- data/lib/tdlib/types/video_note.rb +2 -0
- data/lib/tdlib/types/web_page.rb +3 -2
- data/lib/tdlib/types/web_page_instant_view.rb +7 -0
- data/lib/tdlib/update_manager.rb +5 -12
- data/lib/tdlib/version.rb +1 -1
- data/spec/integration/tdlib_spec.rb +8 -0
- metadata +139 -9
- data/lib/tdlib/types/device_token/google_cloud_messaging.rb +0 -8
- data/lib/tdlib/types/message_forward_info/message_forwarded_from_user.rb +0 -16
- data/lib/tdlib/types/message_forward_info/message_forwarded_post.rb +0 -21
- data/lib/tdlib/types/sticker_emojis.rb +0 -10
- data/lib/tdlib/types/wallpaper.rb +0 -14
- data/lib/tdlib/types/wallpapers.rb +0 -8
@@ -12,9 +12,9 @@ module TD::Types
|
|
12
12
|
# @attr can_delete_messages [Boolean] True, if the administrator can delete messages of other users.
|
13
13
|
# @attr can_invite_users [Boolean] True, if the administrator can invite new users to the chat.
|
14
14
|
# @attr can_restrict_members [Boolean] True, if the administrator can restrict, ban, or unban chat members.
|
15
|
-
# @attr can_pin_messages [Boolean] True, if the administrator can pin messages; applicable to
|
16
|
-
# @attr can_promote_members [Boolean] True, if the administrator can add new administrators with a subset of
|
17
|
-
# privileges or demote administrators that were directly or indirectly promoted by him.
|
15
|
+
# @attr can_pin_messages [Boolean] True, if the administrator can pin messages; applicable to groups only.
|
16
|
+
# @attr can_promote_members [Boolean] True, if the administrator can add new administrators with a subset of their
|
17
|
+
# own privileges or demote administrators that were directly or indirectly promoted by him.
|
18
18
|
class ChatMemberStatus::Administrator < ChatMemberStatus
|
19
19
|
attribute :can_be_edited, TD::Types::Bool
|
20
20
|
attribute :can_change_info, TD::Types::Bool
|
@@ -7,21 +7,10 @@ module TD::Types
|
|
7
7
|
# user; 0 if never.
|
8
8
|
# If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is
|
9
9
|
# considered to be restricted forever.
|
10
|
-
# @attr
|
11
|
-
# @attr can_send_media_messages [Boolean] True, if the user can send audio files, documents, photos, videos, video
|
12
|
-
# notes, and voice notes.
|
13
|
-
# Implies can_send_messages permissions.
|
14
|
-
# @attr can_send_other_messages [Boolean] True, if the user can send animations, games, and stickers and use inline
|
15
|
-
# bots.
|
16
|
-
# Implies can_send_media_messages permissions.
|
17
|
-
# @attr can_add_web_page_previews [Boolean] True, if the user may add a web page preview to his messages.
|
18
|
-
# Implies can_send_messages permissions.
|
10
|
+
# @attr permissions [TD::Types::ChatPermissions] User permissions in the chat.
|
19
11
|
class ChatMemberStatus::Restricted < ChatMemberStatus
|
20
12
|
attribute :is_member, TD::Types::Bool
|
21
13
|
attribute :restricted_until_date, TD::Types::Integer
|
22
|
-
attribute :
|
23
|
-
attribute :can_send_media_messages, TD::Types::Bool
|
24
|
-
attribute :can_send_other_messages, TD::Types::Bool
|
25
|
-
attribute :can_add_web_page_previews, TD::Types::Bool
|
14
|
+
attribute :permissions, TD::Types::ChatPermissions
|
26
15
|
end
|
27
16
|
end
|
@@ -11,6 +11,14 @@ module TD::Types
|
|
11
11
|
# @attr use_default_show_preview [Boolean] If true, show_preview is ignored and the value for the relevant type of
|
12
12
|
# chat is used instead.
|
13
13
|
# @attr show_preview [Boolean] True, if message content should be displayed in notifications.
|
14
|
+
# @attr use_default_disable_pinned_message_notifications [Boolean] If true, disable_pinned_message_notifications is
|
15
|
+
# ignored and the value for the relevant type of chat is used instead.
|
16
|
+
# @attr disable_pinned_message_notifications [Boolean] If true, notifications for incoming pinned messages will be
|
17
|
+
# created as for an ordinary unread message.
|
18
|
+
# @attr use_default_disable_mention_notifications [Boolean] If true, disable_mention_notifications is ignored and the
|
19
|
+
# value for the relevant type of chat is used instead.
|
20
|
+
# @attr disable_mention_notifications [Boolean] If true, notifications for messages with mentions will be created as
|
21
|
+
# for an ordinary unread message.
|
14
22
|
class ChatNotificationSettings < Base
|
15
23
|
attribute :use_default_mute_for, TD::Types::Bool
|
16
24
|
attribute :mute_for, TD::Types::Integer
|
@@ -18,5 +26,9 @@ module TD::Types
|
|
18
26
|
attribute :sound, TD::Types::String
|
19
27
|
attribute :use_default_show_preview, TD::Types::Bool
|
20
28
|
attribute :show_preview, TD::Types::Bool
|
29
|
+
attribute :use_default_disable_pinned_message_notifications, TD::Types::Bool
|
30
|
+
attribute :disable_pinned_message_notifications, TD::Types::Bool
|
31
|
+
attribute :use_default_disable_mention_notifications, TD::Types::Bool
|
32
|
+
attribute :disable_mention_notifications, TD::Types::Bool
|
21
33
|
end
|
22
34
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Describes actions that a user is allowed to take in a chat.
|
3
|
+
#
|
4
|
+
# @attr can_send_messages [Boolean] True, if the user can send text messages, contacts, locations, and venues.
|
5
|
+
# @attr can_send_media_messages [Boolean] True, if the user can send audio files, documents, photos, videos, video
|
6
|
+
# notes, and voice notes.
|
7
|
+
# Implies can_send_messages permissions.
|
8
|
+
# @attr can_send_polls [Boolean] True, if the user can send polls.
|
9
|
+
# Implies can_send_messages permissions.
|
10
|
+
# @attr can_send_other_messages [Boolean] True, if the user can send animations, games, and stickers and use inline
|
11
|
+
# bots.
|
12
|
+
# Implies can_send_messages permissions.
|
13
|
+
# @attr can_add_web_page_previews [Boolean] True, if the user may add a web page preview to their messages.
|
14
|
+
# Implies can_send_messages permissions.
|
15
|
+
# @attr can_change_info [Boolean] True, if the user can change the chat title, photo, and other settings.
|
16
|
+
# @attr can_invite_users [Boolean] True, if the user can invite new users to the chat.
|
17
|
+
# @attr can_pin_messages [Boolean] True, if the user can pin messages.
|
18
|
+
class ChatPermissions < Base
|
19
|
+
attribute :can_send_messages, TD::Types::Bool
|
20
|
+
attribute :can_send_media_messages, TD::Types::Bool
|
21
|
+
attribute :can_send_polls, TD::Types::Bool
|
22
|
+
attribute :can_send_other_messages, TD::Types::Bool
|
23
|
+
attribute :can_add_web_page_previews, TD::Types::Bool
|
24
|
+
attribute :can_change_info, TD::Types::Bool
|
25
|
+
attribute :can_invite_users, TD::Types::Bool
|
26
|
+
attribute :can_pin_messages, TD::Types::Bool
|
27
|
+
end
|
28
|
+
end
|
@@ -2,7 +2,9 @@ module TD::Types
|
|
2
2
|
# Describes the photo of a chat.
|
3
3
|
#
|
4
4
|
# @attr small [TD::Types::File] A small (160x160) chat photo.
|
5
|
+
# The file can be downloaded only before the photo is changed.
|
5
6
|
# @attr big [TD::Types::File] A big (640x640) chat photo.
|
7
|
+
# The file can be downloaded only before the photo is changed.
|
6
8
|
class ChatPhoto < Base
|
7
9
|
attribute :small, TD::Types::File
|
8
10
|
attribute :big, TD::Types::File
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# The user has too much
|
2
|
+
# The user has too much chats with username, one of them should be made private first.
|
3
3
|
class CheckChatUsernameResult::PublicChatsTooMuch < CheckChatUsernameResult
|
4
4
|
end
|
5
5
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module TD::Types
|
2
2
|
# Currently waiting for the network to become available.
|
3
|
-
# Use
|
3
|
+
# Use setNetworkType to change the available network type.
|
4
4
|
class ConnectionState::WaitingForNetwork < ConnectionState
|
5
5
|
end
|
6
6
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# Represents a data needed to subscribe for push notifications.
|
2
|
+
# Represents a data needed to subscribe for push notifications through registerDevice method.
|
3
3
|
# To use specific push notification service, you must specify the correct application platform and upload valid
|
4
4
|
# server authentication data at https://my.telegram.org.
|
5
5
|
class DeviceToken < Base
|
6
6
|
%w[
|
7
|
-
|
7
|
+
firebase_cloud_messaging
|
8
8
|
apple_push
|
9
9
|
apple_push_vo_ip
|
10
10
|
windows_push
|
@@ -3,8 +3,10 @@ module TD::Types
|
|
3
3
|
#
|
4
4
|
# @attr device_token [String, nil] Device token; may be empty to de-register a device.
|
5
5
|
# @attr is_app_sandbox [Boolean] True, if App Sandbox is enabled.
|
6
|
+
# @attr encrypt [Boolean] True, if push notifications should be additionally encrypted.
|
6
7
|
class DeviceToken::ApplePushVoIP < DeviceToken
|
7
8
|
attribute :device_token, TD::Types::String.optional.default(nil)
|
8
9
|
attribute :is_app_sandbox, TD::Types::Bool
|
10
|
+
attribute :encrypt, TD::Types::Bool
|
9
11
|
end
|
10
12
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A token for Firebase Cloud Messaging.
|
3
|
+
#
|
4
|
+
# @attr token [String, nil] Device registration token; may be empty to de-register a device.
|
5
|
+
# @attr encrypt [Boolean] True, if push notifications should be additionally encrypted.
|
6
|
+
class DeviceToken::FirebaseCloudMessaging < DeviceToken
|
7
|
+
attribute :token, TD::Types::String.optional.default(nil)
|
8
|
+
attribute :encrypt, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
data/lib/tdlib/types/document.rb
CHANGED
@@ -3,11 +3,14 @@ module TD::Types
|
|
3
3
|
#
|
4
4
|
# @attr file_name [String] Original name of the file; as defined by the sender.
|
5
5
|
# @attr mime_type [String] MIME type of the file; as defined by the sender.
|
6
|
-
# @attr
|
6
|
+
# @attr minithumbnail [TD::Types::Minithumbnail, nil] Document minithumbnail; may be null.
|
7
|
+
# @attr thumbnail [TD::Types::PhotoSize, nil] Document thumbnail in JPEG or PNG format (PNG will be used only for
|
8
|
+
# background patterns); as defined by the sender; may be null.
|
7
9
|
# @attr document [TD::Types::File] File containing the document.
|
8
10
|
class Document < Base
|
9
11
|
attribute :file_name, TD::Types::String
|
10
12
|
attribute :mime_type, TD::Types::String
|
13
|
+
attribute :minithumbnail, TD::Types::Minithumbnail.optional.default(nil)
|
11
14
|
attribute :thumbnail, TD::Types::PhotoSize.optional.default(nil)
|
12
15
|
attribute :document, TD::Types::File
|
13
16
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A button that opens a specified URL and automatically logs in in current user if they allowed to do that.
|
3
|
+
#
|
4
|
+
# @attr url [String] HTTP URL to open.
|
5
|
+
# @attr id [Integer] Unique button identifier.
|
6
|
+
# @attr forward_text [String] If non-empty, new text of the button in forwarded messages.
|
7
|
+
class InlineKeyboardButtonType::LoginUrl < InlineKeyboardButtonType
|
8
|
+
attribute :url, TD::Types::String
|
9
|
+
attribute :id, TD::Types::Integer
|
10
|
+
attribute :forward_text, TD::Types::String
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A background from a local file.
|
3
|
+
#
|
4
|
+
# @attr background [TD::Types::InputFile] Background file to use.
|
5
|
+
# Only {TD::Types::InputFile::Local} and {TD::Types::InputFile::Generated} are supported.
|
6
|
+
# The file nust be in JPEG format for wallpapers and in PNG format for patterns.
|
7
|
+
class InputBackground::Local < InputBackground
|
8
|
+
attribute :background, TD::Types::InputFile
|
9
|
+
end
|
10
|
+
end
|
@@ -5,6 +5,7 @@ module TD::Types
|
|
5
5
|
# no such file.
|
6
6
|
# @attr conversion [String] String specifying the conversion applied to the original file; should be persistent
|
7
7
|
# across application restarts.
|
8
|
+
# Conversions beginning with '#' are reserved for internal TDLib usage.
|
8
9
|
# @attr expected_size [Integer] Expected size of the generated file; 0 if unknown.
|
9
10
|
class InputFile::Generated < InputFile
|
10
11
|
attribute :original_path, TD::Types::String.optional.default(nil)
|
@@ -8,10 +8,11 @@ module TD::Types
|
|
8
8
|
# @attr gif_duration [Integer] Duration of the GIF, in seconds.
|
9
9
|
# @attr gif_width [Integer] Width of the GIF.
|
10
10
|
# @attr gif_height [Integer] Height of the GIF.
|
11
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
11
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
12
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
13
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
14
|
+
# Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation,
|
15
|
+
# InputMessageVenue or InputMessageContact.
|
15
16
|
class InputInlineQueryResult::AnimatedGif < InputInlineQueryResult
|
16
17
|
attribute :id, TD::Types::String
|
17
18
|
attribute :title, TD::Types::String
|
@@ -9,10 +9,11 @@ module TD::Types
|
|
9
9
|
# @attr mpeg4_duration [Integer] Duration of the video, in seconds.
|
10
10
|
# @attr mpeg4_width [Integer] Width of the video.
|
11
11
|
# @attr mpeg4_height [Integer] Height of the video.
|
12
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
12
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
13
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
14
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
15
|
+
# Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation,
|
16
|
+
# InputMessageVenue or InputMessageContact.
|
16
17
|
class InputInlineQueryResult::AnimatedMpeg4 < InputInlineQueryResult
|
17
18
|
attribute :id, TD::Types::String
|
18
19
|
attribute :title, TD::Types::String
|
@@ -9,10 +9,11 @@ module TD::Types
|
|
9
9
|
# @attr thumbnail_url [String] URL of the result thumbnail, if it exists.
|
10
10
|
# @attr thumbnail_width [Integer] Thumbnail width, if known.
|
11
11
|
# @attr thumbnail_height [Integer] Thumbnail height, if known.
|
12
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
12
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
13
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
14
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
15
|
+
# Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or
|
16
|
+
# InputMessageContact.
|
16
17
|
class InputInlineQueryResult::Article < InputInlineQueryResult
|
17
18
|
attribute :id, TD::Types::String
|
18
19
|
attribute :url, TD::Types::String
|
@@ -6,10 +6,11 @@ module TD::Types
|
|
6
6
|
# @attr performer [String] Performer of the audio file.
|
7
7
|
# @attr audio_url [String] The URL of the audio file.
|
8
8
|
# @attr audio_duration [Integer] Audio file duration, in seconds.
|
9
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
9
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
10
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
11
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
12
|
+
# Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue
|
13
|
+
# or InputMessageContact.
|
13
14
|
class InputInlineQueryResult::Audio < InputInlineQueryResult
|
14
15
|
attribute :id, TD::Types::String
|
15
16
|
attribute :title, TD::Types::String
|
@@ -6,10 +6,11 @@ module TD::Types
|
|
6
6
|
# @attr thumbnail_url [String] URL of the result thumbnail, if it exists.
|
7
7
|
# @attr thumbnail_width [Integer] Thumbnail width, if known.
|
8
8
|
# @attr thumbnail_height [Integer] Thumbnail height, if known.
|
9
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
9
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
10
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
11
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
12
|
+
# Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or
|
13
|
+
# InputMessageContact.
|
13
14
|
class InputInlineQueryResult::Contact < InputInlineQueryResult
|
14
15
|
attribute :id, TD::Types::String
|
15
16
|
attribute :contact, TD::Types::Contact
|
@@ -10,10 +10,11 @@ module TD::Types
|
|
10
10
|
# @attr thumbnail_url [String] The URL of the file thumbnail, if it exists.
|
11
11
|
# @attr thumbnail_width [Integer] Width of the thumbnail.
|
12
12
|
# @attr thumbnail_height [Integer] Height of the thumbnail.
|
13
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
13
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
14
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
15
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
16
|
+
# Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation,
|
17
|
+
# InputMessageVenue or InputMessageContact.
|
17
18
|
class InputInlineQueryResult::Document < InputInlineQueryResult
|
18
19
|
attribute :id, TD::Types::String
|
19
20
|
attribute :title, TD::Types::String
|
@@ -3,7 +3,8 @@ module TD::Types
|
|
3
3
|
#
|
4
4
|
# @attr id [String] Unique identifier of the query result.
|
5
5
|
# @attr game_short_name [String] Short name of the game.
|
6
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
6
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] Message reply markup.
|
7
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
7
8
|
class InputInlineQueryResult::Game < InputInlineQueryResult
|
8
9
|
attribute :id, TD::Types::String
|
9
10
|
attribute :game_short_name, TD::Types::String
|
@@ -9,10 +9,11 @@ module TD::Types
|
|
9
9
|
# @attr thumbnail_url [String] URL of the result thumbnail, if it exists.
|
10
10
|
# @attr thumbnail_width [Integer] Thumbnail width, if known.
|
11
11
|
# @attr thumbnail_height [Integer] Thumbnail height, if known.
|
12
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
12
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
13
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
14
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
15
|
+
# Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or
|
16
|
+
# InputMessageContact.
|
16
17
|
class InputInlineQueryResult::Location < InputInlineQueryResult
|
17
18
|
attribute :id, TD::Types::String
|
18
19
|
attribute :location, TD::Types::Location
|