tdlib-ruby 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# An audio message.
|
3
|
+
#
|
4
|
+
# @attr audio [TD::Types::Audio, nil] Message content; may be null.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Audio < PushMessageContent
|
7
|
+
attribute :audio, TD::Types::Audio.optional.default(nil)
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# New chat members were invited to a group.
|
3
|
+
#
|
4
|
+
# @attr member_name [String] Name of the added member.
|
5
|
+
# @attr is_current_user [Boolean] True, if the current user was added to the group.
|
6
|
+
# @attr is_returned [Boolean] True, if the user has returned to the group himself.
|
7
|
+
class PushMessageContent::ChatAddMembers < PushMessageContent
|
8
|
+
attribute :member_name, TD::Types::String
|
9
|
+
attribute :is_current_user, TD::Types::Bool
|
10
|
+
attribute :is_returned, TD::Types::Bool
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A chat member was deleted.
|
3
|
+
#
|
4
|
+
# @attr member_name [String] Name of the deleted member.
|
5
|
+
# @attr is_current_user [Boolean] True, if the current user was deleted from the group.
|
6
|
+
# @attr is_left [Boolean] True, if the user has left the group himself.
|
7
|
+
class PushMessageContent::ChatDeleteMember < PushMessageContent
|
8
|
+
attribute :member_name, TD::Types::String
|
9
|
+
attribute :is_current_user, TD::Types::Bool
|
10
|
+
attribute :is_left, TD::Types::Bool
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A message with a user contact.
|
3
|
+
#
|
4
|
+
# @attr name [String] Contact's name.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Contact < PushMessageContent
|
7
|
+
attribute :name, TD::Types::String
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A document message (a general file).
|
3
|
+
#
|
4
|
+
# @attr document [TD::Types::Document, nil] Message content; may be null.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Document < PushMessageContent
|
7
|
+
attribute :document, TD::Types::Document.optional.default(nil)
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A message with a game.
|
3
|
+
#
|
4
|
+
# @attr title [String, nil] Game title, empty for pinned game message.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Game < PushMessageContent
|
7
|
+
attribute :title, TD::Types::String.optional.default(nil)
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A new high score was achieved in a game.
|
3
|
+
#
|
4
|
+
# @attr title [String, nil] Game title, empty for pinned message.
|
5
|
+
# @attr score [Integer] New score, 0 for pinned message.
|
6
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
7
|
+
class PushMessageContent::GameScore < PushMessageContent
|
8
|
+
attribute :title, TD::Types::String.optional.default(nil)
|
9
|
+
attribute :score, TD::Types::Integer
|
10
|
+
attribute :is_pinned, TD::Types::Bool
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A general message with hidden content.
|
3
|
+
#
|
4
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
5
|
+
class PushMessageContent::Hidden < PushMessageContent
|
6
|
+
attribute :is_pinned, TD::Types::Bool
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A message with an invoice from a bot.
|
3
|
+
#
|
4
|
+
# @attr price [String] Product price.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Invoice < PushMessageContent
|
7
|
+
attribute :price, TD::Types::String
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A message with a location.
|
3
|
+
#
|
4
|
+
# @attr is_live [Boolean] True, if the location is live.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Location < PushMessageContent
|
7
|
+
attribute :is_live, TD::Types::Bool
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A media album.
|
3
|
+
#
|
4
|
+
# @attr total_count [Integer] Number of messages in the album.
|
5
|
+
# @attr has_photos [Boolean] True, if the album has at least one photo.
|
6
|
+
# @attr has_videos [Boolean] True, if the album has at least one video.
|
7
|
+
class PushMessageContent::MediaAlbum < PushMessageContent
|
8
|
+
attribute :total_count, TD::Types::Integer
|
9
|
+
attribute :has_photos, TD::Types::Bool
|
10
|
+
attribute :has_videos, TD::Types::Bool
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A photo message.
|
3
|
+
#
|
4
|
+
# @attr photo [TD::Types::Photo, nil] Message content; may be null.
|
5
|
+
# @attr caption [String] Photo caption.
|
6
|
+
# @attr is_secret [Boolean] True, if the photo is secret.
|
7
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
8
|
+
class PushMessageContent::Photo < PushMessageContent
|
9
|
+
attribute :photo, TD::Types::Photo.optional.default(nil)
|
10
|
+
attribute :caption, TD::Types::String
|
11
|
+
attribute :is_secret, TD::Types::Bool
|
12
|
+
attribute :is_pinned, TD::Types::Bool
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A message with a poll.
|
3
|
+
#
|
4
|
+
# @attr question [String] Poll question.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Poll < PushMessageContent
|
7
|
+
attribute :question, TD::Types::String
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A message with a sticker.
|
3
|
+
#
|
4
|
+
# @attr sticker [TD::Types::Sticker, nil] Message content; may be null.
|
5
|
+
# @attr emoji [String, nil] Emoji corresponding to the sticker; may be empty.
|
6
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
7
|
+
class PushMessageContent::Sticker < PushMessageContent
|
8
|
+
attribute :sticker, TD::Types::Sticker.optional.default(nil)
|
9
|
+
attribute :emoji, TD::Types::String.optional.default(nil)
|
10
|
+
attribute :is_pinned, TD::Types::Bool
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A text message.
|
3
|
+
#
|
4
|
+
# @attr text [String] Message text.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::Text < PushMessageContent
|
7
|
+
attribute :text, TD::Types::String
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A video message.
|
3
|
+
#
|
4
|
+
# @attr video [TD::Types::Video, nil] Message content; may be null.
|
5
|
+
# @attr caption [String] Video caption.
|
6
|
+
# @attr is_secret [Boolean] True, if the video is secret.
|
7
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
8
|
+
class PushMessageContent::Video < PushMessageContent
|
9
|
+
attribute :video, TD::Types::Video.optional.default(nil)
|
10
|
+
attribute :caption, TD::Types::String
|
11
|
+
attribute :is_secret, TD::Types::Bool
|
12
|
+
attribute :is_pinned, TD::Types::Bool
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A video note message.
|
3
|
+
#
|
4
|
+
# @attr video_note [TD::Types::VideoNote, nil] Message content; may be null.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::VideoNote < PushMessageContent
|
7
|
+
attribute :video_note, TD::Types::VideoNote.optional.default(nil)
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A voice note message.
|
3
|
+
#
|
4
|
+
# @attr voice_note [TD::Types::VoiceNote, nil] Message content; may be null.
|
5
|
+
# @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content.
|
6
|
+
class PushMessageContent::VoiceNote < PushMessageContent
|
7
|
+
attribute :voice_note, TD::Types::VoiceNote.optional.default(nil)
|
8
|
+
attribute :is_pinned, TD::Types::Bool
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Contains a globally unique push receiver identifier, which can be used to identify which account has received a
|
3
|
+
# push notification.
|
4
|
+
#
|
5
|
+
# @attr id [Integer] The globally unique identifier of push notification subscription.
|
6
|
+
class PushReceiverId < Base
|
7
|
+
attribute :id, TD::Types::Integer
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A small image inside the text.
|
3
|
+
#
|
4
|
+
# @attr document [TD::Types::Document] The image represented as a document.
|
5
|
+
# The image can be in GIF, JPEG or PNG format.
|
6
|
+
# @attr width [Integer] Width of a bounding box in which the image should be shown; 0 if unknown.
|
7
|
+
# @attr height [Integer] Height of a bounding box in which the image should be shown; 0 if unknown.
|
8
|
+
class RichText::Icon < RichText
|
9
|
+
attribute :document, TD::Types::Document
|
10
|
+
attribute :width, TD::Types::Integer
|
11
|
+
attribute :height, TD::Types::Integer
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A rich text phone number.
|
3
|
+
#
|
4
|
+
# @attr text [TD::Types::RichText] Text.
|
5
|
+
# @attr phone_number [String] Phone number.
|
6
|
+
class RichText::PhoneNumber < RichText
|
7
|
+
attribute :text, TD::Types::RichText
|
8
|
+
attribute :phone_number, TD::Types::String
|
9
|
+
end
|
10
|
+
end
|
@@ -5,9 +5,15 @@ module TD::Types
|
|
5
5
|
# @attr sound [String] The name of an audio file to be used for notification sounds; only applies to iOS
|
6
6
|
# applications.
|
7
7
|
# @attr show_preview [Boolean] True, if message content should be displayed in notifications.
|
8
|
+
# @attr disable_pinned_message_notifications [Boolean] True, if notifications for incoming pinned messages will be
|
9
|
+
# created as for an ordinary unread message.
|
10
|
+
# @attr disable_mention_notifications [Boolean] True, if notifications for messages with mentions will be created as
|
11
|
+
# for an ordinary unread message.
|
8
12
|
class ScopeNotificationSettings < Base
|
9
13
|
attribute :mute_for, TD::Types::Integer
|
10
14
|
attribute :sound, TD::Types::String
|
11
15
|
attribute :show_preview, TD::Types::Bool
|
16
|
+
attribute :disable_pinned_message_notifications, TD::Types::Bool
|
17
|
+
attribute :disable_mention_notifications, TD::Types::Bool
|
12
18
|
end
|
13
19
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# Returns only messages with unread mentions of the current user or messages that are replies to their messages.
|
2
|
+
# Returns only messages with unread mentions of the current user, or messages that are replies to their messages.
|
3
3
|
# When using this filter the results can't be additionally filtered by a query or by the sending user.
|
4
4
|
class SearchMessagesFilter::UnreadMention < SearchMessagesFilter
|
5
5
|
end
|
data/lib/tdlib/types/session.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
module TD::Types
|
2
2
|
# Contains information about one session in a Telegram application used by the current user.
|
3
|
+
# Sessions should be shown to the user in the returned order.
|
3
4
|
#
|
4
5
|
# @attr id [Integer] Session identifier.
|
5
6
|
# @attr is_current [Boolean] True, if this session is the current session.
|
7
|
+
# @attr is_password_pending [Boolean] True, if a password is needed to complete authorization of the session.
|
6
8
|
# @attr api_id [Integer] Telegram API identifier, as provided by the application.
|
7
9
|
# @attr application_name [String] Name of the application, as provided by the application.
|
8
10
|
# @attr application_version [String] The version of the application, as provided by the application.
|
@@ -23,6 +25,7 @@ module TD::Types
|
|
23
25
|
class Session < Base
|
24
26
|
attribute :id, TD::Types::Integer
|
25
27
|
attribute :is_current, TD::Types::Bool
|
28
|
+
attribute :is_password_pending, TD::Types::Bool
|
26
29
|
attribute :api_id, TD::Types::Integer
|
27
30
|
attribute :application_name, TD::Types::String
|
28
31
|
attribute :application_version, TD::Types::String
|
data/lib/tdlib/types/sticker.rb
CHANGED
@@ -5,6 +5,7 @@ module TD::Types
|
|
5
5
|
# @attr width [Integer] Sticker width; as defined by the sender.
|
6
6
|
# @attr height [Integer] Sticker height; as defined by the sender.
|
7
7
|
# @attr emoji [String] Emoji corresponding to the sticker.
|
8
|
+
# @attr is_animated [Boolean] True, if the sticker is an animated sticker in TGS format.
|
8
9
|
# @attr is_mask [Boolean] True, if the sticker is a mask.
|
9
10
|
# @attr mask_position [TD::Types::MaskPosition, nil] Position where the mask should be placed; may be null.
|
10
11
|
# @attr thumbnail [TD::Types::PhotoSize, nil] Sticker thumbnail in WEBP or JPEG format; may be null.
|
@@ -14,6 +15,7 @@ module TD::Types
|
|
14
15
|
attribute :width, TD::Types::Integer
|
15
16
|
attribute :height, TD::Types::Integer
|
16
17
|
attribute :emoji, TD::Types::String
|
18
|
+
attribute :is_animated, TD::Types::Bool
|
17
19
|
attribute :is_mask, TD::Types::Bool
|
18
20
|
attribute :mask_position, TD::Types::MaskPosition.optional.default(nil)
|
19
21
|
attribute :thumbnail, TD::Types::PhotoSize.optional.default(nil)
|