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
@@ -8,9 +8,11 @@ module TD::Types
|
|
8
8
|
# @attr photo_url [String] The URL of the JPEG photo (photo size must not exceed 5MB).
|
9
9
|
# @attr photo_width [Integer] Width of the photo.
|
10
10
|
# @attr photo_height [Integer] Height of the photo.
|
11
|
-
# @attr
|
12
|
-
# TD::Types::
|
13
|
-
#
|
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, InputMessagePhoto, InputMessageLocation, InputMessageVenue
|
15
|
+
# or InputMessageContact.
|
14
16
|
class InputInlineQueryResult::Photo < InputInlineQueryResult
|
15
17
|
attribute :id, TD::Types::String
|
16
18
|
attribute :title, TD::Types::String
|
@@ -1,15 +1,16 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# Represents a link to a WEBP sticker.
|
2
|
+
# Represents a link to a WEBP or a TGS sticker.
|
3
3
|
#
|
4
4
|
# @attr id [String] Unique identifier of the query result.
|
5
5
|
# @attr thumbnail_url [String] URL of the sticker thumbnail, if it exists.
|
6
|
-
# @attr sticker_url [String] The URL of the WEBP sticker (sticker file size must not exceed 5MB).
|
6
|
+
# @attr sticker_url [String] The URL of the WEBP or a TGS sticker (sticker file size must not exceed 5MB).
|
7
7
|
# @attr sticker_width [Integer] Width of the sticker.
|
8
8
|
# @attr sticker_height [Integer] Height of the sticker.
|
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, inputMessageSticker, InputMessageLocation,
|
13
|
+
# InputMessageVenue or InputMessageContact.
|
13
14
|
class InputInlineQueryResult::Sticker < InputInlineQueryResult
|
14
15
|
attribute :id, TD::Types::String
|
15
16
|
attribute :thumbnail_url, 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::Venue < InputInlineQueryResult
|
14
15
|
attribute :id, TD::Types::String
|
15
16
|
attribute :venue, TD::Types::Venue
|
@@ -11,10 +11,11 @@ module TD::Types
|
|
11
11
|
# @attr video_width [Integer] Width of the video.
|
12
12
|
# @attr video_height [Integer] Height of the video.
|
13
13
|
# @attr video_duration [Integer] Video duration, in seconds.
|
14
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
14
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
15
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
16
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
17
|
+
# Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue
|
18
|
+
# or InputMessageContact.
|
18
19
|
class InputInlineQueryResult::Video < InputInlineQueryResult
|
19
20
|
attribute :id, TD::Types::String
|
20
21
|
attribute :title, TD::Types::String
|
@@ -5,10 +5,11 @@ module TD::Types
|
|
5
5
|
# @attr title [String] Title of the voice note.
|
6
6
|
# @attr voice_note_url [String] The URL of the voice note file.
|
7
7
|
# @attr voice_note_duration [Integer] Duration of the voice note, in seconds.
|
8
|
-
# @attr reply_markup [TD::Types::ReplyMarkup
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
8
|
+
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|
9
|
+
# Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null.
|
10
|
+
# @attr input_message_content [TD::Types::InputMessageContent] The content of the message to be sent.
|
11
|
+
# Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation,
|
12
|
+
# InputMessageVenue or InputMessageContact.
|
12
13
|
class InputInlineQueryResult::VoiceNote < InputInlineQueryResult
|
13
14
|
attribute :id, TD::Types::String
|
14
15
|
attribute :title, TD::Types::String
|
@@ -5,9 +5,16 @@ module TD::Types
|
|
5
5
|
# @attr message_id [Integer] Identifier of the message to forward.
|
6
6
|
# @attr in_game_share [Boolean] True, if a game message should be shared within a launched game; applies only to game
|
7
7
|
# messages.
|
8
|
+
# @attr send_copy [Boolean] True, if content of the message needs to be copied without a link to the original
|
9
|
+
# message.
|
10
|
+
# Always true if the message is forwarded to a secret chat.
|
11
|
+
# @attr remove_caption [Boolean] True, if media caption of the message copy needs to be removed.
|
12
|
+
# Ignored if send_copy is false.
|
8
13
|
class InputMessageContent::Forwarded < InputMessageContent
|
9
14
|
attribute :from_chat_id, TD::Types::Integer
|
10
15
|
attribute :message_id, TD::Types::Integer
|
11
16
|
attribute :in_game_share, TD::Types::Bool
|
17
|
+
attribute :send_copy, TD::Types::Bool
|
18
|
+
attribute :remove_caption, TD::Types::Bool
|
12
19
|
end
|
13
20
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# A message with a poll.
|
3
|
+
# Polls can't be sent to private or secret chats.
|
4
|
+
#
|
5
|
+
# @attr question [String] Poll question, 1-255 characters.
|
6
|
+
# @attr options [Array<String>] List of poll answer options, 2-10 strings 1-100 characters each.
|
7
|
+
class InputMessageContent::Poll < InputMessageContent
|
8
|
+
attribute :question, TD::Types::String
|
9
|
+
attribute :options, TD::Types::Array.of(TD::Types::String)
|
10
|
+
end
|
11
|
+
end
|
@@ -4,9 +4,9 @@ module TD::Types
|
|
4
4
|
#
|
5
5
|
# @attr thumbnail [TD::Types::InputFile] Thumbnail file to send.
|
6
6
|
# Sending thumbnails by file_id is currently not supported.
|
7
|
-
# @attr width [Integer] Thumbnail width, usually shouldn't exceed
|
7
|
+
# @attr width [Integer] Thumbnail width, usually shouldn't exceed 320.
|
8
8
|
# Use 0 if unknown.
|
9
|
-
# @attr height [Integer] Thumbnail height, usually shouldn't exceed
|
9
|
+
# @attr height [Integer] Thumbnail height, usually shouldn't exceed 320.
|
10
10
|
# Use 0 if unknown.
|
11
11
|
class InputThumbnail < Base
|
12
12
|
attribute :thumbnail, TD::Types::InputFile
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Represents one member of a JSON object.
|
3
|
+
#
|
4
|
+
# @attr key [String] Member's key.
|
5
|
+
# @attr value [TD::Types::JsonValue] Member's value.
|
6
|
+
class JsonObjectMember < Base
|
7
|
+
attribute :key, TD::Types::String
|
8
|
+
attribute :value, TD::Types::JsonValue
|
9
|
+
end
|
10
|
+
end
|
@@ -2,13 +2,34 @@ module TD::Types
|
|
2
2
|
# Contains information about a language pack.
|
3
3
|
#
|
4
4
|
# @attr id [String] Unique language pack identifier.
|
5
|
+
# @attr base_language_pack_id [String, nil] Identifier of a base language pack; may be empty.
|
6
|
+
# If a string is missed in the language pack, then it should be fetched from base language pack.
|
7
|
+
# Unsupported in custom language packs.
|
5
8
|
# @attr name [String] Language name.
|
6
9
|
# @attr native_name [String] Name of the language in that language.
|
10
|
+
# @attr plural_code [String] A language code to be used to apply plural forms.
|
11
|
+
# See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info.
|
12
|
+
# @attr is_official [Boolean] True, if the language pack is official.
|
13
|
+
# @attr is_rtl [Boolean] True, if the language pack strings are RTL.
|
14
|
+
# @attr is_beta [Boolean] True, if the language pack is a beta language pack.
|
15
|
+
# @attr is_installed [Boolean] True, if the language pack is installed by the current user.
|
16
|
+
# @attr total_string_count [Integer] Total number of non-deleted strings from the language pack.
|
17
|
+
# @attr translated_string_count [Integer] Total number of translated strings from the language pack.
|
7
18
|
# @attr local_string_count [Integer] Total number of non-deleted strings from the language pack available locally.
|
19
|
+
# @attr translation_url [String, nil] Link to language translation interface; empty for custom local language packs.
|
8
20
|
class LanguagePackInfo < Base
|
9
21
|
attribute :id, TD::Types::String
|
22
|
+
attribute :base_language_pack_id, TD::Types::String.optional.default(nil)
|
10
23
|
attribute :name, TD::Types::String
|
11
24
|
attribute :native_name, TD::Types::String
|
25
|
+
attribute :plural_code, TD::Types::String
|
26
|
+
attribute :is_official, TD::Types::Bool
|
27
|
+
attribute :is_rtl, TD::Types::Bool
|
28
|
+
attribute :is_beta, TD::Types::Bool
|
29
|
+
attribute :is_installed, TD::Types::Bool
|
30
|
+
attribute :total_string_count, TD::Types::Integer
|
31
|
+
attribute :translated_string_count, TD::Types::Integer
|
12
32
|
attribute :local_string_count, TD::Types::Integer
|
33
|
+
attribute :translation_url, TD::Types::String.optional.default(nil)
|
13
34
|
end
|
14
35
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module TD::Types
|
2
2
|
# A language pack string which has different forms based on the number of some object it mentions.
|
3
|
+
# See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info.
|
3
4
|
#
|
4
5
|
# @attr zero_value [String] Value for zero objects.
|
5
6
|
# @attr one_value [String] Value for one object.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# The phone number of user A is known but that number has not been saved to the
|
2
|
+
# The phone number of user A is known but that number has not been saved to the contact list of user B.
|
3
3
|
class LinkState::KnowsPhoneNumber < LinkState
|
4
4
|
end
|
5
5
|
end
|
@@ -7,8 +7,10 @@ module TD::Types
|
|
7
7
|
# @attr is_downloading_active [Boolean] True, if the file is currently being downloaded (or a local copy is being
|
8
8
|
# generated by some other means).
|
9
9
|
# @attr is_downloading_completed [Boolean] True, if the local copy is fully available.
|
10
|
-
# @attr
|
11
|
-
#
|
10
|
+
# @attr download_offset [Integer] Download will be started from this offset.
|
11
|
+
# downloaded_prefix_size is calculated from this offset.
|
12
|
+
# @attr downloaded_prefix_size [Integer] If is_downloading_completed is false, then only some prefix of the file
|
13
|
+
# starting from download_offset is ready to be read.
|
12
14
|
# downloaded_prefix_size is the size of that prefix.
|
13
15
|
# @attr downloaded_size [Integer] Total downloaded file bytes.
|
14
16
|
# Should be used only for calculating download progress.
|
@@ -19,6 +21,7 @@ module TD::Types
|
|
19
21
|
attribute :can_be_deleted, TD::Types::Bool
|
20
22
|
attribute :is_downloading_active, TD::Types::Bool
|
21
23
|
attribute :is_downloading_completed, TD::Types::Bool
|
24
|
+
attribute :download_offset, TD::Types::Integer
|
22
25
|
attribute :downloaded_prefix_size, TD::Types::Integer
|
23
26
|
attribute :downloaded_size, TD::Types::Integer
|
24
27
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The log is written to a file.
|
3
|
+
#
|
4
|
+
# @attr path [String] Path to the file to where the internal TDLib log will be written.
|
5
|
+
# @attr max_file_size [Integer] Maximum size of the file to where the internal TDLib log is written before the file
|
6
|
+
# will be auto-rotated.
|
7
|
+
class LogStream::File < LogStream
|
8
|
+
attribute :path, TD::Types::String
|
9
|
+
attribute :max_file_size, TD::Types::Integer
|
10
|
+
end
|
11
|
+
end
|
data/lib/tdlib/types/message.rb
CHANGED
@@ -3,12 +3,14 @@ module TD::Types
|
|
3
3
|
#
|
4
4
|
# @attr id [Integer] Message identifier, unique for the chat to which the message belongs.
|
5
5
|
# @attr sender_user_id [Integer] Identifier of the user who sent the message; 0 if unknown.
|
6
|
-
#
|
6
|
+
# Currently, it is unknown for channel posts and for channel posts automatically forwarded to discussion group.
|
7
7
|
# @attr chat_id [Integer] Chat identifier.
|
8
8
|
# @attr sending_state [TD::Types::MessageSendingState, nil] Information about the sending state of the message; may
|
9
9
|
# be null.
|
10
10
|
# @attr is_outgoing [Boolean] True, if the message is outgoing.
|
11
11
|
# @attr can_be_edited [Boolean] True, if the message can be edited.
|
12
|
+
# For live location and poll messages this fields shows, whether editMessageLiveLocation or stopPoll can be used
|
13
|
+
# with this message by the client.
|
12
14
|
# @attr can_be_forwarded [Boolean] True, if the message can be forwarded.
|
13
15
|
# @attr can_be_deleted_only_for_self [Boolean] True, if the message can be deleted only for the current user while
|
14
16
|
# other users will continue to see it.
|
@@ -2,7 +2,7 @@ module TD::Types
|
|
2
2
|
# A new high score was achieved in a game.
|
3
3
|
#
|
4
4
|
# @attr game_message_id [Integer] Identifier of the message with the game, can be an identifier of a deleted message.
|
5
|
-
# @attr game_id [Integer] Identifier of the game
|
5
|
+
# @attr game_id [Integer] Identifier of the game; may be different from the games presented in the message with the
|
6
6
|
# game.
|
7
7
|
# @attr score [Integer] New score.
|
8
8
|
class MessageContent::GameScore < MessageContent
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module TD::Types
|
2
2
|
# A message has been pinned.
|
3
3
|
#
|
4
|
-
# @attr message_id [Integer] Identifier of the pinned message, can be an identifier of a deleted message.
|
4
|
+
# @attr message_id [Integer] Identifier of the pinned message, can be an identifier of a deleted message or 0.
|
5
5
|
class MessageContent::PinMessage < MessageContent
|
6
6
|
attribute :message_id, TD::Types::Integer
|
7
7
|
end
|
@@ -1,11 +1,17 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# Contains information about
|
2
|
+
# Contains information about a forwarded message.
|
3
|
+
#
|
4
|
+
# @attr origin [TD::Types::MessageForwardOrigin] Origin of a forwarded message.
|
5
|
+
# @attr date [Integer] Point in time (Unix timestamp) when the message was originally sent.
|
6
|
+
# @attr from_chat_id [Integer] For messages forwarded to the chat with the current user (saved messages) or to the
|
7
|
+
# channel discussion supergroup, the identifier of the chat from which the message was forwarded last time; 0 if unknown.
|
8
|
+
# @attr from_message_id [Integer] For messages forwarded to the chat with the current user (saved messages) or to the
|
9
|
+
# channel discussion supergroup, the identifier of the original message from which the new message was forwarded last
|
10
|
+
# time; 0 if unknown.
|
3
11
|
class MessageForwardInfo < Base
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
autoload TD::Types.camelize(type), "tdlib/types/message_forward_info/#{type}"
|
9
|
-
end
|
12
|
+
attribute :origin, TD::Types::MessageForwardOrigin
|
13
|
+
attribute :date, TD::Types::Integer
|
14
|
+
attribute :from_chat_id, TD::Types::Integer
|
15
|
+
attribute :from_message_id, TD::Types::Integer
|
10
16
|
end
|
11
17
|
end
|