From 979d2cae48e45d305047946a0f326d0c873a192e Mon Sep 17 00:00:00 2001 From: Vladislav Yashin Date: Mon, 28 Jun 2021 14:44:00 +0300 Subject: [PATCH] Make types coercible --- CHANGELOG.md | 4 + bin/parser | 12 +- lib/tdlib/client_methods.rb | 339 +++++++++--------- lib/tdlib/types/account_ttl.rb | 2 +- lib/tdlib/types/address.rb | 12 +- lib/tdlib/types/animated_chat_photo.rb | 4 +- lib/tdlib/types/animation.rb | 10 +- lib/tdlib/types/audio.rb | 10 +- lib/tdlib/types/authentication_code_info.rb | 4 +- .../types/authentication_code_type/call.rb | 2 +- .../authentication_code_type/flash_call.rb | 2 +- .../types/authentication_code_type/sms.rb | 2 +- .../telegram_message.rb | 2 +- .../wait_other_device_confirmation.rb | 2 +- .../authorization_state/wait_password.rb | 6 +- lib/tdlib/types/auto_download_settings.rb | 8 +- lib/tdlib/types/background.rb | 4 +- lib/tdlib/types/background_fill/gradient.rb | 6 +- lib/tdlib/types/background_fill/solid.rb | 2 +- lib/tdlib/types/background_type/pattern.rb | 2 +- lib/tdlib/types/bank_card_action_open_url.rb | 4 +- lib/tdlib/types/bank_card_info.rb | 2 +- lib/tdlib/types/basic_group.rb | 6 +- lib/tdlib/types/basic_group_full_info.rb | 4 +- lib/tdlib/types/bot_command.rb | 4 +- lib/tdlib/types/bot_info.rb | 2 +- lib/tdlib/types/call.rb | 4 +- lib/tdlib/types/call_id.rb | 2 +- lib/tdlib/types/call_protocol.rb | 6 +- lib/tdlib/types/call_server.rb | 8 +- .../call_server_type/telegram_reflector.rb | 2 +- lib/tdlib/types/call_server_type/webrtc.rb | 4 +- lib/tdlib/types/call_state/ready.rb | 6 +- lib/tdlib/types/callback_query_answer.rb | 4 +- .../types/callback_query_payload/data.rb | 2 +- .../data_with_password.rb | 4 +- .../types/callback_query_payload/game.rb | 2 +- .../password_too_fresh.rb | 2 +- .../session_too_fresh.rb | 2 +- lib/tdlib/types/chat.rb | 18 +- .../types/chat_action/uploading_document.rb | 2 +- .../types/chat_action/uploading_photo.rb | 2 +- .../types/chat_action/uploading_video.rb | 2 +- .../types/chat_action/uploading_video_note.rb | 2 +- .../types/chat_action/uploading_voice_note.rb | 2 +- .../types/chat_action_bar/report_add_block.rb | 2 +- lib/tdlib/types/chat_administrator.rb | 4 +- lib/tdlib/types/chat_event.rb | 6 +- .../chat_event_action/description_changed.rb | 4 +- .../chat_event_action/linked_chat_changed.rb | 4 +- .../types/chat_event_action/member_invited.rb | 2 +- .../chat_event_action/member_promoted.rb | 2 +- .../message_ttl_setting_changed.rb | 4 +- .../slow_mode_delay_changed.rb | 4 +- .../chat_event_action/sticker_set_changed.rb | 4 +- .../types/chat_event_action/title_changed.rb | 4 +- .../chat_event_action/username_changed.rb | 4 +- .../chat_event_action/voice_chat_created.rb | 2 +- .../chat_event_action/voice_chat_discarded.rb | 2 +- ...e_chat_participant_volume_level_changed.rb | 2 +- lib/tdlib/types/chat_filter.rb | 10 +- lib/tdlib/types/chat_filter_info.rb | 6 +- lib/tdlib/types/chat_invite_link.rb | 14 +- lib/tdlib/types/chat_invite_link_count.rb | 6 +- lib/tdlib/types/chat_invite_link_info.rb | 10 +- lib/tdlib/types/chat_invite_link_member.rb | 4 +- lib/tdlib/types/chat_invite_link_members.rb | 2 +- lib/tdlib/types/chat_invite_links.rb | 2 +- lib/tdlib/types/chat_list/filter.rb | 2 +- lib/tdlib/types/chat_location.rb | 2 +- lib/tdlib/types/chat_member.rb | 4 +- .../types/chat_member_status/administrator.rb | 4 +- lib/tdlib/types/chat_member_status/banned.rb | 2 +- lib/tdlib/types/chat_member_status/creator.rb | 4 +- .../types/chat_member_status/restricted.rb | 2 +- lib/tdlib/types/chat_members.rb | 2 +- .../types/chat_members_filter/mention.rb | 2 +- lib/tdlib/types/chat_nearby.rb | 4 +- lib/tdlib/types/chat_notification_settings.rb | 4 +- lib/tdlib/types/chat_photo.rb | 4 +- lib/tdlib/types/chat_photos.rb | 2 +- lib/tdlib/types/chat_position.rb | 2 +- .../public_service_announcement.rb | 4 +- lib/tdlib/types/chat_statistics/channel.rb | 2 +- ...t_statistics_administrator_actions_info.rb | 8 +- .../types/chat_statistics_inviter_info.rb | 4 +- ...hat_statistics_message_interaction_info.rb | 6 +- .../chat_statistics_message_sender_info.rb | 6 +- lib/tdlib/types/chat_type/basic_group.rb | 2 +- lib/tdlib/types/chat_type/private.rb | 2 +- lib/tdlib/types/chat_type/secret.rb | 4 +- lib/tdlib/types/chat_type/supergroup.rb | 2 +- lib/tdlib/types/chats.rb | 4 +- lib/tdlib/types/connected_website.rb | 20 +- lib/tdlib/types/contact.rb | 10 +- lib/tdlib/types/count.rb | 2 +- lib/tdlib/types/country_info.rb | 8 +- lib/tdlib/types/custom_request_result.rb | 2 +- lib/tdlib/types/database_statistics.rb | 2 +- lib/tdlib/types/date.rb | 6 +- lib/tdlib/types/date_range.rb | 4 +- lib/tdlib/types/dated_file.rb | 2 +- lib/tdlib/types/device_token/apple_push.rb | 2 +- .../types/device_token/apple_push_vo_ip.rb | 2 +- .../types/device_token/black_berry_push.rb | 2 +- .../device_token/firebase_cloud_messaging.rb | 2 +- .../types/device_token/microsoft_push.rb | 2 +- .../device_token/microsoft_push_vo_ip.rb | 2 +- lib/tdlib/types/device_token/simple_push.rb | 4 +- lib/tdlib/types/device_token/tizen_push.rb | 2 +- lib/tdlib/types/device_token/ubuntu_push.rb | 2 +- lib/tdlib/types/device_token/web_push.rb | 8 +- lib/tdlib/types/device_token/windows_push.rb | 4 +- lib/tdlib/types/document.rb | 4 +- lib/tdlib/types/draft_message.rb | 4 +- .../email_address_authentication_code_info.rb | 5 +- lib/tdlib/types/emojis.rb | 2 +- lib/tdlib/types/encrypted_credentials.rb | 6 +- lib/tdlib/types/encrypted_passport_element.rb | 6 +- lib/tdlib/types/error.rb | 4 +- lib/tdlib/types/file.rb | 6 +- lib/tdlib/types/file_part.rb | 2 +- lib/tdlib/types/formatted_text.rb | 2 +- lib/tdlib/types/found_messages.rb | 4 +- lib/tdlib/types/game.rb | 8 +- lib/tdlib/types/game_high_score.rb | 6 +- lib/tdlib/types/group_call.rb | 12 +- lib/tdlib/types/group_call_id.rb | 2 +- .../group_call_join_response_candidate.rb | 26 +- lib/tdlib/types/group_call_participant.rb | 8 +- lib/tdlib/types/group_call_payload.rb | 4 +- .../types/group_call_payload_fingerprint.rb | 6 +- lib/tdlib/types/hashtags.rb | 2 +- lib/tdlib/types/http_url.rb | 2 +- lib/tdlib/types/identity_document.rb | 2 +- lib/tdlib/types/imported_contacts.rb | 4 +- lib/tdlib/types/inline_keyboard_button.rb | 2 +- .../inline_keyboard_button_type/callback.rb | 2 +- .../callback_with_password.rb | 2 +- .../inline_keyboard_button_type/login_url.rb | 6 +- .../switch_inline.rb | 2 +- .../types/inline_keyboard_button_type/url.rb | 2 +- .../types/inline_query_result/animation.rb | 4 +- .../types/inline_query_result/article.rb | 8 +- lib/tdlib/types/inline_query_result/audio.rb | 2 +- .../types/inline_query_result/contact.rb | 2 +- .../types/inline_query_result/document.rb | 6 +- lib/tdlib/types/inline_query_result/game.rb | 2 +- .../types/inline_query_result/location.rb | 4 +- lib/tdlib/types/inline_query_result/photo.rb | 6 +- .../types/inline_query_result/sticker.rb | 2 +- lib/tdlib/types/inline_query_result/venue.rb | 2 +- lib/tdlib/types/inline_query_result/video.rb | 6 +- .../types/inline_query_result/voice_note.rb | 4 +- lib/tdlib/types/inline_query_results.rb | 10 +- lib/tdlib/types/input_background/remote.rb | 2 +- lib/tdlib/types/input_chat_photo/animation.rb | 2 +- lib/tdlib/types/input_chat_photo/previous.rb | 2 +- .../types/input_credentials/apple_pay.rb | 2 +- .../types/input_credentials/google_pay.rb | 2 +- lib/tdlib/types/input_credentials/new.rb | 2 +- lib/tdlib/types/input_credentials/saved.rb | 2 +- lib/tdlib/types/input_file/generated.rb | 10 +- lib/tdlib/types/input_file/id.rb | 2 +- lib/tdlib/types/input_file/local.rb | 2 +- lib/tdlib/types/input_file/remote.rb | 2 +- lib/tdlib/types/input_identity_document.rb | 2 +- .../input_inline_query_result/animation.rb | 18 +- .../input_inline_query_result/article.rb | 14 +- .../types/input_inline_query_result/audio.rb | 10 +- .../input_inline_query_result/contact.rb | 8 +- .../input_inline_query_result/document.rb | 18 +- .../types/input_inline_query_result/game.rb | 4 +- .../input_inline_query_result/location.rb | 12 +- .../types/input_inline_query_result/photo.rb | 14 +- .../input_inline_query_result/sticker.rb | 10 +- .../types/input_inline_query_result/venue.rb | 8 +- .../types/input_inline_query_result/video.rb | 20 +- .../input_inline_query_result/voice_note.rb | 8 +- .../types/input_message_content/animation.rb | 8 +- .../types/input_message_content/audio.rb | 6 +- lib/tdlib/types/input_message_content/dice.rb | 2 +- .../types/input_message_content/forwarded.rb | 4 +- lib/tdlib/types/input_message_content/game.rb | 4 +- .../types/input_message_content/invoice.rb | 22 +- .../types/input_message_content/location.rb | 6 +- .../types/input_message_content/photo.rb | 8 +- lib/tdlib/types/input_message_content/poll.rb | 8 +- .../types/input_message_content/sticker.rb | 6 +- .../types/input_message_content/video.rb | 10 +- .../types/input_message_content/video_note.rb | 4 +- .../types/input_message_content/voice_note.rb | 4 +- .../input_passport_element/email_address.rb | 2 +- .../input_passport_element/phone_number.rb | 2 +- .../types/input_passport_element_error.rb | 2 +- .../data_field.rb | 4 +- .../file.rb | 2 +- .../files.rb | 2 +- .../front_side.rb | 2 +- .../reverse_side.rb | 2 +- .../selfie.rb | 2 +- .../translation_file.rb | 2 +- .../translation_files.rb | 2 +- .../unspecified.rb | 2 +- lib/tdlib/types/input_sticker/animated.rb | 2 +- lib/tdlib/types/input_sticker/static.rb | 2 +- lib/tdlib/types/input_thumbnail.rb | 4 +- lib/tdlib/types/invoice.rb | 6 +- lib/tdlib/types/json_object_member.rb | 2 +- lib/tdlib/types/json_value/number.rb | 2 +- lib/tdlib/types/json_value/string.rb | 2 +- lib/tdlib/types/keyboard_button.rb | 2 +- lib/tdlib/types/labeled_price_part.rb | 4 +- lib/tdlib/types/language_pack_info.rb | 19 +- lib/tdlib/types/language_pack_string.rb | 2 +- .../language_pack_string_value/ordinary.rb | 2 +- .../language_pack_string_value/pluralized.rb | 12 +- lib/tdlib/types/local_file.rb | 8 +- lib/tdlib/types/location.rb | 6 +- lib/tdlib/types/log_stream/file.rb | 4 +- lib/tdlib/types/log_tags.rb | 2 +- lib/tdlib/types/log_verbosity_level.rb | 2 +- lib/tdlib/types/login_url_info/open.rb | 2 +- .../login_url_info/request_confirmation.rb | 6 +- lib/tdlib/types/mask_position.rb | 6 +- lib/tdlib/types/message.rb | 29 +- .../basic_group_chat_create.rb | 4 +- lib/tdlib/types/message_content/call.rb | 2 +- .../types/message_content/chat_add_members.rb | 2 +- .../message_content/chat_change_title.rb | 2 +- .../message_content/chat_delete_member.rb | 2 +- .../types/message_content/chat_set_ttl.rb | 2 +- .../message_content/chat_upgrade_from.rb | 4 +- .../types/message_content/chat_upgrade_to.rb | 2 +- .../message_content/custom_service_action.rb | 2 +- lib/tdlib/types/message_content/dice.rb | 6 +- lib/tdlib/types/message_content/game_score.rb | 6 +- .../invite_voice_chat_participants.rb | 4 +- lib/tdlib/types/message_content/invoice.rb | 12 +- lib/tdlib/types/message_content/location.rb | 8 +- .../message_content/payment_successful.rb | 8 +- .../message_content/payment_successful_bot.rb | 14 +- .../types/message_content/pin_message.rb | 2 +- .../proximity_alert_triggered.rb | 2 +- .../message_content/supergroup_chat_create.rb | 2 +- .../types/message_content/voice_chat_ended.rb | 2 +- .../message_content/voice_chat_scheduled.rb | 4 +- .../message_content/voice_chat_started.rb | 2 +- .../message_content/website_connected.rb | 2 +- lib/tdlib/types/message_file_type/group.rb | 2 +- lib/tdlib/types/message_file_type/private.rb | 2 +- lib/tdlib/types/message_forward_info.rb | 10 +- .../types/message_forward_origin/channel.rb | 6 +- .../types/message_forward_origin/chat.rb | 4 +- .../message_forward_origin/hidden_user.rb | 2 +- .../message_forward_origin/message_import.rb | 2 +- .../types/message_forward_origin/user.rb | 2 +- lib/tdlib/types/message_interaction_info.rb | 4 +- lib/tdlib/types/message_link.rb | 2 +- lib/tdlib/types/message_link_info.rb | 2 +- lib/tdlib/types/message_reply_info.rb | 8 +- .../message_scheduling_state/send_at_date.rb | 2 +- lib/tdlib/types/message_sender/chat.rb | 2 +- lib/tdlib/types/message_sender/user.rb | 2 +- lib/tdlib/types/message_senders.rb | 2 +- .../types/message_sending_state/failed.rb | 6 +- lib/tdlib/types/message_thread_info.rb | 4 +- lib/tdlib/types/messages.rb | 2 +- lib/tdlib/types/minithumbnail.rb | 6 +- lib/tdlib/types/network_statistics.rb | 2 +- .../types/network_statistics_entry/call.rb | 6 +- .../types/network_statistics_entry/file.rb | 4 +- lib/tdlib/types/notification.rb | 4 +- lib/tdlib/types/notification_group.rb | 6 +- lib/tdlib/types/notification_type/new_call.rb | 2 +- .../notification_type/new_push_message.rb | 4 +- lib/tdlib/types/option_value/integer.rb | 2 +- lib/tdlib/types/option_value/string.rb | 2 +- lib/tdlib/types/order_info.rb | 6 +- lib/tdlib/types/page_block/anchor.rb | 2 +- lib/tdlib/types/page_block/author_date.rb | 2 +- lib/tdlib/types/page_block/chat_link.rb | 4 +- lib/tdlib/types/page_block/embedded.rb | 8 +- lib/tdlib/types/page_block/embedded_post.rb | 6 +- lib/tdlib/types/page_block/map.rb | 6 +- lib/tdlib/types/page_block/photo.rb | 2 +- lib/tdlib/types/page_block/preformatted.rb | 2 +- lib/tdlib/types/page_block_list_item.rb | 2 +- lib/tdlib/types/page_block_related_article.rb | 10 +- lib/tdlib/types/page_block_table_cell.rb | 4 +- .../types/passport_authorization_form.rb | 4 +- .../types/passport_element/email_address.rb | 2 +- .../types/passport_element/phone_number.rb | 2 +- lib/tdlib/types/passport_element_error.rb | 2 +- .../data_field.rb | 2 +- .../passport_element_error_source/file.rb | 2 +- .../translation_file.rb | 2 +- lib/tdlib/types/password_state.rb | 2 +- lib/tdlib/types/payment_form.rb | 8 +- lib/tdlib/types/payment_form_theme.rb | 12 +- lib/tdlib/types/payment_receipt.rb | 14 +- lib/tdlib/types/payment_result.rb | 2 +- lib/tdlib/types/payments_provider_stripe.rb | 2 +- lib/tdlib/types/personal_details.rb | 19 +- lib/tdlib/types/phone_number_info.rb | 7 +- lib/tdlib/types/photo_size.rb | 8 +- lib/tdlib/types/point.rb | 4 +- lib/tdlib/types/poll.rb | 12 +- lib/tdlib/types/poll_option.rb | 6 +- lib/tdlib/types/poll_type/quiz.rb | 2 +- lib/tdlib/types/profile_photo.rb | 2 +- lib/tdlib/types/proxy.rb | 8 +- lib/tdlib/types/proxy_type/http.rb | 4 +- lib/tdlib/types/proxy_type/mtproto.rb | 2 +- lib/tdlib/types/proxy_type/socks5.rb | 4 +- .../types/push_message_content/animation.rb | 2 +- .../push_message_content/chat_add_members.rb | 2 +- .../push_message_content/chat_change_title.rb | 2 +- .../chat_delete_member.rb | 2 +- .../types/push_message_content/contact.rb | 2 +- lib/tdlib/types/push_message_content/game.rb | 2 +- .../types/push_message_content/game_score.rb | 4 +- .../types/push_message_content/invoice.rb | 2 +- .../types/push_message_content/media_album.rb | 2 +- .../push_message_content/message_forwards.rb | 2 +- lib/tdlib/types/push_message_content/photo.rb | 2 +- lib/tdlib/types/push_message_content/poll.rb | 2 +- .../types/push_message_content/sticker.rb | 2 +- lib/tdlib/types/push_message_content/text.rb | 2 +- lib/tdlib/types/push_message_content/video.rb | 2 +- lib/tdlib/types/push_receiver_id.rb | 2 +- lib/tdlib/types/recommended_chat_filter.rb | 2 +- lib/tdlib/types/recovery_email_address.rb | 2 +- lib/tdlib/types/remote_file.rb | 6 +- lib/tdlib/types/rich_text/anchor.rb | 2 +- lib/tdlib/types/rich_text/anchor_link.rb | 4 +- lib/tdlib/types/rich_text/email_address.rb | 2 +- lib/tdlib/types/rich_text/icon.rb | 4 +- lib/tdlib/types/rich_text/phone_number.rb | 2 +- lib/tdlib/types/rich_text/plain.rb | 2 +- lib/tdlib/types/rich_text/reference.rb | 6 +- lib/tdlib/types/rich_text/url.rb | 2 +- lib/tdlib/types/saved_credentials.rb | 4 +- .../types/scope_notification_settings.rb | 4 +- lib/tdlib/types/seconds.rb | 2 +- lib/tdlib/types/secret_chat.rb | 8 +- lib/tdlib/types/session.rb | 30 +- lib/tdlib/types/shipping_option.rb | 4 +- lib/tdlib/types/statistical_graph/async.rb | 2 +- lib/tdlib/types/statistical_graph/data.rb | 4 +- lib/tdlib/types/statistical_graph/error.rb | 2 +- lib/tdlib/types/statistical_value.rb | 6 +- lib/tdlib/types/sticker.rb | 8 +- lib/tdlib/types/sticker_set.rb | 6 +- lib/tdlib/types/sticker_set_info.rb | 8 +- lib/tdlib/types/sticker_sets.rb | 2 +- lib/tdlib/types/storage_statistics.rb | 4 +- lib/tdlib/types/storage_statistics_by_chat.rb | 6 +- .../types/storage_statistics_by_file_type.rb | 4 +- lib/tdlib/types/storage_statistics_fast.rb | 10 +- .../convert_to_broadcast_group.rb | 2 +- lib/tdlib/types/supergroup.rb | 13 +- lib/tdlib/types/supergroup_full_info.rb | 22 +- .../types/supergroup_members_filter/banned.rb | 2 +- .../supergroup_members_filter/contacts.rb | 2 +- .../supergroup_members_filter/mention.rb | 4 +- .../supergroup_members_filter/restricted.rb | 2 +- .../types/supergroup_members_filter/search.rb | 2 +- lib/tdlib/types/t_me_url.rb | 2 +- lib/tdlib/types/t_me_url_type/sticker_set.rb | 2 +- lib/tdlib/types/t_me_url_type/supergroup.rb | 2 +- lib/tdlib/types/t_me_url_type/user.rb | 2 +- lib/tdlib/types/tdlib_parameters.rb | 23 +- lib/tdlib/types/temporary_password_state.rb | 2 +- lib/tdlib/types/terms_of_service.rb | 2 +- lib/tdlib/types/text.rb | 2 +- lib/tdlib/types/text_entity.rb | 4 +- .../types/text_entity_type/mention_name.rb | 2 +- lib/tdlib/types/text_entity_type/pre_code.rb | 2 +- lib/tdlib/types/text_entity_type/text_url.rb | 2 +- lib/tdlib/types/text_parse_mode/markdown.rb | 2 +- lib/tdlib/types/thumbnail.rb | 4 +- .../update/animation_search_parameters.rb | 4 +- .../types/update/basic_group_full_info.rb | 2 +- lib/tdlib/types/update/chat_action_bar.rb | 2 +- .../chat_default_disable_notification.rb | 2 +- lib/tdlib/types/update/chat_draft_message.rb | 2 +- .../update/chat_has_scheduled_messages.rb | 2 +- lib/tdlib/types/update/chat_is_blocked.rb | 2 +- .../types/update/chat_is_marked_as_unread.rb | 2 +- lib/tdlib/types/update/chat_last_message.rb | 2 +- lib/tdlib/types/update/chat_member.rb | 6 +- .../types/update/chat_message_ttl_setting.rb | 4 +- .../update/chat_notification_settings.rb | 2 +- .../types/update/chat_online_member_count.rb | 4 +- lib/tdlib/types/update/chat_permissions.rb | 2 +- lib/tdlib/types/update/chat_photo.rb | 2 +- lib/tdlib/types/update/chat_position.rb | 2 +- lib/tdlib/types/update/chat_read_inbox.rb | 6 +- lib/tdlib/types/update/chat_read_outbox.rb | 4 +- lib/tdlib/types/update/chat_reply_markup.rb | 4 +- lib/tdlib/types/update/chat_title.rb | 4 +- .../types/update/chat_unread_mention_count.rb | 4 +- lib/tdlib/types/update/chat_voice_chat.rb | 2 +- lib/tdlib/types/update/delete_messages.rb | 4 +- lib/tdlib/types/update/dice_emojis.rb | 2 +- lib/tdlib/types/update/favorite_stickers.rb | 2 +- .../types/update/file_generation_start.rb | 10 +- .../types/update/file_generation_stop.rb | 2 +- .../types/update/group_call_participant.rb | 2 +- .../types/update/installed_sticker_sets.rb | 2 +- .../types/update/language_pack_strings.rb | 4 +- lib/tdlib/types/update/message_content.rb | 4 +- .../types/update/message_content_opened.rb | 4 +- lib/tdlib/types/update/message_edited.rb | 6 +- .../types/update/message_interaction_info.rb | 4 +- lib/tdlib/types/update/message_is_pinned.rb | 4 +- .../update/message_live_location_viewed.rb | 4 +- .../types/update/message_mention_read.rb | 6 +- .../types/update/message_send_acknowledged.rb | 4 +- lib/tdlib/types/update/message_send_failed.rb | 6 +- .../types/update/message_send_succeeded.rb | 2 +- .../types/update/new_call_signaling_data.rb | 4 +- lib/tdlib/types/update/new_callback_query.rb | 10 +- .../types/update/new_chosen_inline_result.rb | 8 +- lib/tdlib/types/update/new_custom_event.rb | 2 +- lib/tdlib/types/update/new_custom_query.rb | 6 +- .../types/update/new_inline_callback_query.rb | 8 +- lib/tdlib/types/update/new_inline_query.rb | 8 +- .../types/update/new_pre_checkout_query.rb | 14 +- lib/tdlib/types/update/new_shipping_query.rb | 6 +- lib/tdlib/types/update/notification.rb | 2 +- lib/tdlib/types/update/notification_group.rb | 10 +- lib/tdlib/types/update/option.rb | 2 +- lib/tdlib/types/update/poll_answer.rb | 6 +- lib/tdlib/types/update/recent_stickers.rb | 2 +- lib/tdlib/types/update/saved_animations.rb | 2 +- .../types/update/service_notification.rb | 2 +- .../types/update/supergroup_full_info.rb | 2 +- lib/tdlib/types/update/terms_of_service.rb | 2 +- lib/tdlib/types/update/unread_chat_count.rb | 10 +- .../types/update/unread_message_count.rb | 4 +- lib/tdlib/types/update/user_chat_action.rb | 6 +- lib/tdlib/types/update/user_full_info.rb | 2 +- lib/tdlib/types/update/user_status.rb | 2 +- lib/tdlib/types/user.rb | 16 +- lib/tdlib/types/user_full_info.rb | 6 +- .../allow_chat_members.rb | 2 +- .../user_privacy_setting_rule/allow_users.rb | 2 +- .../restrict_chat_members.rb | 2 +- .../restrict_users.rb | 2 +- lib/tdlib/types/user_status/offline.rb | 2 +- lib/tdlib/types/user_status/online.rb | 2 +- lib/tdlib/types/user_type/bot.rb | 3 +- lib/tdlib/types/users.rb | 4 +- lib/tdlib/types/validated_order_info.rb | 2 +- lib/tdlib/types/venue.rb | 10 +- lib/tdlib/types/video.rb | 10 +- lib/tdlib/types/video_note.rb | 4 +- lib/tdlib/types/voice_chat.rb | 2 +- lib/tdlib/types/voice_note.rb | 6 +- lib/tdlib/types/web_page.rb | 24 +- lib/tdlib/types/web_page_instant_view.rb | 4 +- tdlib-schema.gemspec | 2 +- 464 files changed, 1241 insertions(+), 1224 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 154f7709..b9c4d672 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +## [1.7.0.2] - 2021-06-28 + +- Make types coercible + ## [1.7.0.1] - 2021-06-25 - Initial release diff --git a/bin/parser b/bin/parser index 8acfbe17..12a37d80 100755 --- a/bin/parser +++ b/bin/parser @@ -8,11 +8,11 @@ def parse_tl_type(type) if (vector = type.scan(/[vV]ector<(.*)>/)).length > 0 "TD::Types::Array.of(#{parse_tl_type(vector[0][0])})" elsif type.match?(/[iI]nt\d\d/) - 'TD::Types::Integer' + 'TD::Types::Coercible::Integer' elsif type.match?(/[dD]ouble/) - 'TD::Types::Float' + 'TD::Types::Coercible::Float' elsif type.match?(/[bB]ytes/) - 'TD::Types::String' + 'TD::Types::Coercible::String' else "TD::Types::#{type.camelcase}" end @@ -186,9 +186,9 @@ end def type_to_comment_type(type) type.gsub('TD::Types::Array.of(', 'Array<').gsub(')', '>'). - gsub('TD::Types::Integer', 'Integer'). - gsub('TD::Types::Float', 'Float'). - gsub('TD::Types::String', 'String'). + gsub('TD::Types::Coercible::Integer', 'Integer'). + gsub('TD::Types::Coercible::Float', 'Float'). + gsub('TD::Types::Coercible::String', 'String'). gsub('TD::Types::Bool', 'Boolean') end diff --git a/lib/tdlib/client_methods.rb b/lib/tdlib/client_methods.rb index e03eccad..0e6c6a6b 100644 --- a/lib/tdlib/client_methods.rb +++ b/lib/tdlib/client_methods.rb @@ -14,7 +14,7 @@ def accept_call(call_id:, protocol:) # Accepts Telegram terms of services. # - # @param terms_of_service_id [String] Terms of service identifier. + # @param terms_of_service_id [TD::Types::String] Terms of service identifier. # @return [TD::Types::Ok] def accept_terms_of_service(terms_of_service_id:) broadcast('@type' => 'acceptTermsOfService', @@ -85,8 +85,8 @@ def add_contact(contact: nil, share_phone_number:) # Adds a custom server language pack to the list of installed language packs in current localization target. # Can be called before authorization. # - # @param language_pack_id [String] Identifier of a language pack to be added; may be different from a name that is - # used in an "https://t.me/setlanguage/" link. + # @param language_pack_id [TD::Types::String] Identifier of a language pack to be added; may be different from a name + # that is used in an "https://t.me/setlanguage/" link. # @return [TD::Types::Ok] def add_custom_server_language_pack(language_pack_id:) broadcast('@type' => 'addCustomServerLanguagePack', @@ -128,7 +128,7 @@ def add_local_message(chat_id:, sender:, reply_to_message_id:, disable_notificat # Can be called synchronously. # # @param verbosity_level [Integer] The minimum verbosity level needed for the message to be logged; 0-1023. - # @param text [String] Text of a message to log. + # @param text [TD::Types::String] Text of a message to log. # @return [TD::Types::Ok] def add_log_message(verbosity_level:, text:) broadcast('@type' => 'addLogMessage', @@ -150,7 +150,7 @@ def add_network_statistics(entry:) # Adds a proxy server for network requests. # Can be called before authorization. # - # @param server [String] Proxy server IP address. + # @param server [TD::Types::String] Proxy server IP address. # @param port [Integer] Proxy server port. # @param enable [Boolean] True, if the proxy should be enabled. # @param type [TD::Types::ProxyType] Proxy type. @@ -207,7 +207,7 @@ def add_saved_animation(animation:) # Returns the sticker set. # # @param user_id [Integer] Sticker set owner. - # @param name [String] Sticker set name. + # @param name [TD::Types::String] Sticker set name. # @param sticker [TD::Types::InputSticker] Sticker to add to the set. # @return [TD::Types::StickerSet] def add_sticker_to_set(user_id:, name:, sticker:) @@ -220,9 +220,9 @@ def add_sticker_to_set(user_id:, name:, sticker:) # Sets the result of a callback query; for bots only. # # @param callback_query_id [Integer] Identifier of the callback query. - # @param text [String] Text of the answer. + # @param text [TD::Types::String] Text of the answer. # @param show_alert [Boolean] If true, an alert should be shown to the user instead of a toast notification. - # @param url [String] URL to be opened. + # @param url [TD::Types::String] URL to be opened. # @param cache_time [Integer] Time during which the result of the query can be cached, in seconds. # @return [TD::Types::Ok] def answer_callback_query(callback_query_id:, text:, show_alert:, url:, cache_time:) @@ -237,7 +237,7 @@ def answer_callback_query(callback_query_id:, text:, show_alert:, url:, cache_ti # Answers a custom query; for bots only. # # @param custom_query_id [Integer] Identifier of a custom query. - # @param data [String] JSON-serialized answer to the query. + # @param data [TD::Types::String] JSON-serialized answer to the query. # @return [TD::Types::Ok] def answer_custom_query(custom_query_id:, data:) broadcast('@type' => 'answerCustomQuery', @@ -251,10 +251,11 @@ def answer_custom_query(custom_query_id:, data:) # @param is_personal [Boolean] True, if the result of the query can be cached for the specified user. # @param results [Array] The results of the query. # @param cache_time [Integer] Allowed time to cache the results of the query, in seconds. - # @param next_offset [String] Offset for the next inline query; pass an empty string if there are no more results. - # @param switch_pm_text [String] If non-empty, this text should be shown on the button that opens a private chat with - # the bot and sends a start message to the bot with the parameter switch_pm_parameter. - # @param switch_pm_parameter [String] The parameter for the bot start message. + # @param next_offset [TD::Types::String] Offset for the next inline query; pass an empty string if there are no more + # results. + # @param switch_pm_text [TD::Types::String] If non-empty, this text should be shown on the button that opens a + # private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter. + # @param switch_pm_parameter [TD::Types::String] The parameter for the bot start message. # @return [TD::Types::Ok] def answer_inline_query(inline_query_id:, is_personal:, results:, cache_time:, next_offset:, switch_pm_text:, switch_pm_parameter:) @@ -271,7 +272,7 @@ def answer_inline_query(inline_query_id:, is_personal:, results:, cache_time:, n # Sets the result of a pre-checkout query; for bots only. # # @param pre_checkout_query_id [Integer] Identifier of the pre-checkout query. - # @param error_message [String] An error message, empty on success. + # @param error_message [TD::Types::String] An error message, empty on success. # @return [TD::Types::Ok] def answer_pre_checkout_query(pre_checkout_query_id:, error_message:) broadcast('@type' => 'answerPreCheckoutQuery', @@ -283,7 +284,7 @@ def answer_pre_checkout_query(pre_checkout_query_id:, error_message:) # # @param shipping_query_id [Integer] Identifier of the shipping query. # @param shipping_options [Array] Available shipping options. - # @param error_message [String] An error message, empty on success. + # @param error_message [TD::Types::String] An error message, empty on success. # @return [TD::Types::Ok] def answer_shipping_query(shipping_query_id:, shipping_options:, error_message:) broadcast('@type' => 'answerShippingQuery', @@ -375,7 +376,7 @@ def change_imported_contacts(contacts:) # Changes the phone number of the user and sends an authentication code to the user's new phone number. # On success, returns information about the sent code. # - # @param phone_number [String] The new phone number of the user in international format. + # @param phone_number [TD::Types::String] The new phone number of the user in international format. # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone # number. # @return [TD::Types::AuthenticationCodeInfo] @@ -403,7 +404,7 @@ def change_sticker_set(set_id:, is_installed:, is_archived:) # Works only when the current authorization state is authorizationStateWaitPhoneNumber. # Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in. # - # @param token [String] The bot token. + # @param token [TD::Types::String] The bot token. # @return [TD::Types::Ok] def check_authentication_bot_token(token:) broadcast('@type' => 'checkAuthenticationBotToken', @@ -413,7 +414,8 @@ def check_authentication_bot_token(token:) # Checks the authentication code. # Works only when the current authorization state is authorizationStateWaitCode. # - # @param code [String] The verification code received via SMS, Telegram message, phone call, or flash call. + # @param code [TD::Types::String] The verification code received via SMS, Telegram message, phone call, or flash + # call. # @return [TD::Types::Ok] def check_authentication_code(code:) broadcast('@type' => 'checkAuthenticationCode', @@ -423,7 +425,7 @@ def check_authentication_code(code:) # Checks the authentication password for correctness. # Works only when the current authorization state is authorizationStateWaitPassword. # - # @param password [String] The password to check. + # @param password [TD::Types::String] The password to check. # @return [TD::Types::Ok] def check_authentication_password(password:) broadcast('@type' => 'checkAuthenticationPassword', @@ -432,7 +434,7 @@ def check_authentication_password(password:) # Checks the authentication code sent to confirm a new phone number of the user. # - # @param code [String] Verification code received by SMS, phone call or flash call. + # @param code [TD::Types::String] Verification code received by SMS, phone call or flash call. # @return [TD::Types::Ok] def check_change_phone_number_code(code:) broadcast('@type' => 'checkChangePhoneNumberCode', @@ -441,8 +443,8 @@ def check_change_phone_number_code(code:) # Checks the validity of an invite link for a chat and returns information about the corresponding chat. # - # @param invite_link [String] Invite link to be checked; must have URL "t.me", "telegram.me", or "telegram.dog" and - # query beginning with "/joinchat/" or "/+". + # @param invite_link [TD::Types::String] Invite link to be checked; must have URL "t.me", "telegram.me", or + # "telegram.dog" and query beginning with "/joinchat/" or "/+". # @return [TD::Types::ChatInviteLinkInfo] def check_chat_invite_link(invite_link:) broadcast('@type' => 'checkChatInviteLink', @@ -453,7 +455,7 @@ def check_chat_invite_link(invite_link:) # # @param chat_id [Integer] Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a # private chat with self, or zero if chat is being created. - # @param username [String] Username to be checked. + # @param username [TD::Types::String] Username to be checked. # @return [TD::Types::CheckChatUsernameResult] def check_chat_username(chat_id:, username:) broadcast('@type' => 'checkChatUsername', @@ -483,7 +485,7 @@ def check_database_encryption_key(encryption_key:) # Checks the email address verification code for Telegram Passport. # - # @param code [String] Verification code. + # @param code [TD::Types::String] Verification code. # @return [TD::Types::Ok] def check_email_address_verification_code(code:) broadcast('@type' => 'checkEmailAddressVerificationCode', @@ -492,7 +494,7 @@ def check_email_address_verification_code(code:) # Checks phone number confirmation code. # - # @param code [String] The phone number confirmation code. + # @param code [TD::Types::String] The phone number confirmation code. # @return [TD::Types::Ok] def check_phone_number_confirmation_code(code:) broadcast('@type' => 'checkPhoneNumberConfirmationCode', @@ -501,7 +503,7 @@ def check_phone_number_confirmation_code(code:) # Checks the phone number verification code for Telegram Passport. # - # @param code [String] Verification code. + # @param code [TD::Types::String] Verification code. # @return [TD::Types::Ok] def check_phone_number_verification_code(code:) broadcast('@type' => 'checkPhoneNumberVerificationCode', @@ -510,7 +512,7 @@ def check_phone_number_verification_code(code:) # Checks the 2-step verification recovery email address verification code. # - # @param code [String] Verification code. + # @param code [TD::Types::String] Verification code. # @return [TD::Types::PasswordState] def check_recovery_email_address_code(code:) broadcast('@type' => 'checkRecoveryEmailAddressCode', @@ -522,7 +524,7 @@ def check_recovery_email_address_code(code:) # Returns an empty string on failure. # Can be called synchronously. # - # @param file_name [String] File name or path to the file. + # @param file_name [TD::Types::String] File name or path to the file. # @return [TD::Types::Text] def clean_file_name(file_name:) broadcast('@type' => 'cleanFileName', @@ -594,7 +596,7 @@ def close_secret_chat(secret_chat_id:) # Confirms QR code authentication on another device. # Returns created session on success. # - # @param link [String] A link from a QR code. + # @param link [TD::Types::String] A link from a QR code. # The link must be scanned by the in-app camera. # @return [TD::Types::Session] def confirm_qr_code_authentication(link:) @@ -657,7 +659,7 @@ def create_chat_invite_link(chat_id:, expire_date:, member_limit:) # Returns the newly created chat. # # @param user_ids [Array] Identifiers of users to be added to the basic group. - # @param title [String] Title of the new basic group; 1-128 characters. + # @param title [TD::Types::String] Title of the new basic group; 1-128 characters. # @return [TD::Types::Chat] def create_new_basic_group_chat(user_ids:, title:) broadcast('@type' => 'createNewBasicGroupChat', @@ -679,8 +681,8 @@ def create_new_secret_chat(user_id:) # Returns the newly created sticker set. # # @param user_id [Integer, nil] Sticker set owner. - # @param title [String, nil] Sticker set title; 1-64 characters. - # @param name [String, nil] Sticker set name. + # @param title [TD::Types::String, nil] Sticker set title; 1-64 characters. + # @param name [TD::Types::String, nil] Sticker set name. # Can contain only English letters, digits and underscores. # Must end with *"_by_"* (** is case insensitive); 1-64 characters. # @param is_masks [Boolean, nil] True, if stickers are masks. @@ -700,9 +702,9 @@ def create_new_sticker_set(user_id: nil, title: nil, name: nil, is_masks: nil, s # Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. # Returns the newly created chat. # - # @param title [String] Title of the new chat; 1-128 characters. + # @param title [TD::Types::String] Title of the new chat; 1-128 characters. # @param is_channel [Boolean] True, if a channel chat needs to be created. - # @param description [String] Chat description; 0-255 characters. + # @param description [TD::Types::String] Chat description; 0-255 characters. # @param location [TD::Types::ChatLocation] Chat location if a location-based supergroup is being created. # @param for_import [Boolean] True, if the supergroup is created for importing messages using importMessage. # @return [TD::Types::Chat] @@ -750,7 +752,7 @@ def create_supergroup_chat(supergroup_id:, force:) # Creates a new temporary password for processing payments. # - # @param password [String] Persistent user password. + # @param password [TD::Types::String] Persistent user password. # @param valid_for [Integer] Time during which the temporary password will be valid, in seconds; should be between 60 # and 86400. # @return [TD::Types::TemporaryPasswordState] @@ -764,7 +766,7 @@ def create_temporary_password(password:, valid_for:) # Available only for basic groups, supergroups and channels; requires can_manage_voice_chats rights. # # @param chat_id [Integer] Chat identifier, in which the voice chat will be created. - # @param title [String, nil] Group call title; if empty, chat title will be used. + # @param title [TD::Types::String, nil] Group call title; if empty, chat title will be used. # @param start_date [Integer] Point in time (Unix timestamp) when the group call is supposed to be started by an # administrator; 0 to start the voice chat immediately. # The date must be at least 10 seconds and at most 8 days in the future. @@ -780,7 +782,7 @@ def create_voice_chat(chat_id:, title: nil, start_date:) # The phone number of the account can be used to create a new account. # Can be called before authorization when the current authorization state is authorizationStateWaitPassword. # - # @param reason [String, nil] The reason why the account was deleted; optional. + # @param reason [TD::Types::String, nil] The reason why the account was deleted; optional. # @return [TD::Types::Ok] def delete_account(reason: nil) broadcast('@type' => 'deleteAccount', @@ -884,7 +886,7 @@ def delete_file(file_id:) # deleted. # Can be called before authorization. # - # @param language_pack_id [String] Identifier of the language pack to delete. + # @param language_pack_id [TD::Types::String] Identifier of the language pack to delete. # @return [TD::Types::Ok] def delete_language_pack(language_pack_id:) broadcast('@type' => 'deleteLanguagePack', @@ -928,7 +930,7 @@ def delete_profile_photo(profile_photo_id:) # other links. # # @param chat_id [Integer] Chat identifier. - # @param invite_link [String] Invite link to revoke. + # @param invite_link [TD::Types::String] Invite link to revoke. # @return [TD::Types::Ok] def delete_revoked_chat_invite_link(chat_id:, invite_link:) broadcast('@type' => 'deleteRevokedChatInviteLink', @@ -1054,7 +1056,7 @@ def edit_chat_filter(chat_filter_id:, filter:) # other links. # # @param chat_id [Integer] Chat identifier. - # @param invite_link [String] Invite link to be edited. + # @param invite_link [TD::Types::String] Invite link to be edited. # @param expire_date [Integer] Point in time (Unix timestamp) when the link will expire; pass 0 if never. # @param member_limit [Integer] The maximum number of chat members that can join the chat by the link simultaneously; # 0-99999; pass 0 if not limited. @@ -1079,7 +1081,7 @@ def edit_custom_language_pack_info(info:) # Edits the caption of an inline message sent via a bot; for bots only. # - # @param inline_message_id [String] Inline message identifier. + # @param inline_message_id [TD::Types::String] Inline message identifier. # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup. # @param caption [TD::Types::FormattedText] New message content caption; 0-GetOption("message_caption_length_max") # characters. @@ -1093,7 +1095,7 @@ def edit_inline_message_caption(inline_message_id:, reply_markup:, caption:) # Edits the content of a live location in an inline message sent via a bot; for bots only. # - # @param inline_message_id [String] Inline message identifier. + # @param inline_message_id [TD::Types::String] Inline message identifier. # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup. # @param location [TD::Types::Location, nil] New location content of the message; may be null. # Pass null to stop sharing the live location. @@ -1115,7 +1117,7 @@ def edit_inline_message_live_location(inline_message_id:, reply_markup:, locatio # Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message # sent via a bot; for bots only. # - # @param inline_message_id [String] Inline message identifier. + # @param inline_message_id [TD::Types::String] Inline message identifier. # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup; for bots only. # @param input_message_content [TD::Types::InputMessageContent] New content of the message. # Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, @@ -1130,7 +1132,7 @@ def edit_inline_message_media(inline_message_id:, reply_markup:, input_message_c # Edits the reply markup of an inline message sent via a bot; for bots only. # - # @param inline_message_id [String] Inline message identifier. + # @param inline_message_id [TD::Types::String] Inline message identifier. # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup. # @return [TD::Types::Ok] def edit_inline_message_reply_markup(inline_message_id:, reply_markup:) @@ -1141,7 +1143,7 @@ def edit_inline_message_reply_markup(inline_message_id:, reply_markup:) # Edits the text of an inline text or game message sent via a bot; for bots only. # - # @param inline_message_id [String] Inline message identifier. + # @param inline_message_id [TD::Types::String] Inline message identifier. # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup. # @param input_message_content [TD::Types::InputMessageContent] New text content of the message. # Should be of type inputMessageText. @@ -1265,7 +1267,7 @@ def edit_message_text(chat_id:, message_id:, reply_markup:, input_message_conten # Can be called before authorization. # # @param proxy_id [Integer] Proxy identifier. - # @param server [String] Proxy server IP address. + # @param server [TD::Types::String] Proxy server IP address. # @param port [Integer] Proxy server port. # @param enable [Boolean] True, if the proxy should be enabled. # @param type [TD::Types::ProxyType] Proxy type. @@ -1361,7 +1363,7 @@ def get_active_sessions # Returns all available Telegram Passport elements. # - # @param password [String] Password of the current user. + # @param password [TD::Types::String] Password of the current user. # @return [TD::Types::PassportElements] def get_all_passport_elements(password:) broadcast('@type' => 'getAllPassportElements', @@ -1418,7 +1420,7 @@ def get_auto_download_settings_presets # Constructs a persistent HTTP URL for a background. # - # @param name [String] Background name. + # @param name [TD::Types::String] Background name. # @param type [TD::Types::BackgroundType] Background type. # @return [TD::Types::HttpUrl] def get_background_url(name:, type:) @@ -1438,7 +1440,7 @@ def get_backgrounds(for_dark_theme:) # Returns information about a bank card. # - # @param bank_card_number [String] The bank card number. + # @param bank_card_number [TD::Types::String] The bank card number. # @return [TD::Types::BankCardInfo] def get_bank_card_info(bank_card_number:) broadcast('@type' => 'getBankCardInfo', @@ -1527,7 +1529,7 @@ def get_chat_administrators(chat_id:) # e., in order of decreasing event_id). # # @param chat_id [Integer] Chat identifier. - # @param query [String] Search query by which to filter events. + # @param query [TD::Types::String] Search query by which to filter events. # @param from_event_id [Integer] Identifier of an event from which to return results. # Use 0 to get results from the latest events. # @param limit [Integer] The maximum number of events to return; up to 100. @@ -1597,7 +1599,7 @@ def get_chat_history(chat_id:, from_message_id:, offset:, limit:, only_local:) # get other links. # # @param chat_id [Integer] Chat identifier. - # @param invite_link [String] Invite link to get. + # @param invite_link [TD::Types::String] Invite link to get. # @return [TD::Types::ChatInviteLink] def get_chat_invite_link(chat_id:, invite_link:) broadcast('@type' => 'getChatInviteLink', @@ -1620,7 +1622,7 @@ def get_chat_invite_link_counts(chat_id:) # other links. # # @param chat_id [Integer] Chat identifier. - # @param invite_link [String] Invite link for which to return chat members. + # @param invite_link [TD::Types::String] Invite link for which to return chat members. # @param offset_member [TD::Types::ChatInviteLinkMember] A chat member from which to return next chat members; use # null to get results from the beginning. # @param limit [Integer] The maximum number of chat members to return. @@ -1643,8 +1645,8 @@ def get_chat_invite_link_members(chat_id:, invite_link:, offset_member:, limit:) # @param is_revoked [Boolean] Pass true if revoked links needs to be returned instead of active or expired. # @param offset_date [Integer] Creation date of an invite link starting after which to return invite links; use 0 to # get results from the beginning. - # @param offset_invite_link [String] Invite link starting after which to return invite links; use empty string to get - # results from the beginning. + # @param offset_invite_link [TD::Types::String] Invite link starting after which to return invite links; use empty + # string to get results from the beginning. # @param limit [Integer] The maximum number of invite links to return. # @return [TD::Types::ChatInviteLinks] def get_chat_invite_links(chat_id:, creator_user_id:, is_revoked:, offset_date:, offset_invite_link:, limit:) @@ -1752,7 +1754,7 @@ def get_chat_statistics(chat_id:, is_dark:) # Currently this method of getting the statistics are disabled and can be deleted in the future. # # @param chat_id [Integer] Chat identifier. - # @param parameters [String] Parameters from "tg://statsrefresh?params=******" link. + # @param parameters [TD::Types::String] Parameters from "tg://statsrefresh?params=******" link. # @param is_dark [Boolean] Pass true if a URL with the dark theme must be returned. # @return [TD::Types::HttpUrl] def get_chat_statistics_url(chat_id:, parameters:, is_dark:) @@ -1844,7 +1846,7 @@ def get_database_statistics # Returns a 404 error for unknown links. # Can be called before authorization. # - # @param link [String] The link. + # @param link [TD::Types::String] The link. # @return [TD::Types::DeepLinkInfo] def get_deep_link_info(link:) broadcast('@type' => 'getDeepLinkInfo', @@ -1855,7 +1857,7 @@ def get_deep_link_info(link:) # replacements. # The URL will be valid for 30 seconds after generation. # - # @param language_code [String] Language code for which the emoji replacements will be suggested. + # @param language_code [TD::Types::String] Language code for which the emoji replacements will be suggested. # @return [TD::Types::HttpUrl] def get_emoji_suggestions_url(language_code:) broadcast('@type' => 'getEmojiSuggestionsUrl', @@ -1866,7 +1868,7 @@ def get_emoji_suggestions_url(language_code:) # HTTP link. # Use the method getExternalLinkInfo to find whether a prior user confirmation is needed. # - # @param link [String] The HTTP link. + # @param link [TD::Types::String] The HTTP link. # @param allow_write_access [Boolean] True, if the current user allowed the bot, returned in getExternalLinkInfo, to # send them messages. # @return [TD::Types::HttpUrl] @@ -1880,7 +1882,7 @@ def get_external_link(link:, allow_write_access:) # This method can be used to automatically authorize the current user on a website. # Don't use this method for links from secret chats if link preview is disabled in secret chats. # - # @param link [String] The HTTP link. + # @param link [TD::Types::String] The HTTP link. # @return [TD::Types::LoginUrlInfo] def get_external_link_info(link:) broadcast('@type' => 'getExternalLinkInfo', @@ -1918,7 +1920,7 @@ def get_file_downloaded_prefix_size(file_id:, offset:) # Returns an empty string on failure. # Can be called synchronously. # - # @param mime_type [String] The MIME type of the file. + # @param mime_type [TD::Types::String] The MIME type of the file. # @return [TD::Types::Text] def get_file_extension(mime_type:) broadcast('@type' => 'getFileExtension', @@ -1929,7 +1931,7 @@ def get_file_extension(mime_type:) # Returns an empty string on failure. # Can be called synchronously. # - # @param file_name [String] The name of the file or path to the file. + # @param file_name [TD::Types::String] The name of the file or path to the file. # @return [TD::Types::Text] def get_file_mime_type(file_name:) broadcast('@type' => 'getFileMimeType', @@ -2018,7 +2020,7 @@ def get_inactive_supergroup_chats # Returns game high scores and some part of the high score table in the range of the specified user; for bots only. # - # @param inline_message_id [String] Inline message identifier. + # @param inline_message_id [TD::Types::String] Inline message identifier. # @param user_id [Integer] User identifier. # @return [TD::Types::GameHighScores] def get_inline_game_high_scores(inline_message_id:, user_id:) @@ -2033,8 +2035,8 @@ def get_inline_game_high_scores(inline_message_id:, user_id:) # @param bot_user_id [Integer] The identifier of the target bot. # @param chat_id [Integer] Identifier of the chat where the query was sent. # @param user_location [TD::Types::Location] Location of the user, only if needed. - # @param query [String] Text of the query. - # @param offset [String] Offset of the first entry to return. + # @param query [TD::Types::String] Text of the query. + # @param offset [TD::Types::String] Offset of the first entry to return. # @return [TD::Types::InlineQueryResults] def get_inline_query_results(bot_user_id:, chat_id:, user_location:, query:, offset:) broadcast('@type' => 'getInlineQueryResults', @@ -2075,7 +2077,7 @@ def get_json_string(json_value:) # Converts a JSON-serialized string to corresponding JsonValue object. # Can be called synchronously. # - # @param json [String] The JSON-serialized string. + # @param json [TD::Types::String] The JSON-serialized string. # @return [TD::Types::JsonValue] def get_json_value(json:) broadcast('@type' => 'getJsonValue', @@ -2086,7 +2088,7 @@ def get_json_value(json:) # Returned language pack identifier may be different from a provided one. # Can be called before authorization. # - # @param language_pack_id [String] Language pack identifier. + # @param language_pack_id [TD::Types::String] Language pack identifier. # @return [TD::Types::LanguagePackInfo] def get_language_pack_info(language_pack_id:) broadcast('@type' => 'getLanguagePackInfo', @@ -2097,10 +2099,11 @@ def get_language_pack_info(language_pack_id:) # Returns a 404 error if the string is not found. # Can be called synchronously. # - # @param language_pack_database_path [String] Path to the language pack database in which strings are stored. - # @param localization_target [String] Localization target to which the language pack belongs. - # @param language_pack_id [String] Language pack identifier. - # @param key [String] Language pack key of the string to be returned. + # @param language_pack_database_path [TD::Types::String] Path to the language pack database in which strings are + # stored. + # @param localization_target [TD::Types::String] Localization target to which the language pack belongs. + # @param language_pack_id [TD::Types::String] Language pack identifier. + # @param key [TD::Types::String] Language pack key of the string to be returned. # @return [TD::Types::LanguagePackStringValue] def get_language_pack_string(language_pack_database_path:, localization_target:, language_pack_id:, key:) broadcast('@type' => 'getLanguagePackString', @@ -2113,9 +2116,9 @@ def get_language_pack_string(language_pack_database_path:, localization_target:, # Returns strings from a language pack in the current localization target by their keys. # Can be called before authorization. # - # @param language_pack_id [String] Language pack identifier of the strings to be returned. - # @param keys [Array] Language pack keys of the strings to be returned; leave empty to request all available - # strings. + # @param language_pack_id [TD::Types::String] Language pack identifier of the strings to be returned. + # @param keys [Array] Language pack keys of the strings to be returned; leave empty to request all + # available strings. # @return [TD::Types::LanguagePackStrings] def get_language_pack_strings(language_pack_id:, keys:) broadcast('@type' => 'getLanguagePackStrings', @@ -2145,7 +2148,7 @@ def get_log_stream # Returns current verbosity level for a specified TDLib internal log tag. # Can be called synchronously. # - # @param tag [String] Logging tag to change verbosity level. + # @param tag [TD::Types::String] Logging tag to change verbosity level. # @return [TD::Types::LogVerbosityLevel] def get_log_tag_verbosity_level(tag:) broadcast('@type' => 'getLogTagVerbosityLevel', @@ -2267,7 +2270,7 @@ def get_message_embedding_code(chat_id:, message_id:, for_album:) # Returns information about a file with messages exported from another app. # - # @param message_file_head [String] Beginning of the message file; up to 100 first lines. + # @param message_file_head [TD::Types::String] Beginning of the message file; up to 100 first lines. # @return [TD::Types::MessageFileType] def get_message_file_type(message_file_head:) broadcast('@type' => 'getMessageFileType', @@ -2305,7 +2308,7 @@ def get_message_link(chat_id:, message_id:, for_album:, for_comment:) # Returns information about a public or private message link. # - # @param url [String] The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or + # @param url [TD::Types::String] The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or # "https://t.me/username/...", or "tg://resolve?...". # @return [TD::Types::MessageLinkInfo] def get_message_link_info(url:) @@ -2330,8 +2333,8 @@ def get_message_locally(chat_id:, message_id:) # # @param chat_id [Integer] Chat identifier of the message. # @param message_id [Integer] Message identifier. - # @param offset [String] Offset of the first entry to return as received from the previous request; use empty string - # to get first chunk of results. + # @param offset [TD::Types::String] Offset of the first entry to return as received from the previous request; use + # empty string to get first chunk of results. # @param limit [Integer] The maximum number of messages to be returned; must be positive and can't be greater than # 100. # Fewer messages may be returned than specified by the limit, even if the end of the list has not been reached. @@ -2423,7 +2426,7 @@ def get_network_statistics(only_current:) # (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before # authorization. # - # @param name [String] The name of the option. + # @param name [TD::Types::String] The name of the option. # @return [TD::Types::OptionValue] def get_option(name:) broadcast('@type' => 'getOption', @@ -2433,9 +2436,9 @@ def get_option(name:) # Returns a Telegram Passport authorization form for sharing data with a service. # # @param bot_user_id [Integer] User identifier of the service's bot. - # @param scope [String] Telegram Passport element types requested by the service. - # @param public_key [String] Service's public_key. - # @param nonce [String] Authorization form nonce provided by the service. + # @param scope [TD::Types::String] Telegram Passport element types requested by the service. + # @param public_key [TD::Types::String] Service's public_key. + # @param nonce [TD::Types::String] Authorization form nonce provided by the service. # @return [TD::Types::PassportAuthorizationForm] def get_passport_authorization_form(bot_user_id:, scope:, public_key:, nonce:) broadcast('@type' => 'getPassportAuthorizationForm', @@ -2450,7 +2453,7 @@ def get_passport_authorization_form(bot_user_id:, scope:, public_key:, nonce:) # Result can be received only once for each authorization form. # # @param autorization_form_id [Integer] Authorization form identifier. - # @param password [String] Password of the current user. + # @param password [TD::Types::String] Password of the current user. # @return [TD::Types::PassportElementsWithErrors] def get_passport_authorization_form_available_elements(autorization_form_id:, password:) broadcast('@type' => 'getPassportAuthorizationFormAvailableElements', @@ -2461,7 +2464,7 @@ def get_passport_authorization_form_available_elements(autorization_form_id:, pa # Returns one of the available Telegram Passport elements. # # @param type [TD::Types::PassportElementType] Telegram Passport element type. - # @param password [String] Password of the current user. + # @param password [TD::Types::String] Password of the current user. # @return [TD::Types::PassportElement] def get_passport_element(type:, password:) broadcast('@type' => 'getPassportElement', @@ -2504,7 +2507,7 @@ def get_payment_receipt(chat_id:, message_id:) # Returns information about a phone number by its prefix. # Can be called before authorization. # - # @param phone_number_prefix [String] The phone number prefix. + # @param phone_number_prefix [TD::Types::String] The phone number prefix. # @return [TD::Types::PhoneNumberInfo] def get_phone_number_info(phone_number_prefix:) broadcast('@type' => 'getPhoneNumberInfo', @@ -2534,7 +2537,7 @@ def get_poll_voters(chat_id:, message_id:, option_id:, offset:, limit:) # in Telegram Passport personal details. # Returns a 404 error if unknown. # - # @param country_code [String] A two-letter ISO 3166-1 alpha-2 country code. + # @param country_code [TD::Types::String] A two-letter ISO 3166-1 alpha-2 country code. # @return [TD::Types::Text] def get_preferred_country_language(country_code:) broadcast('@type' => 'getPreferredCountryLanguage', @@ -2564,7 +2567,7 @@ def get_proxy_link(proxy_id:) # received a push notification. # Can be called synchronously. # - # @param payload [String] JSON-encoded push notification payload. + # @param payload [TD::Types::String] JSON-encoded push notification payload. # @return [TD::Types::PushReceiverId] def get_push_receiver_id(payload:) broadcast('@type' => 'getPushReceiverId', @@ -2590,7 +2593,7 @@ def get_recent_stickers(is_attached:) # Returns t.me URLs recently visited by a newly registered user. # - # @param referrer [String] Google Play referrer to identify the user. + # @param referrer [TD::Types::String] Google Play referrer to identify the user. # @return [TD::Types::TMeUrls] def get_recently_visited_t_me_urls(referrer:) broadcast('@type' => 'getRecentlyVisitedTMeUrls', @@ -2607,7 +2610,7 @@ def get_recommended_chat_filters # Returns a 2-step verification recovery email address that was previously set up. # This method can be used to verify a password provided by the user. # - # @param password [String] The password for the current user. + # @param password [TD::Types::String] The password for the current user. # @return [TD::Types::RecoveryEmailAddress] def get_recovery_email_address(password:) broadcast('@type' => 'getRecoveryEmailAddress', @@ -2620,7 +2623,7 @@ def get_recovery_email_address(password:) # For example, if the file is from a message, then the message must be not deleted and accessible to the user. # If the file database is disabled, then the corresponding object with the file must be preloaded by the application. # - # @param remote_file_id [String] Remote identifier of the file to get. + # @param remote_file_id [TD::Types::String] Remote identifier of the file to get. # @param file_type [TD::Types::FileType] File type, if known. # @return [TD::Types::File] def get_remote_file(remote_file_id:, file_type:) @@ -2679,7 +2682,7 @@ def get_secret_chat(secret_chat_id:) # Loads an asynchronous or a zoomed in statistical graph. # # @param chat_id [Integer] Chat identifier. - # @param token [String] The token for graph loading. + # @param token [TD::Types::String] The token for graph loading. # @param x [Integer] X-value for zoomed in graph or 0 otherwise. # @return [TD::Types::StatisticalGraph] def get_statistical_graph(chat_id:, token:, x:) @@ -2712,7 +2715,7 @@ def get_sticker_set(set_id:) # Returns stickers from the installed sticker sets that correspond to a given emoji. # If the emoji is not empty, favorite and recently used stickers may also be returned. # - # @param emoji [String] String representation of emoji. + # @param emoji [TD::Types::String] String representation of emoji. # If empty, returns all known installed stickers. # @param limit [Integer] The maximum number of stickers to be returned. # @return [TD::Types::Stickers] @@ -2808,7 +2811,7 @@ def get_temporary_password_state # contained in the text. # Can be called synchronously. # - # @param text [String] The text in which to look for entites. + # @param text [TD::Types::String] The text in which to look for entites. # @return [TD::Types::TextEntities] def get_text_entities(text:) broadcast('@type' => 'getTextEntities', @@ -2894,7 +2897,7 @@ def get_voice_chat_available_participants(chat_id:) # Returns an instant view version of a web page if available. # Returns a 404 error if the web page has no instant view page. # - # @param url [String] The web page URL. + # @param url [TD::Types::String] The web page URL. # @param force_full [Boolean] If true, the full instant view for the web page will be returned. # @return [TD::Types::WebPageInstantView] def get_web_page_instant_view(url:, force_full:) @@ -2977,8 +2980,8 @@ def join_chat(chat_id:) # Uses an invite link to add the current user to the chat if possible. # - # @param invite_link [String] Invite link to import; must have URL "t.me", "telegram.me", or "telegram.dog" and query - # beginning with "/joinchat/" or "/+". + # @param invite_link [TD::Types::String] Invite link to import; must have URL "t.me", "telegram.me", or + # "telegram.dog" and query beginning with "/joinchat/" or "/+". # @return [TD::Types::Chat] def join_chat_by_invite_link(invite_link:) broadcast('@type' => 'joinChatByInviteLink', @@ -2993,8 +2996,8 @@ def join_chat_by_invite_link(invite_link:) # @param payload [TD::Types::GroupCallPayload] Group join payload; received from tgcalls. # @param source [Integer] Caller synchronization source identifier; received from tgcalls. # @param is_muted [Boolean] True, if the user's microphone is muted. - # @param invite_hash [String] If non-empty, invite hash to be used to join the group call without being muted by - # administrators. + # @param invite_hash [TD::Types::String] If non-empty, invite hash to be used to join the group call without being + # muted by administrators. # @return [TD::Types::GroupCallJoinResponse] def join_group_call(group_call_id:, participant_id:, payload:, source:, is_muted:, invite_hash:) broadcast('@type' => 'joinGroupCall', @@ -3129,7 +3132,7 @@ def parse_markdown(text:) # the text. # Can be called synchronously. # - # @param text [String] The text to parse. + # @param text [TD::Types::String] The text to parse. # @param parse_mode [TD::Types::TextParseMode] Text parse mode. # @return [TD::Types::FormattedText] def parse_text_entities(text:, parse_mode:) @@ -3170,7 +3173,7 @@ def ping_proxy(proxy_id:) # fetch new data. # Can be called before authorization. # - # @param payload [String] JSON-encoded push notification payload with all fields sent by the server, and + # @param payload [TD::Types::String] JSON-encoded push notification payload with all fields sent by the server, and # "google.sent_time" and "google.notification.sound" fields added. # @return [TD::Types::Ok] def process_push_notification(payload:) @@ -3208,7 +3211,7 @@ def read_file_part(file_id:, offset:, count:) # Recovers the password with a password recovery code sent to an email address that was previously set up. # Works only when the current authorization state is authorizationStateWaitPassword. # - # @param recovery_code [String] Recovery code to check. + # @param recovery_code [TD::Types::String] Recovery code to check. # @return [TD::Types::Ok] def recover_authentication_password(recovery_code:) broadcast('@type' => 'recoverAuthenticationPassword', @@ -3217,7 +3220,7 @@ def recover_authentication_password(recovery_code:) # Recovers the password using a recovery code sent to an email address that was previously set up. # - # @param recovery_code [String] Recovery code to check. + # @param recovery_code [TD::Types::String] Recovery code to check. # @return [TD::Types::PasswordState] def recover_password(recovery_code:) broadcast('@type' => 'recoverPassword', @@ -3239,8 +3242,8 @@ def register_device(device_token:, other_user_ids:) # Finishes user registration. # Works only when the current authorization state is authorizationStateWaitRegistration. # - # @param first_name [String] The first name of the user; 1-64 characters. - # @param last_name [String] The last name of the user; 0-64 characters. + # @param first_name [TD::Types::String] The first name of the user; 1-64 characters. + # @param last_name [TD::Types::String] The last name of the user; 0-64 characters. # @return [TD::Types::Ok] def register_user(first_name:, last_name:) broadcast('@type' => 'registerUser', @@ -3320,7 +3323,7 @@ def remove_proxy(proxy_id:) # Removes a hashtag from the list of recently used hashtags. # - # @param hashtag [String] Hashtag to delete. + # @param hashtag [TD::Types::String] Hashtag to delete. # @return [TD::Types::Ok] def remove_recent_hashtag(hashtag:) broadcast('@type' => 'removeRecentHashtag', @@ -3418,7 +3421,7 @@ def replace_primary_chat_invite_link(chat_id:) # @param chat_id [Integer] Chat identifier. # @param message_ids [Array] Identifiers of reported messages, if any. # @param reason [TD::Types::ChatReportReason] The reason for reporting the chat. - # @param text [String] Additional report details; 0-1024 characters. + # @param text [TD::Types::String] Additional report details; 0-1024 characters. # @return [TD::Types::Ok] def report_chat(chat_id:, message_ids:, reason:, text:) broadcast('@type' => 'reportChat', @@ -3436,7 +3439,7 @@ def report_chat(chat_id:, message_ids:, reason:, text:) # @param file_id [Integer] Identifier of the photo to report. # Only full photos from {TD::Types::ChatPhoto} can be reported. # @param reason [TD::Types::ChatReportReason] The reason for reporting the chat photo. - # @param text [String] Additional report details; 0-1024 characters. + # @param text [TD::Types::String] Additional report details; 0-1024 characters. # @return [TD::Types::Ok] def report_chat_photo(chat_id:, file_id:, reason:, text:) broadcast('@type' => 'reportChatPhoto', @@ -3579,7 +3582,7 @@ def reset_network_statistics # If a primary link is revoked, then additionally to the revoked link returns new primary link. # # @param chat_id [Integer] Chat identifier. - # @param invite_link [String] Invite link to be revoked. + # @param invite_link [TD::Types::String] Invite link to be revoked. # @return [TD::Types::ChatInviteLinks] def revoke_chat_invite_link(chat_id:, invite_link:) broadcast('@type' => 'revokeChatInviteLink', @@ -3600,7 +3603,7 @@ def revoke_group_call_invite_link(group_call_id:) # Saves application log event on the server. # Can be called before authorization. # - # @param type [String] Event type. + # @param type [TD::Types::String] Event type. # @param chat_id [Integer] Optional chat identifier, associated with the event. # @param data [TD::Types::JsonValue] The log event data. # @return [TD::Types::Ok] @@ -3613,7 +3616,7 @@ def save_application_log_event(type:, chat_id:, data:) # Searches for a background by its name. # - # @param name [String] The name of the background. + # @param name [TD::Types::String] The name of the background. # @return [TD::Types::Background] def search_background(name:) broadcast('@type' => 'searchBackground', @@ -3643,7 +3646,7 @@ def search_call_messages(from_message_id:, limit:, only_missed:) # Requires administrator rights in channels. # # @param chat_id [Integer] Chat identifier. - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # @param limit [Integer] The maximum number of users to be returned. # @param filter [TD::Types::ChatMembersFilter] The type of users to return. # By default, chatMembersFilterMembers. @@ -3664,7 +3667,7 @@ def search_chat_members(chat_id:, query:, limit:, filter:) # For optimal performance the number of returned messages is chosen by the library. # # @param chat_id [Integer] Identifier of the chat in which to search messages. - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # @param sender [TD::Types::MessageSender] If not null, only messages sent by the specified sender will be returned. # Not supported in secret chats. # @param from_message_id [Integer] Identifier of the message starting from which history must be fetched; use 0 to @@ -3707,7 +3710,7 @@ def search_chat_recent_location_messages(chat_id:, limit:) # Searches for the specified query in the title and username of already known chats, this is an offline request. # Returns chats in the order seen in the main chat list. # - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # If the query is empty, returns up to 20 recently found chats. # @param limit [Integer] The maximum number of chats to be returned. # @return [TD::Types::Chats] @@ -3731,7 +3734,7 @@ def search_chats_nearby(location:) # Searches for the specified query in the title and username of already known chats via request to the server. # Returns chats in the order seen in the main chat list. # - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # @param limit [Integer] The maximum number of chats to be returned. # @return [TD::Types::Chats] def search_chats_on_server(query:, limit:) @@ -3742,7 +3745,7 @@ def search_chats_on_server(query:, limit:) # Searches for the specified query in the first names, last names and usernames of the known user contacts. # - # @param query [String, nil] Query to search for; may be empty to return all contacts. + # @param query [TD::Types::String, nil] Query to search for; may be empty to return all contacts. # @param limit [Integer] The maximum number of users to be returned. # @return [TD::Types::Users] def search_contacts(query: nil, limit:) @@ -3754,10 +3757,10 @@ def search_contacts(query: nil, limit:) # Searches for emojis by keywords. # Supported only if the file database is enabled. # - # @param text [String] Text to search for. + # @param text [TD::Types::String] Text to search for. # @param exact_match [Boolean] True, if only emojis, which exactly match text needs to be returned. - # @param input_language_codes [Array, nil] List of possible IETF language tags of the user's input language; - # may be empty if unknown. + # @param input_language_codes [Array, nil] List of possible IETF language tags of the user's input + # language; may be empty if unknown. # @return [TD::Types::Emojis] def search_emojis(text:, exact_match:, input_language_codes: nil) broadcast('@type' => 'searchEmojis', @@ -3768,7 +3771,7 @@ def search_emojis(text:, exact_match:, input_language_codes: nil) # Searches for recently used hashtags by their prefix. # - # @param prefix [String] Hashtag prefix to search for. + # @param prefix [TD::Types::String] Hashtag prefix to search for. # @param limit [Integer] The maximum number of hashtags to be returned. # @return [TD::Types::Hashtags] def search_hashtags(prefix:, limit:) @@ -3780,7 +3783,7 @@ def search_hashtags(prefix:, limit:) # Searches for installed sticker sets by looking for specified query in their title and name. # # @param is_masks [Boolean] Pass true to return mask sticker sets; pass false to return ordinary sticker sets. - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # @param limit [Integer] The maximum number of sticker sets to return. # @return [TD::Types::StickerSets] def search_installed_sticker_sets(is_masks:, query:, limit:) @@ -3797,7 +3800,7 @@ def search_installed_sticker_sets(is_masks:, query:, limit:) # @param chat_list [TD::Types::ChatList] Chat list in which to search messages; pass null to search in all chats # regardless of their chat list. # Only Main and Archive chat lists are supported. - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # @param offset_date [Integer] The date of the message starting from which the results should be fetched. # Use 0 or any date in the future to get results from the last message. # @param offset_chat_id [Integer] The chat identifier of the last found message, or 0 for the first request. @@ -3830,7 +3833,7 @@ def search_messages(chat_list:, query:, offset_date:, offset_chat_id:, offset_me # Currently only private chats, supergroups and channels can be public. # Returns the chat if found; otherwise an error is returned. # - # @param username [String] Username to be resolved. + # @param username [TD::Types::String] Username to be resolved. # @return [TD::Types::Chat] def search_public_chat(username:) broadcast('@type' => 'searchPublicChat', @@ -3843,7 +3846,7 @@ def search_public_chat(username:) # Returns nothing if the length of the searched username prefix is less than 5. # Excludes private chats with contacts and chats from the chat list from the results. # - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # @return [TD::Types::Chats] def search_public_chats(query:) broadcast('@type' => 'searchPublicChats', @@ -3856,10 +3859,10 @@ def search_public_chats(query:) # # @param chat_id [Integer] Identifier of the chat in which to search. # Specify 0 to search in all secret chats. - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # If empty, searchChatMessages should be used instead. - # @param offset [String] Offset of the first entry to return as received from the previous request; use empty string - # to get first chunk of results. + # @param offset [TD::Types::String] Offset of the first entry to return as received from the previous request; use + # empty string to get first chunk of results. # @param limit [Integer] The maximum number of messages to be returned; up to 100. # Fewer messages may be returned than specified by the limit, even if the end of the message history has not been # reached. @@ -3876,7 +3879,7 @@ def search_secret_messages(chat_id:, query:, offset:, limit:, filter:) # Searches for a sticker set by its name. # - # @param name [String] Name of the sticker set. + # @param name [TD::Types::String] Name of the sticker set. # @return [TD::Types::StickerSet] def search_sticker_set(name:) broadcast('@type' => 'searchStickerSet', @@ -3886,7 +3889,7 @@ def search_sticker_set(name:) # Searches for ordinary sticker sets by looking for specified query in their title and name. # Excludes installed sticker sets from the results. # - # @param query [String] Query to search for. + # @param query [TD::Types::String] Query to search for. # @return [TD::Types::StickerSets] def search_sticker_sets(query:) broadcast('@type' => 'searchStickerSets', @@ -3895,7 +3898,7 @@ def search_sticker_sets(query:) # Searches for stickers from public sticker sets that correspond to a given emoji. # - # @param emoji [String] String representation of emoji; must be non-empty. + # @param emoji [TD::Types::String] String representation of emoji; must be non-empty. # @param limit [Integer, nil] The maximum number of stickers to be returned. # @return [TD::Types::Stickers] def search_stickers(emoji:, limit: nil) @@ -3911,7 +3914,7 @@ def search_stickers(emoji:, limit: nil) # # @param bot_user_id [Integer] Identifier of the bot. # @param chat_id [Integer] Identifier of the target chat. - # @param parameter [String] A hidden parameter sent to the bot for deep linking purposes + # @param parameter [TD::Types::String] A hidden parameter sent to the bot for deep linking purposes # (https://core.telegram.org/bots#deep-linking). # @return [TD::Types::Message] def send_bot_start_message(bot_user_id:, chat_id:, parameter:) @@ -3924,7 +3927,7 @@ def send_bot_start_message(bot_user_id:, chat_id:, parameter:) # Sends debug information for a call. # # @param call_id [Integer] Call identifier. - # @param debug_information [String] Debug information in application-specific format. + # @param debug_information [TD::Types::String] Debug information in application-specific format. # @return [TD::Types::Ok] def send_call_debug_information(call_id:, debug_information:) broadcast('@type' => 'sendCallDebugInformation', @@ -3936,7 +3939,7 @@ def send_call_debug_information(call_id:, debug_information:) # # @param call_id [Integer] Call identifier. # @param rating [Integer] Call rating; 1-5. - # @param comment [String] An optional user comment if the rating is less than 5. + # @param comment [TD::Types::String] An optional user comment if the rating is less than 5. # @param problems [Array] List of the exact types of problems with the call, specified by the # user. # @return [TD::Types::Ok] @@ -3984,8 +3987,8 @@ def send_chat_screenshot_taken_notification(chat_id:) # Sends a custom request; for bots only. # - # @param method [String] The method name. - # @param parameters [String] JSON-serialized method parameters. + # @param method [TD::Types::String] The method name. + # @param parameters [TD::Types::String] JSON-serialized method parameters. # @return [TD::Types::CustomRequestResult] def send_custom_request(method:, parameters:) broadcast('@type' => 'sendCustomRequest', @@ -3995,7 +3998,7 @@ def send_custom_request(method:, parameters:) # Sends a code to verify an email address to be added to a user's Telegram Passport. # - # @param email_address [String] Email address. + # @param email_address [TD::Types::String] Email address. # @return [TD::Types::EmailAddressAuthenticationCodeInfo] def send_email_address_verification_code(email_address:) broadcast('@type' => 'sendEmailAddressVerificationCode', @@ -4011,7 +4014,7 @@ def send_email_address_verification_code(email_address:) # @param reply_to_message_id [Integer] Identifier of a message to reply to or 0. # @param options [TD::Types::MessageSendOptions] Options to be used to send the message. # @param query_id [Integer] Identifier of the inline query. - # @param result_id [String] Identifier of the inline result. + # @param result_id [TD::Types::String] Identifier of the inline result. # @param hide_via_bot [Boolean] If true, there will be no mention of a bot, via which the message is sent. # Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and # GetOption("venue_search_bot_username"). @@ -4088,8 +4091,8 @@ def send_passport_authorization_form(autorization_form_id:, types:) # @param chat_id [Integer] Chat identifier of the Invoice message. # @param message_id [Integer] Message identifier. # @param payment_form_id [Integer] Payment form identifier returned by getPaymentForm. - # @param order_info_id [String] Identifier returned by validateOrderInfo, or an empty string. - # @param shipping_option_id [String] Identifier of a chosen shipping option, if applicable. + # @param order_info_id [TD::Types::String] Identifier returned by validateOrderInfo, or an empty string. + # @param shipping_option_id [TD::Types::String] Identifier of a chosen shipping option, if applicable. # @param credentials [TD::Types::InputCredentials] The credentials chosen by user for payment. # @param tip_amount [Integer] Chosen by the user amount of tip in the smallest units of the currency. # @return [TD::Types::PaymentResult] @@ -4109,8 +4112,8 @@ def send_payment_form(chat_id:, message_id:, payment_form_id:, order_info_id:, s # Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or # "tg://confirmphone?phone=*******&hash=**********" link. # - # @param hash [String] Value of the "hash" parameter from the link. - # @param phone_number [String] Value of the "phone" parameter from the link. + # @param hash [TD::Types::String] Value of the "hash" parameter from the link. + # @param phone_number [TD::Types::String] Value of the "phone" parameter from the link. # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone # number. # @return [TD::Types::AuthenticationCodeInfo] @@ -4123,7 +4126,7 @@ def send_phone_number_confirmation_code(hash:, phone_number:, settings:) # Sends a code to verify a phone number to be added to a user's Telegram Passport. # - # @param phone_number [String] The phone number of the user, in international format. + # @param phone_number [TD::Types::String] The phone number of the user, in international format. # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone # number. # @return [TD::Types::AuthenticationCodeInfo] @@ -4157,7 +4160,7 @@ def set_alarm(seconds:) # authentication query and the current authorization state is authorizationStateWaitCode, # authorizationStateWaitRegistration, or authorizationStateWaitPassword. # - # @param phone_number [String] The phone number of the user, in international format. + # @param phone_number [TD::Types::String] The phone number of the user, in international format. # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone # number. # @return [TD::Types::Ok] @@ -4194,7 +4197,7 @@ def set_background(background:, type:, for_dark_theme:) # Changes the bio of the current user. # - # @param bio [String] The new value of the user bio; 0-70 characters without line feeds. + # @param bio [TD::Types::String] The new value of the user bio; 0-70 characters without line feeds. # @return [TD::Types::Ok] def set_bio(bio:) broadcast('@type' => 'setBio', @@ -4205,7 +4208,7 @@ def set_bio(bio:) # only. # # @param pending_update_count [Integer] The number of pending updates. - # @param error_message [String] The last error message. + # @param error_message [TD::Types::String] The last error message. # @return [TD::Types::Ok] def set_bot_updates_status(pending_update_count:, error_message:) broadcast('@type' => 'setBotUpdatesStatus', @@ -4216,7 +4219,7 @@ def set_bot_updates_status(pending_update_count:, error_message:) # Changes application-specific data associated with a chat. # # @param chat_id [Integer] Chat identifier. - # @param client_data [String] New value of client_data. + # @param client_data [TD::Types::String] New value of client_data. # @return [TD::Types::Ok] def set_chat_client_data(chat_id:, client_data:) broadcast('@type' => 'setChatClientData', @@ -4229,7 +4232,7 @@ def set_chat_client_data(chat_id:, client_data:) # Requires can_change_info administrator right. # # @param chat_id [Integer] Identifier of the chat. - # @param description [String] New chat description; 0-255 characters. + # @param description [TD::Types::String] New chat description; 0-255 characters. # @return [TD::Types::Ok] def set_chat_description(chat_id:, description:) broadcast('@type' => 'setChatDescription', @@ -4368,7 +4371,7 @@ def set_chat_slow_mode_delay(chat_id:, slow_mode_delay:) # Requires can_change_info administrator right. # # @param chat_id [Integer] Chat identifier. - # @param title [String] New title of the chat; 1-128 characters. + # @param title [TD::Types::String] New title of the chat; 1-128 characters. # @return [TD::Types::Ok] def set_chat_title(chat_id:, title:) broadcast('@type' => 'setChatTitle', @@ -4402,8 +4405,8 @@ def set_custom_language_pack(info:, strings:) # Adds, edits or deletes a string in a custom local language pack. # Can be called before authorization. # - # @param language_pack_id [String] Identifier of a previously added custom local language pack in the current - # localization target. + # @param language_pack_id [TD::Types::String] Identifier of a previously added custom local language pack in the + # current localization target. # @param new_string [TD::Types::LanguagePackString] New language pack string. # @return [TD::Types::Ok] def set_custom_language_pack_string(language_pack_id:, new_string:) @@ -4487,7 +4490,7 @@ def set_group_call_participant_volume_level(group_call_id:, participant_id:, vol # Requires groupCall.can_be_managed group call flag. # # @param group_call_id [Integer] Group call identifier. - # @param title [String] New group call title; 1-64 characters. + # @param title [TD::Types::String] New group call title; 1-64 characters. # @return [TD::Types::Ok] def set_group_call_title(group_call_id:, title:) broadcast('@type' => 'setGroupCallTitle', @@ -4497,7 +4500,7 @@ def set_group_call_title(group_call_id:, title:) # Updates the game score of the specified user in a game; for bots only. # - # @param inline_message_id [String] Inline message identifier. + # @param inline_message_id [TD::Types::String] Inline message identifier. # @param edit_message [Boolean] True, if the message should be edited. # @param user_id [Integer] User identifier. # @param score [Integer] The new score. @@ -4536,7 +4539,7 @@ def set_log_stream(log_stream:) # Sets the verbosity level for a specified TDLib internal log tag. # Can be called synchronously. # - # @param tag [String] Logging tag to change verbosity level. + # @param tag [TD::Types::String] Logging tag to change verbosity level. # @param new_verbosity_level [Integer] New verbosity level; 1-1024. # @return [TD::Types::Ok] def set_log_tag_verbosity_level(tag:, new_verbosity_level:) @@ -4560,8 +4563,8 @@ def set_log_verbosity_level(new_verbosity_level:) # Changes the first and last name of the current user. # - # @param first_name [String] The new value of the first name for the user; 1-64 characters. - # @param last_name [String] The new value of the optional last name for the user; 0-64 characters. + # @param first_name [TD::Types::String] The new value of the first name for the user; 1-64 characters. + # @param last_name [TD::Types::String] The new value of the optional last name for the user; 0-64 characters. # @return [TD::Types::Ok] def set_name(first_name:, last_name:) broadcast('@type' => 'setName', @@ -4588,7 +4591,7 @@ def set_network_type(type:) # (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. # Can be called before authorization. # - # @param name [String] The name of the option. + # @param name [TD::Types::String] The name of the option. # @param value [TD::Types::OptionValue] The new value of the option. # @return [TD::Types::Ok] def set_option(name:, value:) @@ -4602,7 +4605,7 @@ def set_option(name:, value:) # number or the chosen email address must be verified first. # # @param element [TD::Types::InputPassportElement] Input Telegram Passport element. - # @param password [String] Password of the current user. + # @param password [TD::Types::String] Password of the current user. # @return [TD::Types::PassportElement] def set_passport_element(element:, password:) broadcast('@type' => 'setPassportElement', @@ -4626,11 +4629,11 @@ def set_passport_element_errors(user_id:, errors:) # If a new recovery email address is specified, then the change will not be applied until the new recovery email # address is confirmed. # - # @param old_password [String] Previous password of the user. - # @param new_password [String, nil] New password of the user; may be empty to remove the password. - # @param new_hint [String, nil] New password hint; may be empty. + # @param old_password [TD::Types::String] Previous password of the user. + # @param new_password [TD::Types::String, nil] New password of the user; may be empty to remove the password. + # @param new_hint [TD::Types::String, nil] New password hint; may be empty. # @param set_recovery_email_address [Boolean] Pass true if the recovery email address should be changed. - # @param new_recovery_email_address [String, nil] New recovery email address; may be empty. + # @param new_recovery_email_address [TD::Types::String, nil] New recovery email address; may be empty. # @return [TD::Types::PasswordState] def set_password(old_password:, new_password: nil, new_hint: nil, set_recovery_email_address: false, new_recovery_email_address: nil) @@ -4683,8 +4686,8 @@ def set_profile_photo(photo:) # If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds # immediately and aborts all other requests waiting for an email confirmation. # - # @param password [String] Password of the current user. - # @param new_recovery_email_address [String] New recovery email address. + # @param password [TD::Types::String] Password of the current user. + # @param new_recovery_email_address [TD::Types::String] New recovery email address. # @return [TD::Types::PasswordState] def set_recovery_email_address(password:, new_recovery_email_address:) broadcast('@type' => 'setRecoveryEmailAddress', @@ -4720,7 +4723,7 @@ def set_sticker_position_in_set(sticker:, position:) # Returns the sticker set. # # @param user_id [Integer] Sticker set owner. - # @param name [String] Sticker set name. + # @param name [TD::Types::String] Sticker set name. # @param thumbnail [TD::Types::InputFile] Thumbnail to set in PNG or TGS format. # Animated thumbnail must be set for animated sticker sets and only for them. # Pass a zero InputFileId to delete the thumbnail. @@ -4747,7 +4750,7 @@ def set_supergroup_sticker_set(supergroup_id:, sticker_set_id:) # Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel. # # @param supergroup_id [Integer] Identifier of the supergroup or channel. - # @param username [String] New value of the username. + # @param username [TD::Types::String] New value of the username. # Use an empty string to remove the username. # @return [TD::Types::Ok] def set_supergroup_username(supergroup_id:, username:) @@ -4779,7 +4782,7 @@ def set_user_privacy_setting_rules(setting:, rules:) # Changes the username of the current user. # - # @param username [String] The new value of the username. + # @param username [TD::Types::String] The new value of the username. # Use an empty string to remove the username. # @return [TD::Types::Ok] def set_username(username:) @@ -4814,7 +4817,7 @@ def share_phone_number(user_id:) # Requires groupCall.can_be_managed group call flag. # # @param group_call_id [Integer] Group call identifier. - # @param title [String] Group call recording title; 0-64 characters. + # @param title [TD::Types::String] Group call recording title; 0-64 characters. # @return [TD::Types::Ok] def start_group_call_recording(group_call_id:, title:) broadcast('@type' => 'startGroupCallRecording', @@ -4849,7 +4852,7 @@ def stop_poll(chat_id:, message_id:, reply_markup:) # This method shouldn't be called explicitly for the current used/base language packs. # Can be called before authorization. # - # @param language_pack_id [String] Language pack identifier. + # @param language_pack_id [TD::Types::String] Language pack identifier. # @return [TD::Types::Ok] def synchronize_language_pack(language_pack_id:) broadcast('@type' => 'synchronizeLanguagePack', @@ -5013,7 +5016,7 @@ def toggle_supergroup_sign_messages(supergroup_id:, sign_messages:) # @param chat_id [Integer] Chat identifier. # @param user_id [Integer] Identifier of the user to which transfer the ownership. # The ownership can't be transferred to a bot or to a deleted user. - # @param password [String] The password of the current user. + # @param password [TD::Types::String] The password of the current user. # @return [TD::Types::Ok] def transfer_chat_ownership(chat_id:, user_id:, password:) broadcast('@type' => 'transferChatOwnership', diff --git a/lib/tdlib/types/account_ttl.rb b/lib/tdlib/types/account_ttl.rb index eee341aa..38402fb6 100644 --- a/lib/tdlib/types/account_ttl.rb +++ b/lib/tdlib/types/account_ttl.rb @@ -5,6 +5,6 @@ module TD::Types # @attr days [Integer] Number of days of inactivity before the account will be flagged for deletion; should range # from 30-366 days. class AccountTtl < Base - attribute :days, TD::Types::Integer + attribute :days, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/address.rb b/lib/tdlib/types/address.rb index cbcecb35..081c2eee 100644 --- a/lib/tdlib/types/address.rb +++ b/lib/tdlib/types/address.rb @@ -1,12 +1,12 @@ module TD::Types # Describes an address. # - # @attr country_code [String] A two-letter ISO 3166-1 alpha-2 country code. - # @attr state [String] State, if applicable. - # @attr city [String] City. - # @attr street_line1 [String] First line of the address. - # @attr street_line2 [String] Second line of the address. - # @attr postal_code [String] Address postal code. + # @attr country_code [TD::Types::String] A two-letter ISO 3166-1 alpha-2 country code. + # @attr state [TD::Types::String] State, if applicable. + # @attr city [TD::Types::String] City. + # @attr street_line1 [TD::Types::String] First line of the address. + # @attr street_line2 [TD::Types::String] Second line of the address. + # @attr postal_code [TD::Types::String] Address postal code. class Address < Base attribute :country_code, TD::Types::String attribute :state, TD::Types::String diff --git a/lib/tdlib/types/animated_chat_photo.rb b/lib/tdlib/types/animated_chat_photo.rb index 08448d53..37d5801d 100644 --- a/lib/tdlib/types/animated_chat_photo.rb +++ b/lib/tdlib/types/animated_chat_photo.rb @@ -5,8 +5,8 @@ module TD::Types # @attr file [TD::Types::File] Information about the animation file. # @attr main_frame_timestamp [Float] Timestamp of the frame, used as a static chat photo. class AnimatedChatPhoto < Base - attribute :length, TD::Types::Integer + attribute :length, TD::Types::Coercible::Integer attribute :file, TD::Types::File - attribute :main_frame_timestamp, TD::Types::Float + attribute :main_frame_timestamp, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/animation.rb b/lib/tdlib/types/animation.rb index f6c347c2..930d402a 100644 --- a/lib/tdlib/types/animation.rb +++ b/lib/tdlib/types/animation.rb @@ -5,17 +5,17 @@ module TD::Types # @attr duration [Integer] Duration of the animation, in seconds; as defined by the sender. # @attr width [Integer] Width of the animation. # @attr height [Integer] Height of the animation. - # @attr file_name [String] Original name of the file; as defined by the sender. - # @attr mime_type [String] MIME type of the file, usually "image/gif" or "video/mp4". + # @attr file_name [TD::Types::String] Original name of the file; as defined by the sender. + # @attr mime_type [TD::Types::String] MIME type of the file, usually "image/gif" or "video/mp4". # @attr has_stickers [Boolean] True, if stickers were added to the animation. # The list of corresponding sticker set can be received using getAttachedStickerSets. # @attr minithumbnail [TD::Types::Minithumbnail, nil] Animation minithumbnail; may be null. # @attr thumbnail [TD::Types::Thumbnail, nil] Animation thumbnail in JPEG or MPEG4 format; may be null. # @attr animation [TD::Types::File] File containing the animation. class Animation < Base - attribute :duration, TD::Types::Integer - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :file_name, TD::Types::String attribute :mime_type, TD::Types::String attribute :has_stickers, TD::Types::Bool diff --git a/lib/tdlib/types/audio.rb b/lib/tdlib/types/audio.rb index 72f74227..23b3b5e1 100644 --- a/lib/tdlib/types/audio.rb +++ b/lib/tdlib/types/audio.rb @@ -3,17 +3,17 @@ module TD::Types # Audio is usually in MP3 or M4A format. # # @attr duration [Integer] Duration of the audio, in seconds; as defined by the sender. - # @attr title [String] Title of the audio; as defined by the sender. - # @attr performer [String] Performer of the audio; as defined by the sender. - # @attr file_name [String] Original name of the file; as defined by the sender. - # @attr mime_type [String] The MIME type of the file; as defined by the sender. + # @attr title [TD::Types::String] Title of the audio; as defined by the sender. + # @attr performer [TD::Types::String] Performer of the audio; as defined by the sender. + # @attr file_name [TD::Types::String] Original name of the file; as defined by the sender. + # @attr mime_type [TD::Types::String] The MIME type of the file; as defined by the sender. # @attr album_cover_minithumbnail [TD::Types::Minithumbnail, nil] The minithumbnail of the album cover; may be null. # @attr album_cover_thumbnail [TD::Types::Thumbnail, nil] The thumbnail of the album cover in JPEG format; as defined # by the sender. # The full size thumbnail should be extracted from the downloaded file; may be null. # @attr audio [TD::Types::File] File containing the audio. class Audio < Base - attribute :duration, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer attribute :title, TD::Types::String attribute :performer, TD::Types::String attribute :file_name, TD::Types::String diff --git a/lib/tdlib/types/authentication_code_info.rb b/lib/tdlib/types/authentication_code_info.rb index c63a59e9..d795fa09 100644 --- a/lib/tdlib/types/authentication_code_info.rb +++ b/lib/tdlib/types/authentication_code_info.rb @@ -1,7 +1,7 @@ module TD::Types # Information about the authentication code that was sent. # - # @attr phone_number [String] A phone number that is being authenticated. + # @attr phone_number [TD::Types::String] A phone number that is being authenticated. # @attr type [TD::Types::AuthenticationCodeType] Describes the way the code was sent to the user. # @attr next_type [TD::Types::AuthenticationCodeType, nil] Describes the way the next code will be sent to the user; # may be null. @@ -10,6 +10,6 @@ class AuthenticationCodeInfo < Base attribute :phone_number, TD::Types::String attribute :type, TD::Types::AuthenticationCodeType attribute :next_type, TD::Types::AuthenticationCodeType.optional.default(nil) - attribute :timeout, TD::Types::Integer + attribute :timeout, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/authentication_code_type/call.rb b/lib/tdlib/types/authentication_code_type/call.rb index d4f950fd..37270787 100644 --- a/lib/tdlib/types/authentication_code_type/call.rb +++ b/lib/tdlib/types/authentication_code_type/call.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr length [Integer] Length of the code. class AuthenticationCodeType::Call < AuthenticationCodeType - attribute :length, TD::Types::Integer + attribute :length, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/authentication_code_type/flash_call.rb b/lib/tdlib/types/authentication_code_type/flash_call.rb index a3c1fa74..1a4f75b1 100644 --- a/lib/tdlib/types/authentication_code_type/flash_call.rb +++ b/lib/tdlib/types/authentication_code_type/flash_call.rb @@ -2,7 +2,7 @@ module TD::Types # An authentication code is delivered by an immediately cancelled call to the specified phone number. # The number from which the call was made is the code. # - # @attr pattern [String] Pattern of the phone number from which the call will be made. + # @attr pattern [TD::Types::String] Pattern of the phone number from which the call will be made. class AuthenticationCodeType::FlashCall < AuthenticationCodeType attribute :pattern, TD::Types::String end diff --git a/lib/tdlib/types/authentication_code_type/sms.rb b/lib/tdlib/types/authentication_code_type/sms.rb index 8a480e5d..63335d1d 100644 --- a/lib/tdlib/types/authentication_code_type/sms.rb +++ b/lib/tdlib/types/authentication_code_type/sms.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr length [Integer] Length of the code. class AuthenticationCodeType::Sms < AuthenticationCodeType - attribute :length, TD::Types::Integer + attribute :length, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/authentication_code_type/telegram_message.rb b/lib/tdlib/types/authentication_code_type/telegram_message.rb index 2a1100bc..2de53f24 100644 --- a/lib/tdlib/types/authentication_code_type/telegram_message.rb +++ b/lib/tdlib/types/authentication_code_type/telegram_message.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr length [Integer] Length of the code. class AuthenticationCodeType::TelegramMessage < AuthenticationCodeType - attribute :length, TD::Types::Integer + attribute :length, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb b/lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb index 43db4238..ab64c214 100644 --- a/lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb +++ b/lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb @@ -1,7 +1,7 @@ module TD::Types # The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link. # - # @attr link [String] A tg:// URL for the QR code. + # @attr link [TD::Types::String] A tg:// URL for the QR code. # The link will be updated frequently. class AuthorizationState::WaitOtherDeviceConfirmation < AuthorizationState attribute :link, TD::Types::String diff --git a/lib/tdlib/types/authorization_state/wait_password.rb b/lib/tdlib/types/authorization_state/wait_password.rb index 546be65d..4764700d 100644 --- a/lib/tdlib/types/authorization_state/wait_password.rb +++ b/lib/tdlib/types/authorization_state/wait_password.rb @@ -1,10 +1,10 @@ module TD::Types # The user has been authorized, but needs to enter a password to start using the application. # - # @attr password_hint [String, nil] Hint for the password; may be empty. + # @attr password_hint [TD::Types::String, nil] Hint for the password; may be empty. # @attr has_recovery_email_address [Boolean] True, if a recovery email address has been set up. - # @attr recovery_email_address_pattern [String, nil] Pattern of the email address to which the recovery email was - # sent; empty until a recovery email has been sent. + # @attr recovery_email_address_pattern [TD::Types::String, nil] Pattern of the email address to which the recovery + # email was sent; empty until a recovery email has been sent. class AuthorizationState::WaitPassword < AuthorizationState attribute :password_hint, TD::Types::String.optional.default(nil) attribute :has_recovery_email_address, TD::Types::Bool diff --git a/lib/tdlib/types/auto_download_settings.rb b/lib/tdlib/types/auto_download_settings.rb index 74a1b7d4..66d74acf 100644 --- a/lib/tdlib/types/auto_download_settings.rb +++ b/lib/tdlib/types/auto_download_settings.rb @@ -13,10 +13,10 @@ module TD::Types # @attr use_less_data_for_calls [Boolean] True, if "use less data for calls" option needs to be enabled. class AutoDownloadSettings < Base attribute :is_auto_download_enabled, TD::Types::Bool - attribute :max_photo_file_size, TD::Types::Integer - attribute :max_video_file_size, TD::Types::Integer - attribute :max_other_file_size, TD::Types::Integer - attribute :video_upload_bitrate, TD::Types::Integer + attribute :max_photo_file_size, TD::Types::Coercible::Integer + attribute :max_video_file_size, TD::Types::Coercible::Integer + attribute :max_other_file_size, TD::Types::Coercible::Integer + attribute :video_upload_bitrate, TD::Types::Coercible::Integer attribute :preload_large_videos, TD::Types::Bool attribute :preload_next_audio, TD::Types::Bool attribute :use_less_data_for_calls, TD::Types::Bool diff --git a/lib/tdlib/types/background.rb b/lib/tdlib/types/background.rb index 6ce5fe30..ab5bb0f6 100644 --- a/lib/tdlib/types/background.rb +++ b/lib/tdlib/types/background.rb @@ -4,12 +4,12 @@ module TD::Types # @attr id [Integer] Unique background identifier. # @attr is_default [Boolean] True, if this is one of default backgrounds. # @attr is_dark [Boolean] True, if the background is dark and is recommended to be used with dark theme. - # @attr name [String] Unique background name. + # @attr name [TD::Types::String] Unique background name. # @attr document [TD::Types::Document, nil] Document with the background; may be null. # Null only for filled backgrounds. # @attr type [TD::Types::BackgroundType] Type of the background. class Background < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :is_default, TD::Types::Bool attribute :is_dark, TD::Types::Bool attribute :name, TD::Types::String diff --git a/lib/tdlib/types/background_fill/gradient.rb b/lib/tdlib/types/background_fill/gradient.rb index 4e5e2f64..52afba3d 100644 --- a/lib/tdlib/types/background_fill/gradient.rb +++ b/lib/tdlib/types/background_fill/gradient.rb @@ -6,8 +6,8 @@ module TD::Types # @attr rotation_angle [Integer] Clockwise rotation angle of the gradient, in degrees; 0-359. # Should be always divisible by 45. class BackgroundFill::Gradient < BackgroundFill - attribute :top_color, TD::Types::Integer - attribute :bottom_color, TD::Types::Integer - attribute :rotation_angle, TD::Types::Integer + attribute :top_color, TD::Types::Coercible::Integer + attribute :bottom_color, TD::Types::Coercible::Integer + attribute :rotation_angle, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/background_fill/solid.rb b/lib/tdlib/types/background_fill/solid.rb index 6cc53a27..aea54ca2 100644 --- a/lib/tdlib/types/background_fill/solid.rb +++ b/lib/tdlib/types/background_fill/solid.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr color [Integer] A color of the background in the RGB24 format. class BackgroundFill::Solid < BackgroundFill - attribute :color, TD::Types::Integer + attribute :color, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/background_type/pattern.rb b/lib/tdlib/types/background_type/pattern.rb index 350c225c..589e7898 100644 --- a/lib/tdlib/types/background_type/pattern.rb +++ b/lib/tdlib/types/background_type/pattern.rb @@ -7,7 +7,7 @@ module TD::Types # @attr is_moving [Boolean] True, if the background needs to be slightly moved when device is tilted. class BackgroundType::Pattern < BackgroundType attribute :fill, TD::Types::BackgroundFill - attribute :intensity, TD::Types::Integer + attribute :intensity, TD::Types::Coercible::Integer attribute :is_moving, TD::Types::Bool end end diff --git a/lib/tdlib/types/bank_card_action_open_url.rb b/lib/tdlib/types/bank_card_action_open_url.rb index 302c2efe..6a9d0f69 100644 --- a/lib/tdlib/types/bank_card_action_open_url.rb +++ b/lib/tdlib/types/bank_card_action_open_url.rb @@ -1,8 +1,8 @@ module TD::Types # Describes an action associated with a bank card number. # - # @attr text [String] Action text. - # @attr url [String] The URL to be opened. + # @attr text [TD::Types::String] Action text. + # @attr url [TD::Types::String] The URL to be opened. class BankCardActionOpenUrl < Base attribute :text, TD::Types::String attribute :url, TD::Types::String diff --git a/lib/tdlib/types/bank_card_info.rb b/lib/tdlib/types/bank_card_info.rb index f2d03930..c8cb1d32 100644 --- a/lib/tdlib/types/bank_card_info.rb +++ b/lib/tdlib/types/bank_card_info.rb @@ -1,7 +1,7 @@ module TD::Types # Information about a bank card. # - # @attr title [String] Title of the bank card description. + # @attr title [TD::Types::String] Title of the bank card description. # @attr actions [Array] Actions that can be done with the bank card number. class BankCardInfo < Base attribute :title, TD::Types::String diff --git a/lib/tdlib/types/basic_group.rb b/lib/tdlib/types/basic_group.rb index 03102bab..f6a3f5ae 100644 --- a/lib/tdlib/types/basic_group.rb +++ b/lib/tdlib/types/basic_group.rb @@ -7,10 +7,10 @@ module TD::Types # @attr is_active [Boolean] True, if the group is active. # @attr upgraded_to_supergroup_id [Integer] Identifier of the supergroup to which this group was upgraded; 0 if none. class BasicGroup < Base - attribute :id, TD::Types::Integer - attribute :member_count, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :member_count, TD::Types::Coercible::Integer attribute :status, TD::Types::ChatMemberStatus attribute :is_active, TD::Types::Bool - attribute :upgraded_to_supergroup_id, TD::Types::Integer + attribute :upgraded_to_supergroup_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/basic_group_full_info.rb b/lib/tdlib/types/basic_group_full_info.rb index 93887e3f..04a7622f 100644 --- a/lib/tdlib/types/basic_group_full_info.rb +++ b/lib/tdlib/types/basic_group_full_info.rb @@ -2,7 +2,7 @@ module TD::Types # Contains full information about a basic group. # # @attr photo [TD::Types::ChatPhoto, nil] Chat photo; may be null. - # @attr description [String] Group description. + # @attr description [TD::Types::String] Group description. # Updated only after the basic group is opened. # @attr creator_user_id [Integer] User identifier of the creator of the group; 0 if unknown. # @attr members [Array] Group members. @@ -12,7 +12,7 @@ module TD::Types class BasicGroupFullInfo < Base attribute :photo, TD::Types::ChatPhoto.optional.default(nil) attribute :description, TD::Types::String - attribute :creator_user_id, TD::Types::Integer + attribute :creator_user_id, TD::Types::Coercible::Integer attribute :members, TD::Types::Array.of(TD::Types::ChatMember) attribute :invite_link, TD::Types::ChatInviteLink.optional.default(nil) end diff --git a/lib/tdlib/types/bot_command.rb b/lib/tdlib/types/bot_command.rb index 28e4cf15..dea47f8d 100644 --- a/lib/tdlib/types/bot_command.rb +++ b/lib/tdlib/types/bot_command.rb @@ -1,8 +1,8 @@ module TD::Types # Represents a command supported by a bot. # - # @attr command [String] Text of the bot command. - # @attr description [String] Description of the bot command. + # @attr command [TD::Types::String] Text of the bot command. + # @attr description [TD::Types::String] Description of the bot command. class BotCommand < Base attribute :command, TD::Types::String attribute :description, TD::Types::String diff --git a/lib/tdlib/types/bot_info.rb b/lib/tdlib/types/bot_info.rb index b61c6e85..288988b4 100644 --- a/lib/tdlib/types/bot_info.rb +++ b/lib/tdlib/types/bot_info.rb @@ -1,7 +1,7 @@ module TD::Types # Provides information about a bot and its supported commands. # - # @attr description [String] Long description shown on the user info page. + # @attr description [TD::Types::String] Long description shown on the user info page. # @attr commands [Array] A list of commands supported by the bot. class BotInfo < Base attribute :description, TD::Types::String diff --git a/lib/tdlib/types/call.rb b/lib/tdlib/types/call.rb index 1115da41..9fe197dd 100644 --- a/lib/tdlib/types/call.rb +++ b/lib/tdlib/types/call.rb @@ -7,8 +7,8 @@ module TD::Types # @attr is_video [Boolean] True, if the call is a video call. # @attr state [TD::Types::CallState] Call state. class Call < Base - attribute :id, TD::Types::Integer - attribute :user_id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :is_outgoing, TD::Types::Bool attribute :is_video, TD::Types::Bool attribute :state, TD::Types::CallState diff --git a/lib/tdlib/types/call_id.rb b/lib/tdlib/types/call_id.rb index 36bd1bae..87e9f2f0 100644 --- a/lib/tdlib/types/call_id.rb +++ b/lib/tdlib/types/call_id.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr id [Integer] Call identifier. class CallId < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/call_protocol.rb b/lib/tdlib/types/call_protocol.rb index 11573434..1fd2ce55 100644 --- a/lib/tdlib/types/call_protocol.rb +++ b/lib/tdlib/types/call_protocol.rb @@ -5,12 +5,12 @@ module TD::Types # @attr udp_reflector [Boolean] True, if connection through UDP reflectors is supported. # @attr min_layer [Integer] The minimum supported API layer; use 65. # @attr max_layer [Integer] The maximum supported API layer; use 65. - # @attr library_versions [Array] List of supported tgcalls versions. + # @attr library_versions [Array] List of supported tgcalls versions. class CallProtocol < Base attribute :udp_p2p, TD::Types::Bool attribute :udp_reflector, TD::Types::Bool - attribute :min_layer, TD::Types::Integer - attribute :max_layer, TD::Types::Integer + attribute :min_layer, TD::Types::Coercible::Integer + attribute :max_layer, TD::Types::Coercible::Integer attribute :library_versions, TD::Types::Array.of(TD::Types::String) end end diff --git a/lib/tdlib/types/call_server.rb b/lib/tdlib/types/call_server.rb index 9d792b1d..20816b6c 100644 --- a/lib/tdlib/types/call_server.rb +++ b/lib/tdlib/types/call_server.rb @@ -2,15 +2,15 @@ module TD::Types # Describes a server for relaying call data. # # @attr id [Integer] Server identifier. - # @attr ip_address [String] Server IPv4 address. - # @attr ipv6_address [String] Server IPv6 address. + # @attr ip_address [TD::Types::String] Server IPv4 address. + # @attr ipv6_address [TD::Types::String] Server IPv6 address. # @attr port [Integer] Server port number. # @attr type [TD::Types::CallServerType] Server type. class CallServer < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :ip_address, TD::Types::String attribute :ipv6_address, TD::Types::String - attribute :port, TD::Types::Integer + attribute :port, TD::Types::Coercible::Integer attribute :type, TD::Types::CallServerType end end diff --git a/lib/tdlib/types/call_server_type/telegram_reflector.rb b/lib/tdlib/types/call_server_type/telegram_reflector.rb index 68223875..c0bb38e5 100644 --- a/lib/tdlib/types/call_server_type/telegram_reflector.rb +++ b/lib/tdlib/types/call_server_type/telegram_reflector.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr peer_tag [String] A peer tag to be used with the reflector. class CallServerType::TelegramReflector < CallServerType - attribute :peer_tag, TD::Types::String + attribute :peer_tag, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/call_server_type/webrtc.rb b/lib/tdlib/types/call_server_type/webrtc.rb index d3102719..97333c61 100644 --- a/lib/tdlib/types/call_server_type/webrtc.rb +++ b/lib/tdlib/types/call_server_type/webrtc.rb @@ -1,8 +1,8 @@ module TD::Types # A WebRTC server. # - # @attr username [String] Username to be used for authentication. - # @attr password [String] Authentication password. + # @attr username [TD::Types::String] Username to be used for authentication. + # @attr password [TD::Types::String] Authentication password. # @attr supports_turn [Boolean] True, if the server supports TURN. # @attr supports_stun [Boolean] True, if the server supports STUN. class CallServerType::Webrtc < CallServerType diff --git a/lib/tdlib/types/call_state/ready.rb b/lib/tdlib/types/call_state/ready.rb index 430d209f..6e6eac7f 100644 --- a/lib/tdlib/types/call_state/ready.rb +++ b/lib/tdlib/types/call_state/ready.rb @@ -3,15 +3,15 @@ module TD::Types # # @attr protocol [TD::Types::CallProtocol] Call protocols supported by the peer. # @attr servers [Array] List of available call servers. - # @attr config [String] A JSON-encoded call config. + # @attr config [TD::Types::String] A JSON-encoded call config. # @attr encryption_key [String] Call encryption key. - # @attr emojis [Array] Encryption key emojis fingerprint. + # @attr emojis [Array] Encryption key emojis fingerprint. # @attr allow_p2p [Boolean] True, if peer-to-peer connection is allowed by users privacy settings. class CallState::Ready < CallState attribute :protocol, TD::Types::CallProtocol attribute :servers, TD::Types::Array.of(TD::Types::CallServer) attribute :config, TD::Types::String - attribute :encryption_key, TD::Types::String + attribute :encryption_key, TD::Types::Coercible::String attribute :emojis, TD::Types::Array.of(TD::Types::String) attribute :allow_p2p, TD::Types::Bool end diff --git a/lib/tdlib/types/callback_query_answer.rb b/lib/tdlib/types/callback_query_answer.rb index 86b14394..b92b90e1 100644 --- a/lib/tdlib/types/callback_query_answer.rb +++ b/lib/tdlib/types/callback_query_answer.rb @@ -1,9 +1,9 @@ module TD::Types # Contains a bot's answer to a callback query. # - # @attr text [String] Text of the answer. + # @attr text [TD::Types::String] Text of the answer. # @attr show_alert [Boolean] True, if an alert should be shown to the user instead of a toast notification. - # @attr url [String] URL to be opened. + # @attr url [TD::Types::String] URL to be opened. class CallbackQueryAnswer < Base attribute :text, TD::Types::String attribute :show_alert, TD::Types::Bool diff --git a/lib/tdlib/types/callback_query_payload/data.rb b/lib/tdlib/types/callback_query_payload/data.rb index 6f0d2be6..ba6d4bef 100644 --- a/lib/tdlib/types/callback_query_payload/data.rb +++ b/lib/tdlib/types/callback_query_payload/data.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr data [String] Data that was attached to the callback button. class CallbackQueryPayload::Data < CallbackQueryPayload - attribute :data, TD::Types::String + attribute :data, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/callback_query_payload/data_with_password.rb b/lib/tdlib/types/callback_query_payload/data_with_password.rb index e4904c92..45d8daea 100644 --- a/lib/tdlib/types/callback_query_payload/data_with_password.rb +++ b/lib/tdlib/types/callback_query_payload/data_with_password.rb @@ -1,10 +1,10 @@ module TD::Types # The payload for a callback button requiring password. # - # @attr password [String] The password for the current user. + # @attr password [TD::Types::String] The password for the current user. # @attr data [String] Data that was attached to the callback button. class CallbackQueryPayload::DataWithPassword < CallbackQueryPayload attribute :password, TD::Types::String - attribute :data, TD::Types::String + attribute :data, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/callback_query_payload/game.rb b/lib/tdlib/types/callback_query_payload/game.rb index a91f0fa4..4039ddab 100644 --- a/lib/tdlib/types/callback_query_payload/game.rb +++ b/lib/tdlib/types/callback_query_payload/game.rb @@ -1,7 +1,7 @@ module TD::Types # The payload for a game callback button. # - # @attr game_short_name [String] A short name of the game that was attached to the callback button. + # @attr game_short_name [TD::Types::String] A short name of the game that was attached to the callback button. class CallbackQueryPayload::Game < CallbackQueryPayload attribute :game_short_name, TD::Types::String end diff --git a/lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb b/lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb index 941cf507..73bbe655 100644 --- a/lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb +++ b/lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr retry_after [Integer] Time left before the session can be used to transfer ownership of a chat, in seconds. class CanTransferOwnershipResult::PasswordTooFresh < CanTransferOwnershipResult - attribute :retry_after, TD::Types::Integer + attribute :retry_after, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb b/lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb index d0996021..7447012f 100644 --- a/lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb +++ b/lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr retry_after [Integer] Time left before the session can be used to transfer ownership of a chat, in seconds. class CanTransferOwnershipResult::SessionTooFresh < CanTransferOwnershipResult - attribute :retry_after, TD::Types::Integer + attribute :retry_after, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat.rb b/lib/tdlib/types/chat.rb index 97f4adcf..596e2fed 100644 --- a/lib/tdlib/types/chat.rb +++ b/lib/tdlib/types/chat.rb @@ -4,7 +4,7 @@ module TD::Types # # @attr id [Integer] Chat unique identifier. # @attr type [TD::Types::ChatType] Type of the chat. - # @attr title [String] Chat title. + # @attr title [TD::Types::String] Chat title. # @attr photo [TD::Types::ChatPhotoInfo, nil] Chat photo; may be null. # @attr permissions [TD::Types::ChatPermissions] Actions that non-administrator chat members are allowed to take in # the chat. @@ -36,11 +36,11 @@ module TD::Types # @attr reply_markup_message_id [Integer] Identifier of the message from which reply markup needs to be used; 0 if # there is no default custom reply markup in the chat. # @attr draft_message [TD::Types::DraftMessage, nil] A draft of a message in the chat; may be null. - # @attr client_data [String] Contains application-specific data associated with the chat. + # @attr client_data [TD::Types::String] Contains application-specific data associated with the chat. # (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the # message database is used. class Chat < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :type, TD::Types::ChatType attribute :title, TD::Types::String attribute :photo, TD::Types::ChatPhotoInfo.optional.default(nil) @@ -54,15 +54,15 @@ class Chat < Base attribute :can_be_deleted_for_all_users, TD::Types::Bool attribute :can_be_reported, TD::Types::Bool attribute :default_disable_notification, TD::Types::Bool - attribute :unread_count, TD::Types::Integer - attribute :last_read_inbox_message_id, TD::Types::Integer - attribute :last_read_outbox_message_id, TD::Types::Integer - attribute :unread_mention_count, TD::Types::Integer + attribute :unread_count, TD::Types::Coercible::Integer + attribute :last_read_inbox_message_id, TD::Types::Coercible::Integer + attribute :last_read_outbox_message_id, TD::Types::Coercible::Integer + attribute :unread_mention_count, TD::Types::Coercible::Integer attribute :notification_settings, TD::Types::ChatNotificationSettings - attribute :message_ttl_setting, TD::Types::Integer + attribute :message_ttl_setting, TD::Types::Coercible::Integer attribute :action_bar, TD::Types::ChatActionBar.optional.default(nil) attribute :voice_chat, TD::Types::VoiceChat - attribute :reply_markup_message_id, TD::Types::Integer + attribute :reply_markup_message_id, TD::Types::Coercible::Integer attribute :draft_message, TD::Types::DraftMessage.optional.default(nil) attribute :client_data, TD::Types::String end diff --git a/lib/tdlib/types/chat_action/uploading_document.rb b/lib/tdlib/types/chat_action/uploading_document.rb index 8feb82d7..c69dcfeb 100644 --- a/lib/tdlib/types/chat_action/uploading_document.rb +++ b/lib/tdlib/types/chat_action/uploading_document.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr progress [Integer] Upload progress, as a percentage. class ChatAction::UploadingDocument < ChatAction - attribute :progress, TD::Types::Integer + attribute :progress, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_action/uploading_photo.rb b/lib/tdlib/types/chat_action/uploading_photo.rb index bcae4f11..97aa8e15 100644 --- a/lib/tdlib/types/chat_action/uploading_photo.rb +++ b/lib/tdlib/types/chat_action/uploading_photo.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr progress [Integer] Upload progress, as a percentage. class ChatAction::UploadingPhoto < ChatAction - attribute :progress, TD::Types::Integer + attribute :progress, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_action/uploading_video.rb b/lib/tdlib/types/chat_action/uploading_video.rb index ac93a76c..beb26c6c 100644 --- a/lib/tdlib/types/chat_action/uploading_video.rb +++ b/lib/tdlib/types/chat_action/uploading_video.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr progress [Integer] Upload progress, as a percentage. class ChatAction::UploadingVideo < ChatAction - attribute :progress, TD::Types::Integer + attribute :progress, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_action/uploading_video_note.rb b/lib/tdlib/types/chat_action/uploading_video_note.rb index 2bed26b9..77da48fc 100644 --- a/lib/tdlib/types/chat_action/uploading_video_note.rb +++ b/lib/tdlib/types/chat_action/uploading_video_note.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr progress [Integer] Upload progress, as a percentage. class ChatAction::UploadingVideoNote < ChatAction - attribute :progress, TD::Types::Integer + attribute :progress, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_action/uploading_voice_note.rb b/lib/tdlib/types/chat_action/uploading_voice_note.rb index aa96d635..da9c2848 100644 --- a/lib/tdlib/types/chat_action/uploading_voice_note.rb +++ b/lib/tdlib/types/chat_action/uploading_voice_note.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr progress [Integer] Upload progress, as a percentage. class ChatAction::UploadingVoiceNote < ChatAction - attribute :progress, TD::Types::Integer + attribute :progress, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_action_bar/report_add_block.rb b/lib/tdlib/types/chat_action_bar/report_add_block.rb index 1908e996..c2cb436c 100644 --- a/lib/tdlib/types/chat_action_bar/report_add_block.rb +++ b/lib/tdlib/types/chat_action_bar/report_add_block.rb @@ -9,6 +9,6 @@ module TD::Types # is the distance between the users. class ChatActionBar::ReportAddBlock < ChatActionBar attribute :can_unarchive, TD::Types::Bool - attribute :distance, TD::Types::Integer + attribute :distance, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_administrator.rb b/lib/tdlib/types/chat_administrator.rb index 1b6d82ea..6b65a0f6 100644 --- a/lib/tdlib/types/chat_administrator.rb +++ b/lib/tdlib/types/chat_administrator.rb @@ -2,10 +2,10 @@ module TD::Types # Contains information about a chat administrator. # # @attr user_id [Integer] User identifier of the administrator. - # @attr custom_title [String] Custom title of the administrator. + # @attr custom_title [TD::Types::String] Custom title of the administrator. # @attr is_owner [Boolean] True, if the user is the owner of the chat. class ChatAdministrator < Base - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :custom_title, TD::Types::String attribute :is_owner, TD::Types::Bool end diff --git a/lib/tdlib/types/chat_event.rb b/lib/tdlib/types/chat_event.rb index 6d661983..b02f0d7f 100644 --- a/lib/tdlib/types/chat_event.rb +++ b/lib/tdlib/types/chat_event.rb @@ -6,9 +6,9 @@ module TD::Types # @attr user_id [Integer] Identifier of the user who performed the action that triggered the event. # @attr action [TD::Types::ChatEventAction] Action performed by the user. class ChatEvent < Base - attribute :id, TD::Types::Integer - attribute :date, TD::Types::Integer - attribute :user_id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :date, TD::Types::Coercible::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :action, TD::Types::ChatEventAction end end diff --git a/lib/tdlib/types/chat_event_action/description_changed.rb b/lib/tdlib/types/chat_event_action/description_changed.rb index ea9fd32e..04fe6055 100644 --- a/lib/tdlib/types/chat_event_action/description_changed.rb +++ b/lib/tdlib/types/chat_event_action/description_changed.rb @@ -1,8 +1,8 @@ module TD::Types # The chat description was changed. # - # @attr old_description [String] Previous chat description. - # @attr new_description [String] New chat description. + # @attr old_description [TD::Types::String] Previous chat description. + # @attr new_description [TD::Types::String] New chat description. class ChatEventAction::DescriptionChanged < ChatEventAction attribute :old_description, TD::Types::String attribute :new_description, TD::Types::String diff --git a/lib/tdlib/types/chat_event_action/linked_chat_changed.rb b/lib/tdlib/types/chat_event_action/linked_chat_changed.rb index 0c465337..59ce3f88 100644 --- a/lib/tdlib/types/chat_event_action/linked_chat_changed.rb +++ b/lib/tdlib/types/chat_event_action/linked_chat_changed.rb @@ -4,7 +4,7 @@ module TD::Types # @attr old_linked_chat_id [Integer] Previous supergroup linked chat identifier. # @attr new_linked_chat_id [Integer] New supergroup linked chat identifier. class ChatEventAction::LinkedChatChanged < ChatEventAction - attribute :old_linked_chat_id, TD::Types::Integer - attribute :new_linked_chat_id, TD::Types::Integer + attribute :old_linked_chat_id, TD::Types::Coercible::Integer + attribute :new_linked_chat_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_event_action/member_invited.rb b/lib/tdlib/types/chat_event_action/member_invited.rb index cfd395ff..5358e302 100644 --- a/lib/tdlib/types/chat_event_action/member_invited.rb +++ b/lib/tdlib/types/chat_event_action/member_invited.rb @@ -4,7 +4,7 @@ module TD::Types # @attr user_id [Integer] New member user identifier. # @attr status [TD::Types::ChatMemberStatus] New member status. class ChatEventAction::MemberInvited < ChatEventAction - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :status, TD::Types::ChatMemberStatus end end diff --git a/lib/tdlib/types/chat_event_action/member_promoted.rb b/lib/tdlib/types/chat_event_action/member_promoted.rb index 5773d367..6c84fbf3 100644 --- a/lib/tdlib/types/chat_event_action/member_promoted.rb +++ b/lib/tdlib/types/chat_event_action/member_promoted.rb @@ -5,7 +5,7 @@ module TD::Types # @attr old_status [TD::Types::ChatMemberStatus] Previous status of the chat member. # @attr new_status [TD::Types::ChatMemberStatus] New status of the chat member. class ChatEventAction::MemberPromoted < ChatEventAction - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :old_status, TD::Types::ChatMemberStatus attribute :new_status, TD::Types::ChatMemberStatus end diff --git a/lib/tdlib/types/chat_event_action/message_ttl_setting_changed.rb b/lib/tdlib/types/chat_event_action/message_ttl_setting_changed.rb index abf6e87d..fc9e3687 100644 --- a/lib/tdlib/types/chat_event_action/message_ttl_setting_changed.rb +++ b/lib/tdlib/types/chat_event_action/message_ttl_setting_changed.rb @@ -4,7 +4,7 @@ module TD::Types # @attr old_message_ttl_setting [Integer] Previous value of message_ttl_setting. # @attr new_message_ttl_setting [Integer] New value of message_ttl_setting. class ChatEventAction::MessageTtlSettingChanged < ChatEventAction - attribute :old_message_ttl_setting, TD::Types::Integer - attribute :new_message_ttl_setting, TD::Types::Integer + attribute :old_message_ttl_setting, TD::Types::Coercible::Integer + attribute :new_message_ttl_setting, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_event_action/slow_mode_delay_changed.rb b/lib/tdlib/types/chat_event_action/slow_mode_delay_changed.rb index 7a1ed290..929d4f53 100644 --- a/lib/tdlib/types/chat_event_action/slow_mode_delay_changed.rb +++ b/lib/tdlib/types/chat_event_action/slow_mode_delay_changed.rb @@ -4,7 +4,7 @@ module TD::Types # @attr old_slow_mode_delay [Integer] Previous value of slow_mode_delay. # @attr new_slow_mode_delay [Integer] New value of slow_mode_delay. class ChatEventAction::SlowModeDelayChanged < ChatEventAction - attribute :old_slow_mode_delay, TD::Types::Integer - attribute :new_slow_mode_delay, TD::Types::Integer + attribute :old_slow_mode_delay, TD::Types::Coercible::Integer + attribute :new_slow_mode_delay, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_event_action/sticker_set_changed.rb b/lib/tdlib/types/chat_event_action/sticker_set_changed.rb index 328a2f2e..314be711 100644 --- a/lib/tdlib/types/chat_event_action/sticker_set_changed.rb +++ b/lib/tdlib/types/chat_event_action/sticker_set_changed.rb @@ -4,7 +4,7 @@ module TD::Types # @attr old_sticker_set_id [Integer] Previous identifier of the chat sticker set; 0 if none. # @attr new_sticker_set_id [Integer] New identifier of the chat sticker set; 0 if none. class ChatEventAction::StickerSetChanged < ChatEventAction - attribute :old_sticker_set_id, TD::Types::Integer - attribute :new_sticker_set_id, TD::Types::Integer + attribute :old_sticker_set_id, TD::Types::Coercible::Integer + attribute :new_sticker_set_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_event_action/title_changed.rb b/lib/tdlib/types/chat_event_action/title_changed.rb index c9463dc3..c5af72fb 100644 --- a/lib/tdlib/types/chat_event_action/title_changed.rb +++ b/lib/tdlib/types/chat_event_action/title_changed.rb @@ -1,8 +1,8 @@ module TD::Types # The chat title was changed. # - # @attr old_title [String] Previous chat title. - # @attr new_title [String] New chat title. + # @attr old_title [TD::Types::String] Previous chat title. + # @attr new_title [TD::Types::String] New chat title. class ChatEventAction::TitleChanged < ChatEventAction attribute :old_title, TD::Types::String attribute :new_title, TD::Types::String diff --git a/lib/tdlib/types/chat_event_action/username_changed.rb b/lib/tdlib/types/chat_event_action/username_changed.rb index 5618e92a..78a6e1cd 100644 --- a/lib/tdlib/types/chat_event_action/username_changed.rb +++ b/lib/tdlib/types/chat_event_action/username_changed.rb @@ -1,8 +1,8 @@ module TD::Types # The chat username was changed. # - # @attr old_username [String] Previous chat username. - # @attr new_username [String] New chat username. + # @attr old_username [TD::Types::String] Previous chat username. + # @attr new_username [TD::Types::String] New chat username. class ChatEventAction::UsernameChanged < ChatEventAction attribute :old_username, TD::Types::String attribute :new_username, TD::Types::String diff --git a/lib/tdlib/types/chat_event_action/voice_chat_created.rb b/lib/tdlib/types/chat_event_action/voice_chat_created.rb index 6264414f..08562301 100644 --- a/lib/tdlib/types/chat_event_action/voice_chat_created.rb +++ b/lib/tdlib/types/chat_event_action/voice_chat_created.rb @@ -4,6 +4,6 @@ module TD::Types # @attr group_call_id [Integer] Identifier of the voice chat. # The voice chat can be received through the method getGroupCall. class ChatEventAction::VoiceChatCreated < ChatEventAction - attribute :group_call_id, TD::Types::Integer + attribute :group_call_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_event_action/voice_chat_discarded.rb b/lib/tdlib/types/chat_event_action/voice_chat_discarded.rb index ae435f3a..09f35aa7 100644 --- a/lib/tdlib/types/chat_event_action/voice_chat_discarded.rb +++ b/lib/tdlib/types/chat_event_action/voice_chat_discarded.rb @@ -4,6 +4,6 @@ module TD::Types # @attr group_call_id [Integer] Identifier of the voice chat. # The voice chat can be received through the method getGroupCall. class ChatEventAction::VoiceChatDiscarded < ChatEventAction - attribute :group_call_id, TD::Types::Integer + attribute :group_call_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_event_action/voice_chat_participant_volume_level_changed.rb b/lib/tdlib/types/chat_event_action/voice_chat_participant_volume_level_changed.rb index 07b6cfa3..2f27f977 100644 --- a/lib/tdlib/types/chat_event_action/voice_chat_participant_volume_level_changed.rb +++ b/lib/tdlib/types/chat_event_action/voice_chat_participant_volume_level_changed.rb @@ -5,6 +5,6 @@ module TD::Types # @attr volume_level [Integer] New value of volume_level; 1-20000 in hundreds of percents. class ChatEventAction::VoiceChatParticipantVolumeLevelChanged < ChatEventAction attribute :participant_id, TD::Types::MessageSender - attribute :volume_level, TD::Types::Integer + attribute :volume_level, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_filter.rb b/lib/tdlib/types/chat_filter.rb index 9d129096..1822a7ee 100644 --- a/lib/tdlib/types/chat_filter.rb +++ b/lib/tdlib/types/chat_filter.rb @@ -1,8 +1,8 @@ module TD::Types # Represents a filter of user chats. # - # @attr title [String] The title of the filter; 1-12 characters without line feeds. - # @attr icon_name [String, nil] The icon name for short filter representation. + # @attr title [TD::Types::String] The title of the filter; 1-12 characters without line feeds. + # @attr icon_name [TD::Types::String, nil] The icon name for short filter representation. # If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", # "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", # "Travel", "Work". @@ -21,9 +21,9 @@ module TD::Types class ChatFilter < Base attribute :title, TD::Types::String attribute :icon_name, TD::Types::String.optional.default(nil) - attribute :pinned_chat_ids, TD::Types::Array.of(TD::Types::Integer) - attribute :included_chat_ids, TD::Types::Array.of(TD::Types::Integer) - attribute :excluded_chat_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :pinned_chat_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) + attribute :included_chat_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) + attribute :excluded_chat_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) attribute :exclude_muted, TD::Types::Bool attribute :exclude_read, TD::Types::Bool attribute :exclude_archived, TD::Types::Bool diff --git a/lib/tdlib/types/chat_filter_info.rb b/lib/tdlib/types/chat_filter_info.rb index d1ece451..79d163ec 100644 --- a/lib/tdlib/types/chat_filter_info.rb +++ b/lib/tdlib/types/chat_filter_info.rb @@ -2,12 +2,12 @@ module TD::Types # Contains basic information about a chat filter. # # @attr id [Integer] Unique chat filter identifier. - # @attr title [String] The title of the filter; 1-12 characters without line feeds. - # @attr icon_name [String] The icon name for short filter representation. + # @attr title [TD::Types::String] The title of the filter; 1-12 characters without line feeds. + # @attr icon_name [TD::Types::String] The icon name for short filter representation. # One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", # "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work". class ChatFilterInfo < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :title, TD::Types::String attribute :icon_name, TD::Types::String end diff --git a/lib/tdlib/types/chat_invite_link.rb b/lib/tdlib/types/chat_invite_link.rb index 71392639..85261b06 100644 --- a/lib/tdlib/types/chat_invite_link.rb +++ b/lib/tdlib/types/chat_invite_link.rb @@ -1,7 +1,7 @@ module TD::Types # Contains a chat invite link. # - # @attr invite_link [String] Chat invite link. + # @attr invite_link [TD::Types::String] Chat invite link. # @attr creator_user_id [Integer] User identifier of an administrator created the link. # @attr date [Integer] Point in time (Unix timestamp) when the link was created. # @attr edit_date [Integer] Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown. @@ -15,12 +15,12 @@ module TD::Types # @attr is_revoked [Boolean] True, if the link was revoked. class ChatInviteLink < Base attribute :invite_link, TD::Types::String - attribute :creator_user_id, TD::Types::Integer - attribute :date, TD::Types::Integer - attribute :edit_date, TD::Types::Integer - attribute :expire_date, TD::Types::Integer - attribute :member_limit, TD::Types::Integer - attribute :member_count, TD::Types::Integer + attribute :creator_user_id, TD::Types::Coercible::Integer + attribute :date, TD::Types::Coercible::Integer + attribute :edit_date, TD::Types::Coercible::Integer + attribute :expire_date, TD::Types::Coercible::Integer + attribute :member_limit, TD::Types::Coercible::Integer + attribute :member_count, TD::Types::Coercible::Integer attribute :is_primary, TD::Types::Bool attribute :is_revoked, TD::Types::Bool end diff --git a/lib/tdlib/types/chat_invite_link_count.rb b/lib/tdlib/types/chat_invite_link_count.rb index c8ea5c54..46b649c4 100644 --- a/lib/tdlib/types/chat_invite_link_count.rb +++ b/lib/tdlib/types/chat_invite_link_count.rb @@ -5,8 +5,8 @@ module TD::Types # @attr invite_link_count [Integer] Number of active invite links. # @attr revoked_invite_link_count [Integer] Number of revoked invite links. class ChatInviteLinkCount < Base - attribute :user_id, TD::Types::Integer - attribute :invite_link_count, TD::Types::Integer - attribute :revoked_invite_link_count, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer + attribute :invite_link_count, TD::Types::Coercible::Integer + attribute :revoked_invite_link_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_invite_link_info.rb b/lib/tdlib/types/chat_invite_link_info.rb index c0a13964..ce535a84 100644 --- a/lib/tdlib/types/chat_invite_link_info.rb +++ b/lib/tdlib/types/chat_invite_link_info.rb @@ -5,20 +5,20 @@ module TD::Types # @attr accessible_for [Integer] If non-zero, the amount of time for which read access to the chat will remain # available, in seconds. # @attr type [TD::Types::ChatType] Contains information about the type of the chat. - # @attr title [String] Title of the chat. + # @attr title [TD::Types::String] Title of the chat. # @attr photo [TD::Types::ChatPhotoInfo, nil] Chat photo; may be null. # @attr member_count [Integer] Number of members in the chat. # @attr member_user_ids [Array] User identifiers of some chat members that may be known to the current user. # @attr is_public [Boolean] True, if the chat is a public supergroup or channel, i.e. # it has a username or it is a location-based supergroup. class ChatInviteLinkInfo < Base - attribute :chat_id, TD::Types::Integer - attribute :accessible_for, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :accessible_for, TD::Types::Coercible::Integer attribute :type, TD::Types::ChatType attribute :title, TD::Types::String attribute :photo, TD::Types::ChatPhotoInfo.optional.default(nil) - attribute :member_count, TD::Types::Integer - attribute :member_user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :member_count, TD::Types::Coercible::Integer + attribute :member_user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) attribute :is_public, TD::Types::Bool end end diff --git a/lib/tdlib/types/chat_invite_link_member.rb b/lib/tdlib/types/chat_invite_link_member.rb index f74ebea7..d79dd0aa 100644 --- a/lib/tdlib/types/chat_invite_link_member.rb +++ b/lib/tdlib/types/chat_invite_link_member.rb @@ -4,7 +4,7 @@ module TD::Types # @attr user_id [Integer] User identifier. # @attr joined_chat_date [Integer] Point in time (Unix timestamp) when the user joined the chat. class ChatInviteLinkMember < Base - attribute :user_id, TD::Types::Integer - attribute :joined_chat_date, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer + attribute :joined_chat_date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_invite_link_members.rb b/lib/tdlib/types/chat_invite_link_members.rb index 863ba152..a3b875f2 100644 --- a/lib/tdlib/types/chat_invite_link_members.rb +++ b/lib/tdlib/types/chat_invite_link_members.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total count of chat members found. # @attr members [Array] List of chat members, joined a chat by an invite link. class ChatInviteLinkMembers < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :members, TD::Types::Array.of(TD::Types::ChatInviteLinkMember) end end diff --git a/lib/tdlib/types/chat_invite_links.rb b/lib/tdlib/types/chat_invite_links.rb index 98eecce1..406f5c79 100644 --- a/lib/tdlib/types/chat_invite_links.rb +++ b/lib/tdlib/types/chat_invite_links.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total count of chat invite links found. # @attr invite_links [Array] List of invite links. class ChatInviteLinks < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :invite_links, TD::Types::Array.of(TD::Types::ChatInviteLink) end end diff --git a/lib/tdlib/types/chat_list/filter.rb b/lib/tdlib/types/chat_list/filter.rb index beedc2cc..42e6434d 100644 --- a/lib/tdlib/types/chat_list/filter.rb +++ b/lib/tdlib/types/chat_list/filter.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr chat_filter_id [Integer] Chat filter identifier. class ChatList::Filter < ChatList - attribute :chat_filter_id, TD::Types::Integer + attribute :chat_filter_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_location.rb b/lib/tdlib/types/chat_location.rb index 0623c9d7..59c38838 100644 --- a/lib/tdlib/types/chat_location.rb +++ b/lib/tdlib/types/chat_location.rb @@ -2,7 +2,7 @@ module TD::Types # Represents a location to which a chat is connected. # # @attr location [TD::Types::Location] The location. - # @attr address [String] Location address; 1-64 characters, as defined by the chat owner. + # @attr address [TD::Types::String] Location address; 1-64 characters, as defined by the chat owner. class ChatLocation < Base attribute :location, TD::Types::Location attribute :address, TD::Types::String diff --git a/lib/tdlib/types/chat_member.rb b/lib/tdlib/types/chat_member.rb index 55cb8753..cd39b315 100644 --- a/lib/tdlib/types/chat_member.rb +++ b/lib/tdlib/types/chat_member.rb @@ -13,8 +13,8 @@ module TD::Types # Can be null even for a bot if the bot is not the chat member. class ChatMember < Base attribute :member_id, TD::Types::MessageSender - attribute :inviter_user_id, TD::Types::Integer - attribute :joined_chat_date, TD::Types::Integer + attribute :inviter_user_id, TD::Types::Coercible::Integer + attribute :joined_chat_date, TD::Types::Coercible::Integer attribute :status, TD::Types::ChatMemberStatus attribute :bot_info, TD::Types::BotInfo.optional.default(nil) end diff --git a/lib/tdlib/types/chat_member_status/administrator.rb b/lib/tdlib/types/chat_member_status/administrator.rb index 77afbb19..f3ec8b7e 100644 --- a/lib/tdlib/types/chat_member_status/administrator.rb +++ b/lib/tdlib/types/chat_member_status/administrator.rb @@ -4,8 +4,8 @@ module TD::Types # members, and manage voice chats. # In supergroups and channels, there are more detailed options for administrator privileges. # - # @attr custom_title [String] A custom title of the administrator; 0-16 characters without emojis; applicable to - # supergroups only. + # @attr custom_title [TD::Types::String] A custom title of the administrator; 0-16 characters without emojis; + # applicable to supergroups only. # @attr can_be_edited [Boolean] True, if the current user can edit the administrator privileges for the called user. # @attr can_manage_chat [Boolean] True, if the administrator can get chat event log, get chat statistics, get message # statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. diff --git a/lib/tdlib/types/chat_member_status/banned.rb b/lib/tdlib/types/chat_member_status/banned.rb index b4aa43c2..ce0f6990 100644 --- a/lib/tdlib/types/chat_member_status/banned.rb +++ b/lib/tdlib/types/chat_member_status/banned.rb @@ -8,6 +8,6 @@ module TD::Types # considered to be banned forever. # Always 0 in basic groups. class ChatMemberStatus::Banned < ChatMemberStatus - attribute :banned_until_date, TD::Types::Integer + attribute :banned_until_date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_member_status/creator.rb b/lib/tdlib/types/chat_member_status/creator.rb index fe99b476..c6e55247 100644 --- a/lib/tdlib/types/chat_member_status/creator.rb +++ b/lib/tdlib/types/chat_member_status/creator.rb @@ -1,8 +1,8 @@ module TD::Types # The user is the owner of a chat and has all the administrator privileges. # - # @attr custom_title [String] A custom title of the owner; 0-16 characters without emojis; applicable to supergroups - # only. + # @attr custom_title [TD::Types::String] A custom title of the owner; 0-16 characters without emojis; applicable to + # supergroups only. # @attr is_anonymous [Boolean] True, if the creator isn't shown in the chat member list and sends messages # anonymously; applicable to supergroups only. # @attr is_member [Boolean] True, if the user is a member of the chat. diff --git a/lib/tdlib/types/chat_member_status/restricted.rb b/lib/tdlib/types/chat_member_status/restricted.rb index c8c4a920..364891e6 100644 --- a/lib/tdlib/types/chat_member_status/restricted.rb +++ b/lib/tdlib/types/chat_member_status/restricted.rb @@ -10,7 +10,7 @@ module TD::Types # @attr permissions [TD::Types::ChatPermissions] User permissions in the chat. class ChatMemberStatus::Restricted < ChatMemberStatus attribute :is_member, TD::Types::Bool - attribute :restricted_until_date, TD::Types::Integer + attribute :restricted_until_date, TD::Types::Coercible::Integer attribute :permissions, TD::Types::ChatPermissions end end diff --git a/lib/tdlib/types/chat_members.rb b/lib/tdlib/types/chat_members.rb index 3d56da13..3726ec6f 100644 --- a/lib/tdlib/types/chat_members.rb +++ b/lib/tdlib/types/chat_members.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total count of chat members found. # @attr members [Array] A list of chat members. class ChatMembers < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :members, TD::Types::Array.of(TD::Types::ChatMember) end end diff --git a/lib/tdlib/types/chat_members_filter/mention.rb b/lib/tdlib/types/chat_members_filter/mention.rb index c1d7c4e8..c66eaf12 100644 --- a/lib/tdlib/types/chat_members_filter/mention.rb +++ b/lib/tdlib/types/chat_members_filter/mention.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr message_thread_id [Integer] If non-zero, the identifier of the current message thread. class ChatMembersFilter::Mention < ChatMembersFilter - attribute :message_thread_id, TD::Types::Integer + attribute :message_thread_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_nearby.rb b/lib/tdlib/types/chat_nearby.rb index 83619ca2..6540eb56 100644 --- a/lib/tdlib/types/chat_nearby.rb +++ b/lib/tdlib/types/chat_nearby.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr distance [Integer] Distance to the chat location, in meters. class ChatNearby < Base - attribute :chat_id, TD::Types::Integer - attribute :distance, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :distance, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_notification_settings.rb b/lib/tdlib/types/chat_notification_settings.rb index 10b9a09a..13162562 100644 --- a/lib/tdlib/types/chat_notification_settings.rb +++ b/lib/tdlib/types/chat_notification_settings.rb @@ -6,7 +6,7 @@ module TD::Types # @attr mute_for [Integer] Time left before notifications will be unmuted, in seconds. # @attr use_default_sound [Boolean] If true, sound is ignored and the value for the relevant type of chat is used # instead. - # @attr sound [String] The name of an audio file to be used for notification sounds; only applies to iOS + # @attr sound [TD::Types::String] The name of an audio file to be used for notification sounds; only applies to iOS # applications. # @attr use_default_show_preview [Boolean] If true, show_preview is ignored and the value for the relevant type of # chat is used instead. @@ -21,7 +21,7 @@ module TD::Types # for an ordinary unread message. class ChatNotificationSettings < Base attribute :use_default_mute_for, TD::Types::Bool - attribute :mute_for, TD::Types::Integer + attribute :mute_for, TD::Types::Coercible::Integer attribute :use_default_sound, TD::Types::Bool attribute :sound, TD::Types::String attribute :use_default_show_preview, TD::Types::Bool diff --git a/lib/tdlib/types/chat_photo.rb b/lib/tdlib/types/chat_photo.rb index 6138a35d..80fa09ea 100644 --- a/lib/tdlib/types/chat_photo.rb +++ b/lib/tdlib/types/chat_photo.rb @@ -7,8 +7,8 @@ module TD::Types # @attr sizes [Array] Available variants of the photo in JPEG format, in different size. # @attr animation [TD::Types::AnimatedChatPhoto, nil] Animated variant of the photo in MPEG4 format; may be null. class ChatPhoto < Base - attribute :id, TD::Types::Integer - attribute :added_date, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :added_date, TD::Types::Coercible::Integer attribute :minithumbnail, TD::Types::Minithumbnail.optional.default(nil) attribute :sizes, TD::Types::Array.of(TD::Types::PhotoSize) attribute :animation, TD::Types::AnimatedChatPhoto.optional.default(nil) diff --git a/lib/tdlib/types/chat_photos.rb b/lib/tdlib/types/chat_photos.rb index 4a5f6ae1..f608ee47 100644 --- a/lib/tdlib/types/chat_photos.rb +++ b/lib/tdlib/types/chat_photos.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Total number of photos. # @attr photos [Array] List of photos. class ChatPhotos < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :photos, TD::Types::Array.of(TD::Types::ChatPhoto) end end diff --git a/lib/tdlib/types/chat_position.rb b/lib/tdlib/types/chat_position.rb index 5b2b3699..16f68b07 100644 --- a/lib/tdlib/types/chat_position.rb +++ b/lib/tdlib/types/chat_position.rb @@ -8,7 +8,7 @@ module TD::Types # @attr source [TD::Types::ChatSource, nil] Source of the chat in the chat list; may be null. class ChatPosition < Base attribute :list, TD::Types::ChatList - attribute :order, TD::Types::Integer + attribute :order, TD::Types::Coercible::Integer attribute :is_pinned, TD::Types::Bool attribute :source, TD::Types::ChatSource.optional.default(nil) end diff --git a/lib/tdlib/types/chat_source/public_service_announcement.rb b/lib/tdlib/types/chat_source/public_service_announcement.rb index 27a8978e..76366a74 100644 --- a/lib/tdlib/types/chat_source/public_service_announcement.rb +++ b/lib/tdlib/types/chat_source/public_service_announcement.rb @@ -1,8 +1,8 @@ module TD::Types # The chat contains a public service announcement. # - # @attr type [String] The type of the announcement. - # @attr text [String] The text of the announcement. + # @attr type [TD::Types::String] The type of the announcement. + # @attr text [TD::Types::String] The text of the announcement. class ChatSource::PublicServiceAnnouncement < ChatSource attribute :type, TD::Types::String attribute :text, TD::Types::String diff --git a/lib/tdlib/types/chat_statistics/channel.rb b/lib/tdlib/types/chat_statistics/channel.rb index c8a8971c..71089020 100644 --- a/lib/tdlib/types/chat_statistics/channel.rb +++ b/lib/tdlib/types/chat_statistics/channel.rb @@ -27,7 +27,7 @@ class ChatStatistics::Channel < ChatStatistics attribute :member_count, TD::Types::StatisticalValue attribute :mean_view_count, TD::Types::StatisticalValue attribute :mean_share_count, TD::Types::StatisticalValue - attribute :enabled_notifications_percentage, TD::Types::Float + attribute :enabled_notifications_percentage, TD::Types::Coercible::Float attribute :member_count_graph, TD::Types::StatisticalGraph attribute :join_graph, TD::Types::StatisticalGraph attribute :mute_graph, TD::Types::StatisticalGraph diff --git a/lib/tdlib/types/chat_statistics_administrator_actions_info.rb b/lib/tdlib/types/chat_statistics_administrator_actions_info.rb index 549c655f..fa4d0aea 100644 --- a/lib/tdlib/types/chat_statistics_administrator_actions_info.rb +++ b/lib/tdlib/types/chat_statistics_administrator_actions_info.rb @@ -6,9 +6,9 @@ module TD::Types # @attr banned_user_count [Integer] Number of users banned by the administrator. # @attr restricted_user_count [Integer] Number of users restricted by the administrator. class ChatStatisticsAdministratorActionsInfo < Base - attribute :user_id, TD::Types::Integer - attribute :deleted_message_count, TD::Types::Integer - attribute :banned_user_count, TD::Types::Integer - attribute :restricted_user_count, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer + attribute :deleted_message_count, TD::Types::Coercible::Integer + attribute :banned_user_count, TD::Types::Coercible::Integer + attribute :restricted_user_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_statistics_inviter_info.rb b/lib/tdlib/types/chat_statistics_inviter_info.rb index b72ce5a6..79409e0a 100644 --- a/lib/tdlib/types/chat_statistics_inviter_info.rb +++ b/lib/tdlib/types/chat_statistics_inviter_info.rb @@ -4,7 +4,7 @@ module TD::Types # @attr user_id [Integer] User identifier. # @attr added_member_count [Integer] Number of new members invited by the user. class ChatStatisticsInviterInfo < Base - attribute :user_id, TD::Types::Integer - attribute :added_member_count, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer + attribute :added_member_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_statistics_message_interaction_info.rb b/lib/tdlib/types/chat_statistics_message_interaction_info.rb index a82e48ee..323be7e7 100644 --- a/lib/tdlib/types/chat_statistics_message_interaction_info.rb +++ b/lib/tdlib/types/chat_statistics_message_interaction_info.rb @@ -5,8 +5,8 @@ module TD::Types # @attr view_count [Integer] Number of times the message was viewed. # @attr forward_count [Integer] Number of times the message was forwarded. class ChatStatisticsMessageInteractionInfo < Base - attribute :message_id, TD::Types::Integer - attribute :view_count, TD::Types::Integer - attribute :forward_count, TD::Types::Integer + attribute :message_id, TD::Types::Coercible::Integer + attribute :view_count, TD::Types::Coercible::Integer + attribute :forward_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_statistics_message_sender_info.rb b/lib/tdlib/types/chat_statistics_message_sender_info.rb index c4803e63..41d6c450 100644 --- a/lib/tdlib/types/chat_statistics_message_sender_info.rb +++ b/lib/tdlib/types/chat_statistics_message_sender_info.rb @@ -5,8 +5,8 @@ module TD::Types # @attr sent_message_count [Integer] Number of sent messages. # @attr average_character_count [Integer] Average number of characters in sent messages. class ChatStatisticsMessageSenderInfo < Base - attribute :user_id, TD::Types::Integer - attribute :sent_message_count, TD::Types::Integer - attribute :average_character_count, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer + attribute :sent_message_count, TD::Types::Coercible::Integer + attribute :average_character_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_type/basic_group.rb b/lib/tdlib/types/chat_type/basic_group.rb index 2cb4aef6..dccf043e 100644 --- a/lib/tdlib/types/chat_type/basic_group.rb +++ b/lib/tdlib/types/chat_type/basic_group.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr basic_group_id [Integer] Basic group identifier. class ChatType::BasicGroup < ChatType - attribute :basic_group_id, TD::Types::Integer + attribute :basic_group_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_type/private.rb b/lib/tdlib/types/chat_type/private.rb index ad1d05d2..a88984b7 100644 --- a/lib/tdlib/types/chat_type/private.rb +++ b/lib/tdlib/types/chat_type/private.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr user_id [Integer] User identifier. class ChatType::Private < ChatType - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_type/secret.rb b/lib/tdlib/types/chat_type/secret.rb index b6f3cedc..735bf4f0 100644 --- a/lib/tdlib/types/chat_type/secret.rb +++ b/lib/tdlib/types/chat_type/secret.rb @@ -4,7 +4,7 @@ module TD::Types # @attr secret_chat_id [Integer] Secret chat identifier. # @attr user_id [Integer] User identifier of the secret chat peer. class ChatType::Secret < ChatType - attribute :secret_chat_id, TD::Types::Integer - attribute :user_id, TD::Types::Integer + attribute :secret_chat_id, TD::Types::Coercible::Integer + attribute :user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/chat_type/supergroup.rb b/lib/tdlib/types/chat_type/supergroup.rb index 9850753b..825ad4a7 100644 --- a/lib/tdlib/types/chat_type/supergroup.rb +++ b/lib/tdlib/types/chat_type/supergroup.rb @@ -5,7 +5,7 @@ module TD::Types # @attr supergroup_id [Integer] Supergroup or channel identifier. # @attr is_channel [Boolean] True, if the supergroup is a channel. class ChatType::Supergroup < ChatType - attribute :supergroup_id, TD::Types::Integer + attribute :supergroup_id, TD::Types::Coercible::Integer attribute :is_channel, TD::Types::Bool end end diff --git a/lib/tdlib/types/chats.rb b/lib/tdlib/types/chats.rb index 5c42994e..df30c447 100644 --- a/lib/tdlib/types/chats.rb +++ b/lib/tdlib/types/chats.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total count of chats found. # @attr chat_ids [Array] List of chat identifiers. class Chats < Base - attribute :total_count, TD::Types::Integer - attribute :chat_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :total_count, TD::Types::Coercible::Integer + attribute :chat_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/connected_website.rb b/lib/tdlib/types/connected_website.rb index 3f4b4d88..6a1fd88b 100644 --- a/lib/tdlib/types/connected_website.rb +++ b/lib/tdlib/types/connected_website.rb @@ -2,23 +2,23 @@ module TD::Types # Contains information about one website the current user is logged in with Telegram. # # @attr id [Integer] Website identifier. - # @attr domain_name [String] The domain name of the website. + # @attr domain_name [TD::Types::String] The domain name of the website. # @attr bot_user_id [Integer] User identifier of a bot linked with the website. - # @attr browser [String] The version of a browser used to log in. - # @attr platform [String] Operating system the browser is running on. + # @attr browser [TD::Types::String] The version of a browser used to log in. + # @attr platform [TD::Types::String] Operating system the browser is running on. # @attr log_in_date [Integer] Point in time (Unix timestamp) when the user was logged in. # @attr last_active_date [Integer] Point in time (Unix timestamp) when obtained authorization was last used. - # @attr ip [String] IP address from which the user was logged in, in human-readable format. - # @attr location [String] Human-readable description of a country and a region, from which the user was logged in, - # based on the IP address. + # @attr ip [TD::Types::String] IP address from which the user was logged in, in human-readable format. + # @attr location [TD::Types::String] Human-readable description of a country and a region, from which the user was + # logged in, based on the IP address. class ConnectedWebsite < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :domain_name, TD::Types::String - attribute :bot_user_id, TD::Types::Integer + attribute :bot_user_id, TD::Types::Coercible::Integer attribute :browser, TD::Types::String attribute :platform, TD::Types::String - attribute :log_in_date, TD::Types::Integer - attribute :last_active_date, TD::Types::Integer + attribute :log_in_date, TD::Types::Coercible::Integer + attribute :last_active_date, TD::Types::Coercible::Integer attribute :ip, TD::Types::String attribute :location, TD::Types::String end diff --git a/lib/tdlib/types/contact.rb b/lib/tdlib/types/contact.rb index f9931e0a..01f25662 100644 --- a/lib/tdlib/types/contact.rb +++ b/lib/tdlib/types/contact.rb @@ -1,16 +1,16 @@ module TD::Types # Describes a user contact. # - # @attr phone_number [String] Phone number of the user. - # @attr first_name [String] First name of the user; 1-255 characters in length. - # @attr last_name [String] Last name of the user. - # @attr vcard [String] Additional data about the user in a form of vCard; 0-2048 bytes in length. + # @attr phone_number [TD::Types::String] Phone number of the user. + # @attr first_name [TD::Types::String] First name of the user; 1-255 characters in length. + # @attr last_name [TD::Types::String] Last name of the user. + # @attr vcard [TD::Types::String] Additional data about the user in a form of vCard; 0-2048 bytes in length. # @attr user_id [Integer] Identifier of the user, if known; otherwise 0. class Contact < Base attribute :phone_number, TD::Types::String attribute :first_name, TD::Types::String attribute :last_name, TD::Types::String attribute :vcard, TD::Types::String - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/count.rb b/lib/tdlib/types/count.rb index f2a383b1..ebf36cda 100644 --- a/lib/tdlib/types/count.rb +++ b/lib/tdlib/types/count.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr count [Integer] Count. class Count < Base - attribute :count, TD::Types::Integer + attribute :count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/country_info.rb b/lib/tdlib/types/country_info.rb index 1c2367e4..f3155619 100644 --- a/lib/tdlib/types/country_info.rb +++ b/lib/tdlib/types/country_info.rb @@ -1,11 +1,11 @@ module TD::Types # Contains information about a country. # - # @attr country_code [String] A two-letter ISO 3166-1 alpha-2 country code. - # @attr name [String] Native name of the country. - # @attr english_name [String] English name of the country. + # @attr country_code [TD::Types::String] A two-letter ISO 3166-1 alpha-2 country code. + # @attr name [TD::Types::String] Native name of the country. + # @attr english_name [TD::Types::String] English name of the country. # @attr is_hidden [Boolean] True, if the country should be hidden from the list of all countries. - # @attr calling_codes [Array] List of country calling codes. + # @attr calling_codes [Array] List of country calling codes. class CountryInfo < Base attribute :country_code, TD::Types::String attribute :name, TD::Types::String diff --git a/lib/tdlib/types/custom_request_result.rb b/lib/tdlib/types/custom_request_result.rb index da77b243..02b1190a 100644 --- a/lib/tdlib/types/custom_request_result.rb +++ b/lib/tdlib/types/custom_request_result.rb @@ -1,7 +1,7 @@ module TD::Types # Contains the result of a custom request. # - # @attr result [String] A JSON-serialized result. + # @attr result [TD::Types::String] A JSON-serialized result. class CustomRequestResult < Base attribute :result, TD::Types::String end diff --git a/lib/tdlib/types/database_statistics.rb b/lib/tdlib/types/database_statistics.rb index db028abd..c394e5ce 100644 --- a/lib/tdlib/types/database_statistics.rb +++ b/lib/tdlib/types/database_statistics.rb @@ -1,7 +1,7 @@ module TD::Types # Contains database statistics. # - # @attr statistics [String] Database statistics in an unspecified human-readable format. + # @attr statistics [TD::Types::String] Database statistics in an unspecified human-readable format. class DatabaseStatistics < Base attribute :statistics, TD::Types::String end diff --git a/lib/tdlib/types/date.rb b/lib/tdlib/types/date.rb index c812828c..4038fede 100644 --- a/lib/tdlib/types/date.rb +++ b/lib/tdlib/types/date.rb @@ -5,8 +5,8 @@ module TD::Types # @attr month [Integer] Month; 1-12. # @attr year [Integer] Year; 1-9999. class Date < Base - attribute :day, TD::Types::Integer - attribute :month, TD::Types::Integer - attribute :year, TD::Types::Integer + attribute :day, TD::Types::Coercible::Integer + attribute :month, TD::Types::Coercible::Integer + attribute :year, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/date_range.rb b/lib/tdlib/types/date_range.rb index f1c38a4a..d366db75 100644 --- a/lib/tdlib/types/date_range.rb +++ b/lib/tdlib/types/date_range.rb @@ -4,7 +4,7 @@ module TD::Types # @attr start_date [Integer] Point in time (Unix timestamp) at which the date range begins. # @attr end_date [Integer] Point in time (Unix timestamp) at which the date range ends. class DateRange < Base - attribute :start_date, TD::Types::Integer - attribute :end_date, TD::Types::Integer + attribute :start_date, TD::Types::Coercible::Integer + attribute :end_date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/dated_file.rb b/lib/tdlib/types/dated_file.rb index cab77268..6635c253 100644 --- a/lib/tdlib/types/dated_file.rb +++ b/lib/tdlib/types/dated_file.rb @@ -5,6 +5,6 @@ module TD::Types # @attr date [Integer] Point in time (Unix timestamp) when the file was uploaded. class DatedFile < Base attribute :file, TD::Types::File - attribute :date, TD::Types::Integer + attribute :date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/device_token/apple_push.rb b/lib/tdlib/types/device_token/apple_push.rb index e8cfe5a8..c95c17c7 100644 --- a/lib/tdlib/types/device_token/apple_push.rb +++ b/lib/tdlib/types/device_token/apple_push.rb @@ -1,7 +1,7 @@ module TD::Types # A token for Apple Push Notification service. # - # @attr device_token [String, nil] Device token; may be empty to de-register a device. + # @attr device_token [TD::Types::String, nil] Device token; may be empty to de-register a device. # @attr is_app_sandbox [Boolean] True, if App Sandbox is enabled. class DeviceToken::ApplePush < DeviceToken attribute :device_token, TD::Types::String.optional.default(nil) diff --git a/lib/tdlib/types/device_token/apple_push_vo_ip.rb b/lib/tdlib/types/device_token/apple_push_vo_ip.rb index 6f26d8f6..87160ad6 100644 --- a/lib/tdlib/types/device_token/apple_push_vo_ip.rb +++ b/lib/tdlib/types/device_token/apple_push_vo_ip.rb @@ -1,7 +1,7 @@ module TD::Types # A token for Apple Push Notification service VoIP notifications. # - # @attr device_token [String, nil] Device token; may be empty to de-register a device. + # @attr device_token [TD::Types::String, nil] Device token; may be empty to de-register a device. # @attr is_app_sandbox [Boolean] True, if App Sandbox is enabled. # @attr encrypt [Boolean] True, if push notifications should be additionally encrypted. class DeviceToken::ApplePushVoIP < DeviceToken diff --git a/lib/tdlib/types/device_token/black_berry_push.rb b/lib/tdlib/types/device_token/black_berry_push.rb index 36bd80ff..6b405513 100644 --- a/lib/tdlib/types/device_token/black_berry_push.rb +++ b/lib/tdlib/types/device_token/black_berry_push.rb @@ -1,7 +1,7 @@ module TD::Types # A token for BlackBerry Push Service. # - # @attr token [String, nil] Token; may be empty to de-register a device. + # @attr token [TD::Types::String, nil] Token; may be empty to de-register a device. class DeviceToken::BlackBerryPush < DeviceToken attribute :token, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/device_token/firebase_cloud_messaging.rb b/lib/tdlib/types/device_token/firebase_cloud_messaging.rb index f7f32bab..0749e987 100644 --- a/lib/tdlib/types/device_token/firebase_cloud_messaging.rb +++ b/lib/tdlib/types/device_token/firebase_cloud_messaging.rb @@ -1,7 +1,7 @@ module TD::Types # A token for Firebase Cloud Messaging. # - # @attr token [String, nil] Device registration token; may be empty to de-register a device. + # @attr token [TD::Types::String, nil] Device registration token; may be empty to de-register a device. # @attr encrypt [Boolean] True, if push notifications should be additionally encrypted. class DeviceToken::FirebaseCloudMessaging < DeviceToken attribute :token, TD::Types::String.optional.default(nil) diff --git a/lib/tdlib/types/device_token/microsoft_push.rb b/lib/tdlib/types/device_token/microsoft_push.rb index 118a771f..a5395d81 100644 --- a/lib/tdlib/types/device_token/microsoft_push.rb +++ b/lib/tdlib/types/device_token/microsoft_push.rb @@ -1,7 +1,7 @@ module TD::Types # A token for Microsoft Push Notification Service. # - # @attr channel_uri [String, nil] Push notification channel URI; may be empty to de-register a device. + # @attr channel_uri [TD::Types::String, nil] Push notification channel URI; may be empty to de-register a device. class DeviceToken::MicrosoftPush < DeviceToken attribute :channel_uri, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/device_token/microsoft_push_vo_ip.rb b/lib/tdlib/types/device_token/microsoft_push_vo_ip.rb index 3f4c4960..99798dbb 100644 --- a/lib/tdlib/types/device_token/microsoft_push_vo_ip.rb +++ b/lib/tdlib/types/device_token/microsoft_push_vo_ip.rb @@ -1,7 +1,7 @@ module TD::Types # A token for Microsoft Push Notification Service VoIP channel. # - # @attr channel_uri [String, nil] Push notification channel URI; may be empty to de-register a device. + # @attr channel_uri [TD::Types::String, nil] Push notification channel URI; may be empty to de-register a device. class DeviceToken::MicrosoftPushVoIP < DeviceToken attribute :channel_uri, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/device_token/simple_push.rb b/lib/tdlib/types/device_token/simple_push.rb index fce65bfc..f5d52242 100644 --- a/lib/tdlib/types/device_token/simple_push.rb +++ b/lib/tdlib/types/device_token/simple_push.rb @@ -1,8 +1,8 @@ module TD::Types # A token for Simple Push API for Firefox OS. # - # @attr endpoint [String, nil] Absolute URL exposed by the push service where the application server can send push - # messages; may be empty to de-register a device. + # @attr endpoint [TD::Types::String, nil] Absolute URL exposed by the push service where the application server can + # send push messages; may be empty to de-register a device. class DeviceToken::SimplePush < DeviceToken attribute :endpoint, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/device_token/tizen_push.rb b/lib/tdlib/types/device_token/tizen_push.rb index 6746bec4..55556a58 100644 --- a/lib/tdlib/types/device_token/tizen_push.rb +++ b/lib/tdlib/types/device_token/tizen_push.rb @@ -1,7 +1,7 @@ module TD::Types # A token for Tizen Push Service. # - # @attr reg_id [String, nil] Push service registration identifier; may be empty to de-register a device. + # @attr reg_id [TD::Types::String, nil] Push service registration identifier; may be empty to de-register a device. class DeviceToken::TizenPush < DeviceToken attribute :reg_id, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/device_token/ubuntu_push.rb b/lib/tdlib/types/device_token/ubuntu_push.rb index a17cc16e..77080746 100644 --- a/lib/tdlib/types/device_token/ubuntu_push.rb +++ b/lib/tdlib/types/device_token/ubuntu_push.rb @@ -1,7 +1,7 @@ module TD::Types # A token for Ubuntu Push Client service. # - # @attr token [String, nil] Token; may be empty to de-register a device. + # @attr token [TD::Types::String, nil] Token; may be empty to de-register a device. class DeviceToken::UbuntuPush < DeviceToken attribute :token, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/device_token/web_push.rb b/lib/tdlib/types/device_token/web_push.rb index 5c2888ed..c0d5c1af 100644 --- a/lib/tdlib/types/device_token/web_push.rb +++ b/lib/tdlib/types/device_token/web_push.rb @@ -1,10 +1,10 @@ module TD::Types # A token for web Push API. # - # @attr endpoint [String, nil] Absolute URL exposed by the push service where the application server can send push - # messages; may be empty to de-register a device. - # @attr p256dh_base64url [String] Base64url-encoded P-256 elliptic curve Diffie-Hellman public key. - # @attr auth_base64url [String] Base64url-encoded authentication secret. + # @attr endpoint [TD::Types::String, nil] Absolute URL exposed by the push service where the application server can + # send push messages; may be empty to de-register a device. + # @attr p256dh_base64url [TD::Types::String] Base64url-encoded P-256 elliptic curve Diffie-Hellman public key. + # @attr auth_base64url [TD::Types::String] Base64url-encoded authentication secret. class DeviceToken::WebPush < DeviceToken attribute :endpoint, TD::Types::String.optional.default(nil) attribute :p256dh_base64url, TD::Types::String diff --git a/lib/tdlib/types/device_token/windows_push.rb b/lib/tdlib/types/device_token/windows_push.rb index 8e285f9a..132a2e55 100644 --- a/lib/tdlib/types/device_token/windows_push.rb +++ b/lib/tdlib/types/device_token/windows_push.rb @@ -1,8 +1,8 @@ module TD::Types # A token for Windows Push Notification Services. # - # @attr access_token [String, nil] The access token that will be used to send notifications; may be empty to - # de-register a device. + # @attr access_token [TD::Types::String, nil] The access token that will be used to send notifications; may be empty + # to de-register a device. class DeviceToken::WindowsPush < DeviceToken attribute :access_token, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/document.rb b/lib/tdlib/types/document.rb index ebcf4e39..b7ff492b 100644 --- a/lib/tdlib/types/document.rb +++ b/lib/tdlib/types/document.rb @@ -1,8 +1,8 @@ module TD::Types # Describes a document of any type. # - # @attr file_name [String] Original name of the file; as defined by the sender. - # @attr mime_type [String] MIME type of the file; as defined by the sender. + # @attr file_name [TD::Types::String] Original name of the file; as defined by the sender. + # @attr mime_type [TD::Types::String] MIME type of the file; as defined by the sender. # @attr minithumbnail [TD::Types::Minithumbnail, nil] Document minithumbnail; may be null. # @attr thumbnail [TD::Types::Thumbnail, nil] Document thumbnail in JPEG or PNG format (PNG will be used only for # background patterns); as defined by the sender; may be null. diff --git a/lib/tdlib/types/draft_message.rb b/lib/tdlib/types/draft_message.rb index f2d70a8d..cb441eea 100644 --- a/lib/tdlib/types/draft_message.rb +++ b/lib/tdlib/types/draft_message.rb @@ -6,8 +6,8 @@ module TD::Types # @attr input_message_text [TD::Types::InputMessageContent] Content of the message draft; this should always be of # type inputMessageText. class DraftMessage < Base - attribute :reply_to_message_id, TD::Types::Integer - attribute :date, TD::Types::Integer + attribute :reply_to_message_id, TD::Types::Coercible::Integer + attribute :date, TD::Types::Coercible::Integer attribute :input_message_text, TD::Types::InputMessageContent end end diff --git a/lib/tdlib/types/email_address_authentication_code_info.rb b/lib/tdlib/types/email_address_authentication_code_info.rb index c3a14b25..c27bf5c6 100644 --- a/lib/tdlib/types/email_address_authentication_code_info.rb +++ b/lib/tdlib/types/email_address_authentication_code_info.rb @@ -1,10 +1,11 @@ module TD::Types # Information about the email address authentication code that was sent. # - # @attr email_address_pattern [String] Pattern of the email address to which an authentication code was sent. + # @attr email_address_pattern [TD::Types::String] Pattern of the email address to which an authentication code was + # sent. # @attr length [Integer] Length of the code; 0 if unknown. class EmailAddressAuthenticationCodeInfo < Base attribute :email_address_pattern, TD::Types::String - attribute :length, TD::Types::Integer + attribute :length, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/emojis.rb b/lib/tdlib/types/emojis.rb index 2a976002..b5fc874f 100644 --- a/lib/tdlib/types/emojis.rb +++ b/lib/tdlib/types/emojis.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a list of emoji. # - # @attr emojis [Array] List of emojis. + # @attr emojis [Array] List of emojis. class Emojis < Base attribute :emojis, TD::Types::Array.of(TD::Types::String) end diff --git a/lib/tdlib/types/encrypted_credentials.rb b/lib/tdlib/types/encrypted_credentials.rb index e52df011..a7f93354 100644 --- a/lib/tdlib/types/encrypted_credentials.rb +++ b/lib/tdlib/types/encrypted_credentials.rb @@ -5,8 +5,8 @@ module TD::Types # @attr hash [String] The decrypted data hash. # @attr secret [String] Secret for data decryption, encrypted with the service's public key. class EncryptedCredentials < Base - attribute :data, TD::Types::String - attribute :hash, TD::Types::String - attribute :secret, TD::Types::String + attribute :data, TD::Types::Coercible::String + attribute :hash, TD::Types::Coercible::String + attribute :secret, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/encrypted_passport_element.rb b/lib/tdlib/types/encrypted_passport_element.rb index 4df05452..69f76b7c 100644 --- a/lib/tdlib/types/encrypted_passport_element.rb +++ b/lib/tdlib/types/encrypted_passport_element.rb @@ -9,11 +9,11 @@ module TD::Types # @attr translation [Array] List of files containing a certified English translation of the # document. # @attr files [Array] List of attached files. - # @attr value [String] Unencrypted data, phone number or email address. - # @attr hash [String] Hash of the entire element. + # @attr value [TD::Types::String] Unencrypted data, phone number or email address. + # @attr hash [TD::Types::String] Hash of the entire element. class EncryptedPassportElement < Base attribute :type, TD::Types::PassportElementType - attribute :data, TD::Types::String + attribute :data, TD::Types::Coercible::String attribute :front_side, TD::Types::DatedFile attribute :reverse_side, TD::Types::DatedFile.optional.default(nil) attribute :selfie, TD::Types::DatedFile.optional.default(nil) diff --git a/lib/tdlib/types/error.rb b/lib/tdlib/types/error.rb index c2b01798..fd73be68 100644 --- a/lib/tdlib/types/error.rb +++ b/lib/tdlib/types/error.rb @@ -4,9 +4,9 @@ module TD::Types # @attr code [Integer] Error code; subject to future changes. # If the error code is 406, the error message must not be processed in any way and must not be displayed to the # user. - # @attr message [String] Error message; subject to future changes. + # @attr message [TD::Types::String] Error message; subject to future changes. class Error < Base - attribute :code, TD::Types::Integer + attribute :code, TD::Types::Coercible::Integer attribute :message, TD::Types::String end end diff --git a/lib/tdlib/types/file.rb b/lib/tdlib/types/file.rb index ae7b68b9..97b9479d 100644 --- a/lib/tdlib/types/file.rb +++ b/lib/tdlib/types/file.rb @@ -9,9 +9,9 @@ module TD::Types # @attr local [TD::Types::LocalFile] Information about the local copy of the file. # @attr remote [TD::Types::RemoteFile] Information about the remote copy of the file. class File < Base - attribute :id, TD::Types::Integer - attribute :size, TD::Types::Integer - attribute :expected_size, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :size, TD::Types::Coercible::Integer + attribute :expected_size, TD::Types::Coercible::Integer attribute :local, TD::Types::LocalFile attribute :remote, TD::Types::RemoteFile end diff --git a/lib/tdlib/types/file_part.rb b/lib/tdlib/types/file_part.rb index 80223d01..84f4d37c 100644 --- a/lib/tdlib/types/file_part.rb +++ b/lib/tdlib/types/file_part.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr data [String] File bytes. class FilePart < Base - attribute :data, TD::Types::String + attribute :data, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/formatted_text.rb b/lib/tdlib/types/formatted_text.rb index 53a1597f..3dacae6c 100644 --- a/lib/tdlib/types/formatted_text.rb +++ b/lib/tdlib/types/formatted_text.rb @@ -1,7 +1,7 @@ module TD::Types # A text with some entities. # - # @attr text [String] The text. + # @attr text [TD::Types::String] The text. # @attr entities [Array] Entities contained in the text. # Entities can be nested, but must not mutually intersect with each other. # Pre, Code and PreCode entities can't contain other entities. diff --git a/lib/tdlib/types/found_messages.rb b/lib/tdlib/types/found_messages.rb index 938fe312..b888f6a7 100644 --- a/lib/tdlib/types/found_messages.rb +++ b/lib/tdlib/types/found_messages.rb @@ -3,10 +3,10 @@ module TD::Types # # @attr total_count [Integer] Approximate total count of messages found; -1 if unknown. # @attr messages [Array] List of messages. - # @attr next_offset [String] The offset for the next request. + # @attr next_offset [TD::Types::String] The offset for the next request. # If empty, there are no more results. class FoundMessages < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :messages, TD::Types::Array.of(TD::Types::Message) attribute :next_offset, TD::Types::String end diff --git a/lib/tdlib/types/game.rb b/lib/tdlib/types/game.rb index 9207db18..8c9b22ce 100644 --- a/lib/tdlib/types/game.rb +++ b/lib/tdlib/types/game.rb @@ -2,15 +2,15 @@ module TD::Types # Describes a game. # # @attr id [Integer] Game ID. - # @attr short_name [String] Game short name. + # @attr short_name [TD::Types::String] Game short name. # To share a game use the URL https://t.me/{bot_username}?game={game_short_name}. - # @attr title [String] Game title. + # @attr title [TD::Types::String] Game title. # @attr text [TD::Types::FormattedText] Game text, usually containing scoreboards for a game. - # @attr description [String] Game description. + # @attr description [TD::Types::String] Game description. # @attr photo [TD::Types::Photo] Game photo. # @attr animation [TD::Types::Animation, nil] Game animation; may be null. class Game < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :short_name, TD::Types::String attribute :title, TD::Types::String attribute :text, TD::Types::FormattedText diff --git a/lib/tdlib/types/game_high_score.rb b/lib/tdlib/types/game_high_score.rb index 748515a0..2b06328f 100644 --- a/lib/tdlib/types/game_high_score.rb +++ b/lib/tdlib/types/game_high_score.rb @@ -5,8 +5,8 @@ module TD::Types # @attr user_id [Integer] User identifier. # @attr score [Integer] User score. class GameHighScore < Base - attribute :position, TD::Types::Integer - attribute :user_id, TD::Types::Integer - attribute :score, TD::Types::Integer + attribute :position, TD::Types::Coercible::Integer + attribute :user_id, TD::Types::Coercible::Integer + attribute :score, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/group_call.rb b/lib/tdlib/types/group_call.rb index 69210c60..9fdb5b29 100644 --- a/lib/tdlib/types/group_call.rb +++ b/lib/tdlib/types/group_call.rb @@ -2,7 +2,7 @@ module TD::Types # Describes a group call. # # @attr id [Integer] Group call identifier. - # @attr title [String] Group call title. + # @attr title [TD::Types::String] Group call title. # @attr scheduled_start_date [Integer] Point in time (Unix timestamp) when the group call is supposed to be started # by an administrator; 0 if it is already active or was ended. # @attr enabled_start_notification [Boolean] True, if the group call is scheduled and the current user will receive a @@ -23,20 +23,20 @@ module TD::Types # recording goes on. # @attr duration [Integer] Call duration; for ended calls only. class GroupCall < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :title, TD::Types::String - attribute :scheduled_start_date, TD::Types::Integer + attribute :scheduled_start_date, TD::Types::Coercible::Integer attribute :enabled_start_notification, TD::Types::Bool attribute :is_active, TD::Types::Bool attribute :is_joined, TD::Types::Bool attribute :need_rejoin, TD::Types::Bool attribute :can_be_managed, TD::Types::Bool - attribute :participant_count, TD::Types::Integer + attribute :participant_count, TD::Types::Coercible::Integer attribute :loaded_all_participants, TD::Types::Bool attribute :recent_speakers, TD::Types::Array.of(TD::Types::GroupCallRecentSpeaker) attribute :mute_new_participants, TD::Types::Bool attribute :can_change_mute_new_participants, TD::Types::Bool - attribute :record_duration, TD::Types::Integer - attribute :duration, TD::Types::Integer + attribute :record_duration, TD::Types::Coercible::Integer + attribute :duration, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/group_call_id.rb b/lib/tdlib/types/group_call_id.rb index 327dcacb..e25e3ad2 100644 --- a/lib/tdlib/types/group_call_id.rb +++ b/lib/tdlib/types/group_call_id.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr id [Integer] Group call identifier. class GroupCallId < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/group_call_join_response_candidate.rb b/lib/tdlib/types/group_call_join_response_candidate.rb index 428ffe50..c4e04292 100644 --- a/lib/tdlib/types/group_call_join_response_candidate.rb +++ b/lib/tdlib/types/group_call_join_response_candidate.rb @@ -1,19 +1,19 @@ module TD::Types # Describes a join response candidate for interaction with tgcalls. # - # @attr port [String] Value of the field port. - # @attr protocol [String] Value of the field protocol. - # @attr network [String] Value of the field network. - # @attr generation [String] Value of the field generation. - # @attr id [String] Value of the field id. - # @attr component [String] Value of the field component. - # @attr foundation [String] Value of the field foundation. - # @attr priority [String] Value of the field priority. - # @attr ip [String] Value of the field ip. - # @attr type [String] Value of the field type. - # @attr tcp_type [String] Value of the field tcp_type. - # @attr rel_addr [String] Value of the field rel_addr. - # @attr rel_port [String] Value of the field rel_port. + # @attr port [TD::Types::String] Value of the field port. + # @attr protocol [TD::Types::String] Value of the field protocol. + # @attr network [TD::Types::String] Value of the field network. + # @attr generation [TD::Types::String] Value of the field generation. + # @attr id [TD::Types::String] Value of the field id. + # @attr component [TD::Types::String] Value of the field component. + # @attr foundation [TD::Types::String] Value of the field foundation. + # @attr priority [TD::Types::String] Value of the field priority. + # @attr ip [TD::Types::String] Value of the field ip. + # @attr type [TD::Types::String] Value of the field type. + # @attr tcp_type [TD::Types::String] Value of the field tcp_type. + # @attr rel_addr [TD::Types::String] Value of the field rel_addr. + # @attr rel_port [TD::Types::String] Value of the field rel_port. class GroupCallJoinResponseCandidate < Base attribute :port, TD::Types::String attribute :protocol, TD::Types::String diff --git a/lib/tdlib/types/group_call_participant.rb b/lib/tdlib/types/group_call_participant.rb index c072a227..b21ad7e3 100644 --- a/lib/tdlib/types/group_call_participant.rb +++ b/lib/tdlib/types/group_call_participant.rb @@ -3,7 +3,7 @@ module TD::Types # # @attr participant_id [TD::Types::MessageSender] Identifier of the group call participant. # @attr source [Integer] User's synchronization source. - # @attr bio [String] The participant user's bio or the participant chat's description. + # @attr bio [TD::Types::String] The participant user's bio or the participant chat's description. # @attr is_current_user [Boolean] True, if the participant is the current user. # @attr is_speaking [Boolean] True, if the participant is speaking as set by setGroupCallParticipantIsSpeaking. # @attr is_hand_raised [Boolean] True, if the participant hand is raised. @@ -17,13 +17,13 @@ module TD::Types # @attr is_muted_for_current_user [Boolean] True, if the participant is muted for the current user. # @attr can_unmute_self [Boolean] True, if the participant is muted for all users, but can unmute themself. # @attr volume_level [Integer] Participant's volume level; 1-20000 in hundreds of percents. - # @attr order [String] User's order in the group call participant list. + # @attr order [TD::Types::String] User's order in the group call participant list. # Orders must be compared lexicographically. # The bigger is order, the higher is user in the list. # If order is empty, the user must be removed from the participant list. class GroupCallParticipant < Base attribute :participant_id, TD::Types::MessageSender - attribute :source, TD::Types::Integer + attribute :source, TD::Types::Coercible::Integer attribute :bio, TD::Types::String attribute :is_current_user, TD::Types::Bool attribute :is_speaking, TD::Types::Bool @@ -35,7 +35,7 @@ class GroupCallParticipant < Base attribute :is_muted_for_all_users, TD::Types::Bool attribute :is_muted_for_current_user, TD::Types::Bool attribute :can_unmute_self, TD::Types::Bool - attribute :volume_level, TD::Types::Integer + attribute :volume_level, TD::Types::Coercible::Integer attribute :order, TD::Types::String end end diff --git a/lib/tdlib/types/group_call_payload.rb b/lib/tdlib/types/group_call_payload.rb index 1b025132..9ad17f7b 100644 --- a/lib/tdlib/types/group_call_payload.rb +++ b/lib/tdlib/types/group_call_payload.rb @@ -1,8 +1,8 @@ module TD::Types # Describes a payload for interaction with tgcalls. # - # @attr ufrag [String] Value of the field ufrag. - # @attr pwd [String] Value of the field pwd. + # @attr ufrag [TD::Types::String] Value of the field ufrag. + # @attr pwd [TD::Types::String] Value of the field pwd. # @attr fingerprints [Array] The list of fingerprints. class GroupCallPayload < Base attribute :ufrag, TD::Types::String diff --git a/lib/tdlib/types/group_call_payload_fingerprint.rb b/lib/tdlib/types/group_call_payload_fingerprint.rb index 4b33a180..0ec1a7ff 100644 --- a/lib/tdlib/types/group_call_payload_fingerprint.rb +++ b/lib/tdlib/types/group_call_payload_fingerprint.rb @@ -1,9 +1,9 @@ module TD::Types # Describes a payload fingerprint for interaction with tgcalls. # - # @attr hash [String] Value of the field hash. - # @attr setup [String] Value of the field setup. - # @attr fingerprint [String] Value of the field fingerprint. + # @attr hash [TD::Types::String] Value of the field hash. + # @attr setup [TD::Types::String] Value of the field setup. + # @attr fingerprint [TD::Types::String] Value of the field fingerprint. class GroupCallPayloadFingerprint < Base attribute :hash, TD::Types::String attribute :setup, TD::Types::String diff --git a/lib/tdlib/types/hashtags.rb b/lib/tdlib/types/hashtags.rb index 423f2b64..f512fa94 100644 --- a/lib/tdlib/types/hashtags.rb +++ b/lib/tdlib/types/hashtags.rb @@ -1,7 +1,7 @@ module TD::Types # Contains a list of hashtags. # - # @attr hashtags [Array] A list of hashtags. + # @attr hashtags [Array] A list of hashtags. class Hashtags < Base attribute :hashtags, TD::Types::Array.of(TD::Types::String) end diff --git a/lib/tdlib/types/http_url.rb b/lib/tdlib/types/http_url.rb index b37f0965..0c70bfe0 100644 --- a/lib/tdlib/types/http_url.rb +++ b/lib/tdlib/types/http_url.rb @@ -1,7 +1,7 @@ module TD::Types # Contains an HTTP URL. # - # @attr url [String] The URL. + # @attr url [TD::Types::String] The URL. class HttpUrl < Base attribute :url, TD::Types::String end diff --git a/lib/tdlib/types/identity_document.rb b/lib/tdlib/types/identity_document.rb index 1eb911ab..8ac33fc7 100644 --- a/lib/tdlib/types/identity_document.rb +++ b/lib/tdlib/types/identity_document.rb @@ -1,7 +1,7 @@ module TD::Types # An identity document. # - # @attr number [String] Document number; 1-24 characters. + # @attr number [TD::Types::String] Document number; 1-24 characters. # @attr expiry_date [TD::Types::Date, nil] Document expiry date; may be null. # @attr front_side [TD::Types::DatedFile] Front side of the document. # @attr reverse_side [TD::Types::DatedFile] Reverse side of the document; only for driver license and identity card. diff --git a/lib/tdlib/types/imported_contacts.rb b/lib/tdlib/types/imported_contacts.rb index 3a30250a..ab4f3535 100644 --- a/lib/tdlib/types/imported_contacts.rb +++ b/lib/tdlib/types/imported_contacts.rb @@ -6,7 +6,7 @@ module TD::Types # @attr importer_count [Array] The number of users that imported the corresponding contact; 0 for already # registered users or if unavailable. class ImportedContacts < Base - attribute :user_ids, TD::Types::Array.of(TD::Types::Integer) - attribute :importer_count, TD::Types::Array.of(TD::Types::Integer) + attribute :user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) + attribute :importer_count, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/inline_keyboard_button.rb b/lib/tdlib/types/inline_keyboard_button.rb index dce9969d..7ee77593 100644 --- a/lib/tdlib/types/inline_keyboard_button.rb +++ b/lib/tdlib/types/inline_keyboard_button.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a single button in an inline keyboard. # - # @attr text [String] Text of the button. + # @attr text [TD::Types::String] Text of the button. # @attr type [TD::Types::InlineKeyboardButtonType] Type of the button. class InlineKeyboardButton < Base attribute :text, TD::Types::String diff --git a/lib/tdlib/types/inline_keyboard_button_type/callback.rb b/lib/tdlib/types/inline_keyboard_button_type/callback.rb index 3268b72b..90e58d17 100644 --- a/lib/tdlib/types/inline_keyboard_button_type/callback.rb +++ b/lib/tdlib/types/inline_keyboard_button_type/callback.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr data [String] Data to be sent to the bot via a callback query. class InlineKeyboardButtonType::Callback < InlineKeyboardButtonType - attribute :data, TD::Types::String + attribute :data, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/inline_keyboard_button_type/callback_with_password.rb b/lib/tdlib/types/inline_keyboard_button_type/callback_with_password.rb index 9157714a..31c87c3f 100644 --- a/lib/tdlib/types/inline_keyboard_button_type/callback_with_password.rb +++ b/lib/tdlib/types/inline_keyboard_button_type/callback_with_password.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr data [String] Data to be sent to the bot via a callback query. class InlineKeyboardButtonType::CallbackWithPassword < InlineKeyboardButtonType - attribute :data, TD::Types::String + attribute :data, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/inline_keyboard_button_type/login_url.rb b/lib/tdlib/types/inline_keyboard_button_type/login_url.rb index b0789575..48299a91 100644 --- a/lib/tdlib/types/inline_keyboard_button_type/login_url.rb +++ b/lib/tdlib/types/inline_keyboard_button_type/login_url.rb @@ -1,12 +1,12 @@ module TD::Types # A button that opens a specified URL and automatically authorize the current user if allowed to do so. # - # @attr url [String] An HTTP URL to open. + # @attr url [TD::Types::String] An HTTP URL to open. # @attr id [Integer] Unique button identifier. - # @attr forward_text [String] If non-empty, new text of the button in forwarded messages. + # @attr forward_text [TD::Types::String] If non-empty, new text of the button in forwarded messages. class InlineKeyboardButtonType::LoginUrl < InlineKeyboardButtonType attribute :url, TD::Types::String - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :forward_text, TD::Types::String end end diff --git a/lib/tdlib/types/inline_keyboard_button_type/switch_inline.rb b/lib/tdlib/types/inline_keyboard_button_type/switch_inline.rb index f0113c6f..8c9889c6 100644 --- a/lib/tdlib/types/inline_keyboard_button_type/switch_inline.rb +++ b/lib/tdlib/types/inline_keyboard_button_type/switch_inline.rb @@ -1,7 +1,7 @@ module TD::Types # A button that forces an inline query to the bot to be inserted in the input field. # - # @attr query [String] Inline query to be sent to the bot. + # @attr query [TD::Types::String] Inline query to be sent to the bot. # @attr in_current_chat [Boolean] True, if the inline query should be sent from the current chat. class InlineKeyboardButtonType::SwitchInline < InlineKeyboardButtonType attribute :query, TD::Types::String diff --git a/lib/tdlib/types/inline_keyboard_button_type/url.rb b/lib/tdlib/types/inline_keyboard_button_type/url.rb index a8c4bf52..5e11d321 100644 --- a/lib/tdlib/types/inline_keyboard_button_type/url.rb +++ b/lib/tdlib/types/inline_keyboard_button_type/url.rb @@ -1,7 +1,7 @@ module TD::Types # A button that opens a specified URL. # - # @attr url [String] HTTP or tg:// URL to open. + # @attr url [TD::Types::String] HTTP or tg:// URL to open. class InlineKeyboardButtonType::Url < InlineKeyboardButtonType attribute :url, TD::Types::String end diff --git a/lib/tdlib/types/inline_query_result/animation.rb b/lib/tdlib/types/inline_query_result/animation.rb index 41fc7b13..5550badc 100644 --- a/lib/tdlib/types/inline_query_result/animation.rb +++ b/lib/tdlib/types/inline_query_result/animation.rb @@ -1,9 +1,9 @@ module TD::Types # Represents an animation file. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr animation [TD::Types::Animation] Animation file. - # @attr title [String] Animation title. + # @attr title [TD::Types::String] Animation title. class InlineQueryResult::Animation < InlineQueryResult attribute :id, TD::Types::String attribute :animation, TD::Types::Animation diff --git a/lib/tdlib/types/inline_query_result/article.rb b/lib/tdlib/types/inline_query_result/article.rb index fdc00a7f..8a52fd89 100644 --- a/lib/tdlib/types/inline_query_result/article.rb +++ b/lib/tdlib/types/inline_query_result/article.rb @@ -1,11 +1,11 @@ module TD::Types # Represents a link to an article or web page. # - # @attr id [String] Unique identifier of the query result. - # @attr url [String] URL of the result, if it exists. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr url [TD::Types::String] URL of the result, if it exists. # @attr hide_url [Boolean] True, if the URL must be not shown. - # @attr title [String] Title of the result. - # @attr description [String] A short description of the result. + # @attr title [TD::Types::String] Title of the result. + # @attr description [TD::Types::String] A short description of the result. # @attr thumbnail [TD::Types::Thumbnail, nil] Result thumbnail in JPEG format; may be null. class InlineQueryResult::Article < InlineQueryResult attribute :id, TD::Types::String diff --git a/lib/tdlib/types/inline_query_result/audio.rb b/lib/tdlib/types/inline_query_result/audio.rb index 48415f60..d988e7bd 100644 --- a/lib/tdlib/types/inline_query_result/audio.rb +++ b/lib/tdlib/types/inline_query_result/audio.rb @@ -1,7 +1,7 @@ module TD::Types # Represents an audio file. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr audio [TD::Types::Audio] Audio file. class InlineQueryResult::Audio < InlineQueryResult attribute :id, TD::Types::String diff --git a/lib/tdlib/types/inline_query_result/contact.rb b/lib/tdlib/types/inline_query_result/contact.rb index 6fc2815c..47646f3d 100644 --- a/lib/tdlib/types/inline_query_result/contact.rb +++ b/lib/tdlib/types/inline_query_result/contact.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a user contact. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr contact [TD::Types::Contact] A user contact. # @attr thumbnail [TD::Types::Thumbnail, nil] Result thumbnail in JPEG format; may be null. class InlineQueryResult::Contact < InlineQueryResult diff --git a/lib/tdlib/types/inline_query_result/document.rb b/lib/tdlib/types/inline_query_result/document.rb index b9a99b58..e867210e 100644 --- a/lib/tdlib/types/inline_query_result/document.rb +++ b/lib/tdlib/types/inline_query_result/document.rb @@ -1,10 +1,10 @@ module TD::Types # Represents a document. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr document [TD::Types::Document] Document. - # @attr title [String] Document title. - # @attr description [String] Document description. + # @attr title [TD::Types::String] Document title. + # @attr description [TD::Types::String] Document description. class InlineQueryResult::Document < InlineQueryResult attribute :id, TD::Types::String attribute :document, TD::Types::Document diff --git a/lib/tdlib/types/inline_query_result/game.rb b/lib/tdlib/types/inline_query_result/game.rb index a23fb6cc..8f41215f 100644 --- a/lib/tdlib/types/inline_query_result/game.rb +++ b/lib/tdlib/types/inline_query_result/game.rb @@ -1,7 +1,7 @@ module TD::Types # Represents information about a game. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr game [TD::Types::Game] Game result. class InlineQueryResult::Game < InlineQueryResult attribute :id, TD::Types::String diff --git a/lib/tdlib/types/inline_query_result/location.rb b/lib/tdlib/types/inline_query_result/location.rb index 745c7712..3472dcbe 100644 --- a/lib/tdlib/types/inline_query_result/location.rb +++ b/lib/tdlib/types/inline_query_result/location.rb @@ -1,9 +1,9 @@ module TD::Types # Represents a point on the map. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr location [TD::Types::Location] Location result. - # @attr title [String] Title of the result. + # @attr title [TD::Types::String] Title of the result. # @attr thumbnail [TD::Types::Thumbnail, nil] Result thumbnail in JPEG format; may be null. class InlineQueryResult::Location < InlineQueryResult attribute :id, TD::Types::String diff --git a/lib/tdlib/types/inline_query_result/photo.rb b/lib/tdlib/types/inline_query_result/photo.rb index 2dd49d5d..479fb6e6 100644 --- a/lib/tdlib/types/inline_query_result/photo.rb +++ b/lib/tdlib/types/inline_query_result/photo.rb @@ -1,10 +1,10 @@ module TD::Types # Represents a photo. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr photo [TD::Types::Photo] Photo. - # @attr title [String] Title of the result, if known. - # @attr description [String] A short description of the result, if known. + # @attr title [TD::Types::String] Title of the result, if known. + # @attr description [TD::Types::String] A short description of the result, if known. class InlineQueryResult::Photo < InlineQueryResult attribute :id, TD::Types::String attribute :photo, TD::Types::Photo diff --git a/lib/tdlib/types/inline_query_result/sticker.rb b/lib/tdlib/types/inline_query_result/sticker.rb index 80b0492e..609d9398 100644 --- a/lib/tdlib/types/inline_query_result/sticker.rb +++ b/lib/tdlib/types/inline_query_result/sticker.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a sticker. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr sticker [TD::Types::Sticker] Sticker. class InlineQueryResult::Sticker < InlineQueryResult attribute :id, TD::Types::String diff --git a/lib/tdlib/types/inline_query_result/venue.rb b/lib/tdlib/types/inline_query_result/venue.rb index ccee02d7..021b2a31 100644 --- a/lib/tdlib/types/inline_query_result/venue.rb +++ b/lib/tdlib/types/inline_query_result/venue.rb @@ -1,7 +1,7 @@ module TD::Types # Represents information about a venue. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr venue [TD::Types::Venue] Venue result. # @attr thumbnail [TD::Types::Thumbnail, nil] Result thumbnail in JPEG format; may be null. class InlineQueryResult::Venue < InlineQueryResult diff --git a/lib/tdlib/types/inline_query_result/video.rb b/lib/tdlib/types/inline_query_result/video.rb index 1e4b501f..86a4d849 100644 --- a/lib/tdlib/types/inline_query_result/video.rb +++ b/lib/tdlib/types/inline_query_result/video.rb @@ -1,10 +1,10 @@ module TD::Types # Represents a video. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr video [TD::Types::Video] Video. - # @attr title [String] Title of the video. - # @attr description [String] Description of the video. + # @attr title [TD::Types::String] Title of the video. + # @attr description [TD::Types::String] Description of the video. class InlineQueryResult::Video < InlineQueryResult attribute :id, TD::Types::String attribute :video, TD::Types::Video diff --git a/lib/tdlib/types/inline_query_result/voice_note.rb b/lib/tdlib/types/inline_query_result/voice_note.rb index 25e6dd61..3c52f6a4 100644 --- a/lib/tdlib/types/inline_query_result/voice_note.rb +++ b/lib/tdlib/types/inline_query_result/voice_note.rb @@ -1,9 +1,9 @@ module TD::Types # Represents a voice note. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr voice_note [TD::Types::VoiceNote] Voice note. - # @attr title [String] Title of the voice note. + # @attr title [TD::Types::String] Title of the voice note. class InlineQueryResult::VoiceNote < InlineQueryResult attribute :id, TD::Types::String attribute :voice_note, TD::Types::VoiceNote diff --git a/lib/tdlib/types/inline_query_results.rb b/lib/tdlib/types/inline_query_results.rb index fbf612f6..bf268e65 100644 --- a/lib/tdlib/types/inline_query_results.rb +++ b/lib/tdlib/types/inline_query_results.rb @@ -3,14 +3,14 @@ module TD::Types # Use sendInlineQueryResultMessage to send the result of the query. # # @attr inline_query_id [Integer] Unique identifier of the inline query. - # @attr next_offset [String] The offset for the next request. + # @attr next_offset [TD::Types::String] The offset for the next request. # If empty, there are no more results. # @attr results [Array] Results of the query. - # @attr switch_pm_text [String] If non-empty, this text should be shown on the button, which opens a private chat - # with the bot and sends the bot a start message with the switch_pm_parameter. - # @attr switch_pm_parameter [String] Parameter for the bot start message. + # @attr switch_pm_text [TD::Types::String] If non-empty, this text should be shown on the button, which opens a + # private chat with the bot and sends the bot a start message with the switch_pm_parameter. + # @attr switch_pm_parameter [TD::Types::String] Parameter for the bot start message. class InlineQueryResults < Base - attribute :inline_query_id, TD::Types::Integer + attribute :inline_query_id, TD::Types::Coercible::Integer attribute :next_offset, TD::Types::String attribute :results, TD::Types::Array.of(TD::Types::InlineQueryResult) attribute :switch_pm_text, TD::Types::String diff --git a/lib/tdlib/types/input_background/remote.rb b/lib/tdlib/types/input_background/remote.rb index e4a497b5..1f88be3d 100644 --- a/lib/tdlib/types/input_background/remote.rb +++ b/lib/tdlib/types/input_background/remote.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr background_id [Integer] The background identifier. class InputBackground::Remote < InputBackground - attribute :background_id, TD::Types::Integer + attribute :background_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_chat_photo/animation.rb b/lib/tdlib/types/input_chat_photo/animation.rb index 3b855afc..53d5e680 100644 --- a/lib/tdlib/types/input_chat_photo/animation.rb +++ b/lib/tdlib/types/input_chat_photo/animation.rb @@ -7,6 +7,6 @@ module TD::Types # @attr main_frame_timestamp [Float] Timestamp of the frame, which will be used as static chat photo. class InputChatPhoto::Animation < InputChatPhoto attribute :animation, TD::Types::InputFile - attribute :main_frame_timestamp, TD::Types::Float + attribute :main_frame_timestamp, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/input_chat_photo/previous.rb b/lib/tdlib/types/input_chat_photo/previous.rb index a9d8eb05..4526a34b 100644 --- a/lib/tdlib/types/input_chat_photo/previous.rb +++ b/lib/tdlib/types/input_chat_photo/previous.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr chat_photo_id [Integer] Identifier of the current user's profile photo to reuse. class InputChatPhoto::Previous < InputChatPhoto - attribute :chat_photo_id, TD::Types::Integer + attribute :chat_photo_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_credentials/apple_pay.rb b/lib/tdlib/types/input_credentials/apple_pay.rb index f2eaa3bb..b6febc3c 100644 --- a/lib/tdlib/types/input_credentials/apple_pay.rb +++ b/lib/tdlib/types/input_credentials/apple_pay.rb @@ -1,7 +1,7 @@ module TD::Types # Applies if a user enters new credentials using Apple Pay. # - # @attr data [String] JSON-encoded data with the credential identifier. + # @attr data [TD::Types::String] JSON-encoded data with the credential identifier. class InputCredentials::ApplePay < InputCredentials attribute :data, TD::Types::String end diff --git a/lib/tdlib/types/input_credentials/google_pay.rb b/lib/tdlib/types/input_credentials/google_pay.rb index 99dfa19c..a7df924b 100644 --- a/lib/tdlib/types/input_credentials/google_pay.rb +++ b/lib/tdlib/types/input_credentials/google_pay.rb @@ -1,7 +1,7 @@ module TD::Types # Applies if a user enters new credentials using Google Pay. # - # @attr data [String] JSON-encoded data with the credential identifier. + # @attr data [TD::Types::String] JSON-encoded data with the credential identifier. class InputCredentials::GooglePay < InputCredentials attribute :data, TD::Types::String end diff --git a/lib/tdlib/types/input_credentials/new.rb b/lib/tdlib/types/input_credentials/new.rb index 09bf3da3..cc94fda7 100644 --- a/lib/tdlib/types/input_credentials/new.rb +++ b/lib/tdlib/types/input_credentials/new.rb @@ -1,7 +1,7 @@ module TD::Types # Applies if a user enters new credentials on a payment provider website. # - # @attr data [String] Contains JSON-encoded data with a credential identifier from the payment provider. + # @attr data [TD::Types::String] Contains JSON-encoded data with a credential identifier from the payment provider. # @attr allow_save [Boolean] True, if the credential identifier can be saved on the server side. class InputCredentials::New < InputCredentials attribute :data, TD::Types::String diff --git a/lib/tdlib/types/input_credentials/saved.rb b/lib/tdlib/types/input_credentials/saved.rb index 6f59b4c9..3dd10fd7 100644 --- a/lib/tdlib/types/input_credentials/saved.rb +++ b/lib/tdlib/types/input_credentials/saved.rb @@ -2,7 +2,7 @@ module TD::Types # Applies if a user chooses some previously saved payment credentials. # To use their previously saved credentials, the user must have a valid temporary password. # - # @attr saved_credentials_id [String] Identifier of the saved credentials. + # @attr saved_credentials_id [TD::Types::String] Identifier of the saved credentials. class InputCredentials::Saved < InputCredentials attribute :saved_credentials_id, TD::Types::String end diff --git a/lib/tdlib/types/input_file/generated.rb b/lib/tdlib/types/input_file/generated.rb index c3f1ac56..73b28e53 100644 --- a/lib/tdlib/types/input_file/generated.rb +++ b/lib/tdlib/types/input_file/generated.rb @@ -1,15 +1,15 @@ module TD::Types # A file generated by the application. # - # @attr original_path [String, nil] Local path to a file from which the file is generated; may be empty if there is - # no such file. - # @attr conversion [String] String specifying the conversion applied to the original file; should be persistent - # across application restarts. + # @attr original_path [TD::Types::String, nil] Local path to a file from which the file is generated; may be empty if + # there is no such file. + # @attr conversion [TD::Types::String] String specifying the conversion applied to the original file; should be + # persistent across application restarts. # Conversions beginning with '#' are reserved for internal TDLib usage. # @attr expected_size [Integer] Expected size of the generated file; 0 if unknown. class InputFile::Generated < InputFile attribute :original_path, TD::Types::String.optional.default(nil) attribute :conversion, TD::Types::String - attribute :expected_size, TD::Types::Integer + attribute :expected_size, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_file/id.rb b/lib/tdlib/types/input_file/id.rb index a939f02f..34ca9bba 100644 --- a/lib/tdlib/types/input_file/id.rb +++ b/lib/tdlib/types/input_file/id.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr id [Integer] Unique file identifier. class InputFile::Id < InputFile - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_file/local.rb b/lib/tdlib/types/input_file/local.rb index 476dcb04..4f5601e2 100644 --- a/lib/tdlib/types/input_file/local.rb +++ b/lib/tdlib/types/input_file/local.rb @@ -1,7 +1,7 @@ module TD::Types # A file defined by a local path. # - # @attr path [String] Local path to the file. + # @attr path [TD::Types::String] Local path to the file. class InputFile::Local < InputFile attribute :path, TD::Types::String end diff --git a/lib/tdlib/types/input_file/remote.rb b/lib/tdlib/types/input_file/remote.rb index 45f64936..4535f9eb 100644 --- a/lib/tdlib/types/input_file/remote.rb +++ b/lib/tdlib/types/input_file/remote.rb @@ -5,7 +5,7 @@ module TD::Types # For example, if the file is from a message, then the message must be not deleted and accessible to the user. # If the file database is disabled, then the corresponding object with the file must be preloaded by the application. # - # @attr id [String] Remote file identifier. + # @attr id [TD::Types::String] Remote file identifier. class InputFile::Remote < InputFile attribute :id, TD::Types::String end diff --git a/lib/tdlib/types/input_identity_document.rb b/lib/tdlib/types/input_identity_document.rb index 822b5f65..63726bea 100644 --- a/lib/tdlib/types/input_identity_document.rb +++ b/lib/tdlib/types/input_identity_document.rb @@ -1,7 +1,7 @@ module TD::Types # An identity document to be saved to Telegram Passport. # - # @attr number [String] Document number; 1-24 characters. + # @attr number [TD::Types::String] Document number; 1-24 characters. # @attr expiry_date [TD::Types::Date, nil] Document expiry date, if available. # @attr front_side [TD::Types::InputFile] Front side of the document. # @attr reverse_side [TD::Types::InputFile] Reverse side of the document; only for driver license and identity card. diff --git a/lib/tdlib/types/input_inline_query_result/animation.rb b/lib/tdlib/types/input_inline_query_result/animation.rb index 39371d75..7642218f 100644 --- a/lib/tdlib/types/input_inline_query_result/animation.rb +++ b/lib/tdlib/types/input_inline_query_result/animation.rb @@ -2,13 +2,13 @@ module TD::Types # Represents a link to an animated GIF or an animated (i.e. # without sound) H.264/MPEG-4 AVC video. # - # @attr id [String] Unique identifier of the query result. - # @attr title [String] Title of the query result. - # @attr thumbnail_url [String] URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists. - # @attr thumbnail_mime_type [String] MIME type of the video thumbnail. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr title [TD::Types::String] Title of the query result. + # @attr thumbnail_url [TD::Types::String] URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists. + # @attr thumbnail_mime_type [TD::Types::String] MIME type of the video thumbnail. # If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4". - # @attr video_url [String] The URL of the video file (file size must not exceed 1MB). - # @attr video_mime_type [String] MIME type of the video file. + # @attr video_url [TD::Types::String] The URL of the video file (file size must not exceed 1MB). + # @attr video_mime_type [TD::Types::String] MIME type of the video file. # Must be one of "image/gif" and "video/mp4". # @attr video_duration [Integer] Duration of the video, in seconds. # @attr video_width [Integer] Width of the video. @@ -25,9 +25,9 @@ class InputInlineQueryResult::Animation < InputInlineQueryResult attribute :thumbnail_mime_type, TD::Types::String attribute :video_url, TD::Types::String attribute :video_mime_type, TD::Types::String - attribute :video_duration, TD::Types::Integer - attribute :video_width, TD::Types::Integer - attribute :video_height, TD::Types::Integer + attribute :video_duration, TD::Types::Coercible::Integer + attribute :video_width, TD::Types::Coercible::Integer + attribute :video_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/article.rb b/lib/tdlib/types/input_inline_query_result/article.rb index 8e60a365..655e4e32 100644 --- a/lib/tdlib/types/input_inline_query_result/article.rb +++ b/lib/tdlib/types/input_inline_query_result/article.rb @@ -1,12 +1,12 @@ module TD::Types # Represents a link to an article or web page. # - # @attr id [String] Unique identifier of the query result. - # @attr url [String] URL of the result, if it exists. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr url [TD::Types::String] URL of the result, if it exists. # @attr hide_url [Boolean] True, if the URL must be not shown. - # @attr title [String] Title of the result. - # @attr description [String] A short description of the result. - # @attr thumbnail_url [String] URL of the result thumbnail, if it exists. + # @attr title [TD::Types::String] Title of the result. + # @attr description [TD::Types::String] A short description of the result. + # @attr thumbnail_url [TD::Types::String] URL of the result thumbnail, if it exists. # @attr thumbnail_width [Integer] Thumbnail width, if known. # @attr thumbnail_height [Integer] Thumbnail height, if known. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. @@ -21,8 +21,8 @@ class InputInlineQueryResult::Article < InputInlineQueryResult attribute :title, TD::Types::String attribute :description, TD::Types::String attribute :thumbnail_url, TD::Types::String - attribute :thumbnail_width, TD::Types::Integer - attribute :thumbnail_height, TD::Types::Integer + attribute :thumbnail_width, TD::Types::Coercible::Integer + attribute :thumbnail_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/audio.rb b/lib/tdlib/types/input_inline_query_result/audio.rb index 72686339..7b213f28 100644 --- a/lib/tdlib/types/input_inline_query_result/audio.rb +++ b/lib/tdlib/types/input_inline_query_result/audio.rb @@ -1,10 +1,10 @@ module TD::Types # Represents a link to an MP3 audio file. # - # @attr id [String] Unique identifier of the query result. - # @attr title [String] Title of the audio file. - # @attr performer [String] Performer of the audio file. - # @attr audio_url [String] The URL of the audio file. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr title [TD::Types::String] Title of the audio file. + # @attr performer [TD::Types::String] Performer of the audio file. + # @attr audio_url [TD::Types::String] The URL of the audio file. # @attr audio_duration [Integer] Audio file duration, in seconds. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. # Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null. @@ -16,7 +16,7 @@ class InputInlineQueryResult::Audio < InputInlineQueryResult attribute :title, TD::Types::String attribute :performer, TD::Types::String attribute :audio_url, TD::Types::String - attribute :audio_duration, TD::Types::Integer + attribute :audio_duration, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/contact.rb b/lib/tdlib/types/input_inline_query_result/contact.rb index 92720123..39243dfd 100644 --- a/lib/tdlib/types/input_inline_query_result/contact.rb +++ b/lib/tdlib/types/input_inline_query_result/contact.rb @@ -1,9 +1,9 @@ module TD::Types # Represents a user contact. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr contact [TD::Types::Contact] User contact. - # @attr thumbnail_url [String] URL of the result thumbnail, if it exists. + # @attr thumbnail_url [TD::Types::String] URL of the result thumbnail, if it exists. # @attr thumbnail_width [Integer] Thumbnail width, if known. # @attr thumbnail_height [Integer] Thumbnail height, if known. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. @@ -15,8 +15,8 @@ class InputInlineQueryResult::Contact < InputInlineQueryResult attribute :id, TD::Types::String attribute :contact, TD::Types::Contact attribute :thumbnail_url, TD::Types::String - attribute :thumbnail_width, TD::Types::Integer - attribute :thumbnail_height, TD::Types::Integer + attribute :thumbnail_width, TD::Types::Coercible::Integer + attribute :thumbnail_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/document.rb b/lib/tdlib/types/input_inline_query_result/document.rb index c848ff25..4063ccde 100644 --- a/lib/tdlib/types/input_inline_query_result/document.rb +++ b/lib/tdlib/types/input_inline_query_result/document.rb @@ -1,13 +1,13 @@ module TD::Types # Represents a link to a file. # - # @attr id [String] Unique identifier of the query result. - # @attr title [String] Title of the resulting file. - # @attr description [String] Short description of the result, if known. - # @attr document_url [String] URL of the file. - # @attr mime_type [String] MIME type of the file content; only "application/pdf" and "application/zip" are currently - # allowed. - # @attr thumbnail_url [String] The URL of the file thumbnail, if it exists. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr title [TD::Types::String] Title of the resulting file. + # @attr description [TD::Types::String] Short description of the result, if known. + # @attr document_url [TD::Types::String] URL of the file. + # @attr mime_type [TD::Types::String] MIME type of the file content; only "application/pdf" and "application/zip" are + # currently allowed. + # @attr thumbnail_url [TD::Types::String] The URL of the file thumbnail, if it exists. # @attr thumbnail_width [Integer] Width of the thumbnail. # @attr thumbnail_height [Integer] Height of the thumbnail. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. @@ -22,8 +22,8 @@ class InputInlineQueryResult::Document < InputInlineQueryResult attribute :document_url, TD::Types::String attribute :mime_type, TD::Types::String attribute :thumbnail_url, TD::Types::String - attribute :thumbnail_width, TD::Types::Integer - attribute :thumbnail_height, TD::Types::Integer + attribute :thumbnail_width, TD::Types::Coercible::Integer + attribute :thumbnail_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/game.rb b/lib/tdlib/types/input_inline_query_result/game.rb index 83def4d7..956cc609 100644 --- a/lib/tdlib/types/input_inline_query_result/game.rb +++ b/lib/tdlib/types/input_inline_query_result/game.rb @@ -1,8 +1,8 @@ module TD::Types # Represents a game. # - # @attr id [String] Unique identifier of the query result. - # @attr game_short_name [String] Short name of the game. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr game_short_name [TD::Types::String] Short name of the game. # @attr reply_markup [TD::Types::ReplyMarkup] Message reply markup. # Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null. class InputInlineQueryResult::Game < InputInlineQueryResult diff --git a/lib/tdlib/types/input_inline_query_result/location.rb b/lib/tdlib/types/input_inline_query_result/location.rb index af736d4a..e38197d7 100644 --- a/lib/tdlib/types/input_inline_query_result/location.rb +++ b/lib/tdlib/types/input_inline_query_result/location.rb @@ -1,12 +1,12 @@ module TD::Types # Represents a point on the map. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr location [TD::Types::Location] Location result. # @attr live_period [Integer] Amount of time relative to the message sent time until the location can be updated, in # seconds. - # @attr title [String] Title of the result. - # @attr thumbnail_url [String] URL of the result thumbnail, if it exists. + # @attr title [TD::Types::String] Title of the result. + # @attr thumbnail_url [TD::Types::String] URL of the result thumbnail, if it exists. # @attr thumbnail_width [Integer] Thumbnail width, if known. # @attr thumbnail_height [Integer] Thumbnail height, if known. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. @@ -17,11 +17,11 @@ module TD::Types class InputInlineQueryResult::Location < InputInlineQueryResult attribute :id, TD::Types::String attribute :location, TD::Types::Location - attribute :live_period, TD::Types::Integer + attribute :live_period, TD::Types::Coercible::Integer attribute :title, TD::Types::String attribute :thumbnail_url, TD::Types::String - attribute :thumbnail_width, TD::Types::Integer - attribute :thumbnail_height, TD::Types::Integer + attribute :thumbnail_width, TD::Types::Coercible::Integer + attribute :thumbnail_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/photo.rb b/lib/tdlib/types/input_inline_query_result/photo.rb index 868d1ad1..03d77bce 100644 --- a/lib/tdlib/types/input_inline_query_result/photo.rb +++ b/lib/tdlib/types/input_inline_query_result/photo.rb @@ -1,11 +1,11 @@ module TD::Types # Represents link to a JPEG image. # - # @attr id [String] Unique identifier of the query result. - # @attr title [String] Title of the result, if known. - # @attr description [String] A short description of the result, if known. - # @attr thumbnail_url [String] URL of the photo thumbnail, if it exists. - # @attr photo_url [String] The URL of the JPEG photo (photo size must not exceed 5MB). + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr title [TD::Types::String] Title of the result, if known. + # @attr description [TD::Types::String] A short description of the result, if known. + # @attr thumbnail_url [TD::Types::String] URL of the photo thumbnail, if it exists. + # @attr photo_url [TD::Types::String] The URL of the JPEG photo (photo size must not exceed 5MB). # @attr photo_width [Integer] Width of the photo. # @attr photo_height [Integer] Height of the photo. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. @@ -19,8 +19,8 @@ class InputInlineQueryResult::Photo < InputInlineQueryResult attribute :description, TD::Types::String attribute :thumbnail_url, TD::Types::String attribute :photo_url, TD::Types::String - attribute :photo_width, TD::Types::Integer - attribute :photo_height, TD::Types::Integer + attribute :photo_width, TD::Types::Coercible::Integer + attribute :photo_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/sticker.rb b/lib/tdlib/types/input_inline_query_result/sticker.rb index f1e40b11..d9431f06 100644 --- a/lib/tdlib/types/input_inline_query_result/sticker.rb +++ b/lib/tdlib/types/input_inline_query_result/sticker.rb @@ -1,9 +1,9 @@ module TD::Types # Represents a link to a WEBP or TGS sticker. # - # @attr id [String] Unique identifier of the query result. - # @attr thumbnail_url [String] URL of the sticker thumbnail, if it exists. - # @attr sticker_url [String] The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB). + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr thumbnail_url [TD::Types::String] URL of the sticker thumbnail, if it exists. + # @attr sticker_url [TD::Types::String] The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB). # @attr sticker_width [Integer] Width of the sticker. # @attr sticker_height [Integer] Height of the sticker. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. @@ -15,8 +15,8 @@ class InputInlineQueryResult::Sticker < InputInlineQueryResult attribute :id, TD::Types::String attribute :thumbnail_url, TD::Types::String attribute :sticker_url, TD::Types::String - attribute :sticker_width, TD::Types::Integer - attribute :sticker_height, TD::Types::Integer + attribute :sticker_width, TD::Types::Coercible::Integer + attribute :sticker_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/venue.rb b/lib/tdlib/types/input_inline_query_result/venue.rb index c76919fe..2c1291d3 100644 --- a/lib/tdlib/types/input_inline_query_result/venue.rb +++ b/lib/tdlib/types/input_inline_query_result/venue.rb @@ -1,9 +1,9 @@ module TD::Types # Represents information about a venue. # - # @attr id [String] Unique identifier of the query result. + # @attr id [TD::Types::String] Unique identifier of the query result. # @attr venue [TD::Types::Venue] Venue result. - # @attr thumbnail_url [String] URL of the result thumbnail, if it exists. + # @attr thumbnail_url [TD::Types::String] URL of the result thumbnail, if it exists. # @attr thumbnail_width [Integer] Thumbnail width, if known. # @attr thumbnail_height [Integer] Thumbnail height, if known. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. @@ -15,8 +15,8 @@ class InputInlineQueryResult::Venue < InputInlineQueryResult attribute :id, TD::Types::String attribute :venue, TD::Types::Venue attribute :thumbnail_url, TD::Types::String - attribute :thumbnail_width, TD::Types::Integer - attribute :thumbnail_height, TD::Types::Integer + attribute :thumbnail_width, TD::Types::Coercible::Integer + attribute :thumbnail_height, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/video.rb b/lib/tdlib/types/input_inline_query_result/video.rb index 6a606e14..b71e3a1b 100644 --- a/lib/tdlib/types/input_inline_query_result/video.rb +++ b/lib/tdlib/types/input_inline_query_result/video.rb @@ -1,13 +1,13 @@ module TD::Types # Represents a link to a page containing an embedded video player or a video file. # - # @attr id [String] Unique identifier of the query result. - # @attr title [String] Title of the result. - # @attr description [String] A short description of the result, if known. - # @attr thumbnail_url [String] The URL of the video thumbnail (JPEG), if it exists. - # @attr video_url [String] URL of the embedded video player or video file. - # @attr mime_type [String] MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently - # supported. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr title [TD::Types::String] Title of the result. + # @attr description [TD::Types::String] A short description of the result, if known. + # @attr thumbnail_url [TD::Types::String] The URL of the video thumbnail (JPEG), if it exists. + # @attr video_url [TD::Types::String] URL of the embedded video player or video file. + # @attr mime_type [TD::Types::String] MIME type of the content of the video URL, only "text/html" or "video/mp4" are + # currently supported. # @attr video_width [Integer] Width of the video. # @attr video_height [Integer] Height of the video. # @attr video_duration [Integer] Video duration, in seconds. @@ -23,9 +23,9 @@ class InputInlineQueryResult::Video < InputInlineQueryResult attribute :thumbnail_url, TD::Types::String attribute :video_url, TD::Types::String attribute :mime_type, TD::Types::String - attribute :video_width, TD::Types::Integer - attribute :video_height, TD::Types::Integer - attribute :video_duration, TD::Types::Integer + attribute :video_width, TD::Types::Coercible::Integer + attribute :video_height, TD::Types::Coercible::Integer + attribute :video_duration, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_inline_query_result/voice_note.rb b/lib/tdlib/types/input_inline_query_result/voice_note.rb index 2bfd95c2..832b9cff 100644 --- a/lib/tdlib/types/input_inline_query_result/voice_note.rb +++ b/lib/tdlib/types/input_inline_query_result/voice_note.rb @@ -1,9 +1,9 @@ module TD::Types # Represents a link to an opus-encoded audio file within an OGG container, single channel audio. # - # @attr id [String] Unique identifier of the query result. - # @attr title [String] Title of the voice note. - # @attr voice_note_url [String] The URL of the voice note file. + # @attr id [TD::Types::String] Unique identifier of the query result. + # @attr title [TD::Types::String] Title of the voice note. + # @attr voice_note_url [TD::Types::String] The URL of the voice note file. # @attr voice_note_duration [Integer] Duration of the voice note, in seconds. # @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup. # Must be of type {TD::Types::ReplyMarkup::InlineKeyboard} or null. @@ -14,7 +14,7 @@ class InputInlineQueryResult::VoiceNote < InputInlineQueryResult attribute :id, TD::Types::String attribute :title, TD::Types::String attribute :voice_note_url, TD::Types::String - attribute :voice_note_duration, TD::Types::Integer + attribute :voice_note_duration, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup attribute :input_message_content, TD::Types::InputMessageContent end diff --git a/lib/tdlib/types/input_message_content/animation.rb b/lib/tdlib/types/input_message_content/animation.rb index 2f43398e..7e87fab3 100644 --- a/lib/tdlib/types/input_message_content/animation.rb +++ b/lib/tdlib/types/input_message_content/animation.rb @@ -12,10 +12,10 @@ module TD::Types class InputMessageContent::Animation < InputMessageContent attribute :animation, TD::Types::InputFile attribute :thumbnail, TD::Types::InputThumbnail.optional.default(nil) - attribute :added_sticker_file_ids, TD::Types::Array.of(TD::Types::Integer) - attribute :duration, TD::Types::Integer - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :added_sticker_file_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) + attribute :duration, TD::Types::Coercible::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :caption, TD::Types::FormattedText end end diff --git a/lib/tdlib/types/input_message_content/audio.rb b/lib/tdlib/types/input_message_content/audio.rb index dce80d9e..5cf443a9 100644 --- a/lib/tdlib/types/input_message_content/audio.rb +++ b/lib/tdlib/types/input_message_content/audio.rb @@ -4,13 +4,13 @@ module TD::Types # @attr audio [TD::Types::InputFile] Audio file to be sent. # @attr album_cover_thumbnail [TD::Types::InputThumbnail, nil] Thumbnail of the cover for the album, if available. # @attr duration [Integer] Duration of the audio, in seconds; may be replaced by the server. - # @attr title [String] Title of the audio; 0-64 characters; may be replaced by the server. - # @attr performer [String] Performer of the audio; 0-64 characters, may be replaced by the server. + # @attr title [TD::Types::String] Title of the audio; 0-64 characters; may be replaced by the server. + # @attr performer [TD::Types::String] Performer of the audio; 0-64 characters, may be replaced by the server. # @attr caption [TD::Types::FormattedText] Audio caption; 0-GetOption("message_caption_length_max") characters. class InputMessageContent::Audio < InputMessageContent attribute :audio, TD::Types::InputFile attribute :album_cover_thumbnail, TD::Types::InputThumbnail.optional.default(nil) - attribute :duration, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer attribute :title, TD::Types::String attribute :performer, TD::Types::String attribute :caption, TD::Types::FormattedText diff --git a/lib/tdlib/types/input_message_content/dice.rb b/lib/tdlib/types/input_message_content/dice.rb index 3ab66bd4..32f3a81f 100644 --- a/lib/tdlib/types/input_message_content/dice.rb +++ b/lib/tdlib/types/input_message_content/dice.rb @@ -1,7 +1,7 @@ module TD::Types # A dice message. # - # @attr emoji [String] Emoji on which the dice throw animation is based. + # @attr emoji [TD::Types::String] Emoji on which the dice throw animation is based. # @attr clear_draft [Boolean] True, if a chat message draft should be deleted. class InputMessageContent::Dice < InputMessageContent attribute :emoji, TD::Types::String diff --git a/lib/tdlib/types/input_message_content/forwarded.rb b/lib/tdlib/types/input_message_content/forwarded.rb index 12cbdfc6..516fbb74 100644 --- a/lib/tdlib/types/input_message_content/forwarded.rb +++ b/lib/tdlib/types/input_message_content/forwarded.rb @@ -8,8 +8,8 @@ module TD::Types # @attr copy_options [TD::Types::MessageCopyOptions] Options to be used to copy content of the message without a link # to the original message. class InputMessageContent::Forwarded < InputMessageContent - attribute :from_chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :from_chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer attribute :in_game_share, TD::Types::Bool attribute :copy_options, TD::Types::MessageCopyOptions end diff --git a/lib/tdlib/types/input_message_content/game.rb b/lib/tdlib/types/input_message_content/game.rb index 3ebd0c05..24df8cd5 100644 --- a/lib/tdlib/types/input_message_content/game.rb +++ b/lib/tdlib/types/input_message_content/game.rb @@ -2,9 +2,9 @@ module TD::Types # A message with a game; not supported for channels or secret chats. # # @attr bot_user_id [Integer] User identifier of the bot that owns the game. - # @attr game_short_name [String] Short name of the game. + # @attr game_short_name [TD::Types::String] Short name of the game. class InputMessageContent::Game < InputMessageContent - attribute :bot_user_id, TD::Types::Integer + attribute :bot_user_id, TD::Types::Coercible::Integer attribute :game_short_name, TD::Types::String end end diff --git a/lib/tdlib/types/input_message_content/invoice.rb b/lib/tdlib/types/input_message_content/invoice.rb index b804cb6c..f1e81c1c 100644 --- a/lib/tdlib/types/input_message_content/invoice.rb +++ b/lib/tdlib/types/input_message_content/invoice.rb @@ -2,26 +2,28 @@ module TD::Types # A message with an invoice; can be used only by bots. # # @attr invoice [TD::Types::Invoice] Invoice. - # @attr title [String] Product title; 1-32 characters. - # @attr description [String] Product description; 0-255 characters. - # @attr photo_url [String, nil] Product photo URL; optional. + # @attr title [TD::Types::String] Product title; 1-32 characters. + # @attr description [TD::Types::String] Product description; 0-255 characters. + # @attr photo_url [TD::Types::String, nil] Product photo URL; optional. # @attr photo_size [Integer] Product photo size. # @attr photo_width [Integer] Product photo width. # @attr photo_height [Integer] Product photo height. # @attr payload [String] The invoice payload. - # @attr provider_token [String] Payment provider token. - # @attr provider_data [String] JSON-encoded data about the invoice, which will be shared with the payment provider. - # @attr start_parameter [String] Unique invoice bot deep link parameter for the generation of this invoice. + # @attr provider_token [TD::Types::String] Payment provider token. + # @attr provider_data [TD::Types::String] JSON-encoded data about the invoice, which will be shared with the payment + # provider. + # @attr start_parameter [TD::Types::String] Unique invoice bot deep link parameter for the generation of this + # invoice. # If empty, it would be possible to pay directly from forwards of the invoice message. class InputMessageContent::Invoice < InputMessageContent attribute :invoice, TD::Types::Invoice attribute :title, TD::Types::String attribute :description, TD::Types::String attribute :photo_url, TD::Types::String.optional.default(nil) - attribute :photo_size, TD::Types::Integer - attribute :photo_width, TD::Types::Integer - attribute :photo_height, TD::Types::Integer - attribute :payload, TD::Types::String + attribute :photo_size, TD::Types::Coercible::Integer + attribute :photo_width, TD::Types::Coercible::Integer + attribute :photo_height, TD::Types::Coercible::Integer + attribute :payload, TD::Types::Coercible::String attribute :provider_token, TD::Types::String attribute :provider_data, TD::Types::String attribute :start_parameter, TD::Types::String diff --git a/lib/tdlib/types/input_message_content/location.rb b/lib/tdlib/types/input_message_content/location.rb index 54d26678..cd204ed8 100644 --- a/lib/tdlib/types/input_message_content/location.rb +++ b/lib/tdlib/types/input_message_content/location.rb @@ -12,8 +12,8 @@ module TD::Types # Can't be enabled in channels and Saved Messages. class InputMessageContent::Location < InputMessageContent attribute :location, TD::Types::Location - attribute :live_period, TD::Types::Integer - attribute :heading, TD::Types::Integer - attribute :proximity_alert_radius, TD::Types::Integer + attribute :live_period, TD::Types::Coercible::Integer + attribute :heading, TD::Types::Coercible::Integer + attribute :proximity_alert_radius, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_message_content/photo.rb b/lib/tdlib/types/input_message_content/photo.rb index df58b872..1b05c39f 100644 --- a/lib/tdlib/types/input_message_content/photo.rb +++ b/lib/tdlib/types/input_message_content/photo.rb @@ -13,10 +13,10 @@ module TD::Types class InputMessageContent::Photo < InputMessageContent attribute :photo, TD::Types::InputFile attribute :thumbnail, TD::Types::InputThumbnail - attribute :added_sticker_file_ids, TD::Types::Array.of(TD::Types::Integer) - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :added_sticker_file_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :caption, TD::Types::FormattedText - attribute :ttl, TD::Types::Integer + attribute :ttl, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_message_content/poll.rb b/lib/tdlib/types/input_message_content/poll.rb index 3fdbdb73..db8944b2 100644 --- a/lib/tdlib/types/input_message_content/poll.rb +++ b/lib/tdlib/types/input_message_content/poll.rb @@ -3,8 +3,8 @@ module TD::Types # Polls can't be sent to secret chats. # Polls can be sent only to a private chat with a bot. # - # @attr question [String] Poll question; 1-255 characters (up to 300 characters for bots). - # @attr options [Array] List of poll answer options, 2-10 strings 1-100 characters each. + # @attr question [TD::Types::String] Poll question; 1-255 characters (up to 300 characters for bots). + # @attr options [Array] List of poll answer options, 2-10 strings 1-100 characters each. # @attr is_anonymous [Boolean] True, if the poll voters are anonymous. # Non-anonymous polls can't be sent or forwarded to channels. # @attr type [TD::Types::PollType] Type of the poll. @@ -17,8 +17,8 @@ class InputMessageContent::Poll < InputMessageContent attribute :options, TD::Types::Array.of(TD::Types::String) attribute :is_anonymous, TD::Types::Bool attribute :type, TD::Types::PollType - attribute :open_period, TD::Types::Integer - attribute :close_date, TD::Types::Integer + attribute :open_period, TD::Types::Coercible::Integer + attribute :close_date, TD::Types::Coercible::Integer attribute :is_closed, TD::Types::Bool end end diff --git a/lib/tdlib/types/input_message_content/sticker.rb b/lib/tdlib/types/input_message_content/sticker.rb index 3822856c..cd03881b 100644 --- a/lib/tdlib/types/input_message_content/sticker.rb +++ b/lib/tdlib/types/input_message_content/sticker.rb @@ -5,12 +5,12 @@ module TD::Types # @attr thumbnail [TD::Types::InputThumbnail, nil] Sticker thumbnail, if available. # @attr width [Integer] Sticker width. # @attr height [Integer] Sticker height. - # @attr emoji [String] Emoji used to choose the sticker. + # @attr emoji [TD::Types::String] Emoji used to choose the sticker. class InputMessageContent::Sticker < InputMessageContent attribute :sticker, TD::Types::InputFile attribute :thumbnail, TD::Types::InputThumbnail.optional.default(nil) - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :emoji, TD::Types::String end end diff --git a/lib/tdlib/types/input_message_content/video.rb b/lib/tdlib/types/input_message_content/video.rb index 96ed5a9e..d6fb847a 100644 --- a/lib/tdlib/types/input_message_content/video.rb +++ b/lib/tdlib/types/input_message_content/video.rb @@ -14,12 +14,12 @@ module TD::Types class InputMessageContent::Video < InputMessageContent attribute :video, TD::Types::InputFile attribute :thumbnail, TD::Types::InputThumbnail.optional.default(nil) - attribute :added_sticker_file_ids, TD::Types::Array.of(TD::Types::Integer) - attribute :duration, TD::Types::Integer - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :added_sticker_file_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) + attribute :duration, TD::Types::Coercible::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :supports_streaming, TD::Types::Bool attribute :caption, TD::Types::FormattedText - attribute :ttl, TD::Types::Integer + attribute :ttl, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_message_content/video_note.rb b/lib/tdlib/types/input_message_content/video_note.rb index 0556b6b0..95781277 100644 --- a/lib/tdlib/types/input_message_content/video_note.rb +++ b/lib/tdlib/types/input_message_content/video_note.rb @@ -8,7 +8,7 @@ module TD::Types class InputMessageContent::VideoNote < InputMessageContent attribute :video_note, TD::Types::InputFile attribute :thumbnail, TD::Types::InputThumbnail.optional.default(nil) - attribute :duration, TD::Types::Integer - attribute :length, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer + attribute :length, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/input_message_content/voice_note.rb b/lib/tdlib/types/input_message_content/voice_note.rb index 49c19c12..0e2e0718 100644 --- a/lib/tdlib/types/input_message_content/voice_note.rb +++ b/lib/tdlib/types/input_message_content/voice_note.rb @@ -7,8 +7,8 @@ module TD::Types # @attr caption [TD::Types::FormattedText] Voice note caption; 0-GetOption("message_caption_length_max") characters. class InputMessageContent::VoiceNote < InputMessageContent attribute :voice_note, TD::Types::InputFile - attribute :duration, TD::Types::Integer - attribute :waveform, TD::Types::String + attribute :duration, TD::Types::Coercible::Integer + attribute :waveform, TD::Types::Coercible::String attribute :caption, TD::Types::FormattedText end end diff --git a/lib/tdlib/types/input_passport_element/email_address.rb b/lib/tdlib/types/input_passport_element/email_address.rb index fb2dbeb5..36167012 100644 --- a/lib/tdlib/types/input_passport_element/email_address.rb +++ b/lib/tdlib/types/input_passport_element/email_address.rb @@ -1,7 +1,7 @@ module TD::Types # A Telegram Passport element to be saved containing the user's email address. # - # @attr email_address [String] The email address to be saved. + # @attr email_address [TD::Types::String] The email address to be saved. class InputPassportElement::EmailAddress < InputPassportElement attribute :email_address, TD::Types::String end diff --git a/lib/tdlib/types/input_passport_element/phone_number.rb b/lib/tdlib/types/input_passport_element/phone_number.rb index 1d974ad9..dce23bb0 100644 --- a/lib/tdlib/types/input_passport_element/phone_number.rb +++ b/lib/tdlib/types/input_passport_element/phone_number.rb @@ -1,7 +1,7 @@ module TD::Types # A Telegram Passport element to be saved containing the user's phone number. # - # @attr phone_number [String] The phone number to be saved. + # @attr phone_number [TD::Types::String] The phone number to be saved. class InputPassportElement::PhoneNumber < InputPassportElement attribute :phone_number, TD::Types::String end diff --git a/lib/tdlib/types/input_passport_element_error.rb b/lib/tdlib/types/input_passport_element_error.rb index 05fe86f4..8930ad09 100644 --- a/lib/tdlib/types/input_passport_element_error.rb +++ b/lib/tdlib/types/input_passport_element_error.rb @@ -2,7 +2,7 @@ module TD::Types # Contains the description of an error in a Telegram Passport element; for bots only. # # @attr type [TD::Types::PassportElementType] Type of Telegram Passport element that has the error. - # @attr message [String] Error message. + # @attr message [TD::Types::String] Error message. # @attr source [TD::Types::InputPassportElementErrorSource] Error source. class InputPassportElementError < Base attribute :type, TD::Types::PassportElementType diff --git a/lib/tdlib/types/input_passport_element_error_source/data_field.rb b/lib/tdlib/types/input_passport_element_error_source/data_field.rb index 46fbe2f1..63487ee4 100644 --- a/lib/tdlib/types/input_passport_element_error_source/data_field.rb +++ b/lib/tdlib/types/input_passport_element_error_source/data_field.rb @@ -2,10 +2,10 @@ module TD::Types # A data field contains an error. # The error is considered resolved when the field's value changes. # - # @attr field_name [String] Field name. + # @attr field_name [TD::Types::String] Field name. # @attr data_hash [String] Current data hash. class InputPassportElementErrorSource::DataField < InputPassportElementErrorSource attribute :field_name, TD::Types::String - attribute :data_hash, TD::Types::String + attribute :data_hash, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/input_passport_element_error_source/file.rb b/lib/tdlib/types/input_passport_element_error_source/file.rb index c1194e8c..787fbea2 100644 --- a/lib/tdlib/types/input_passport_element_error_source/file.rb +++ b/lib/tdlib/types/input_passport_element_error_source/file.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_hash [String] Current hash of the file which has the error. class InputPassportElementErrorSource::File < InputPassportElementErrorSource - attribute :file_hash, TD::Types::String + attribute :file_hash, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/input_passport_element_error_source/files.rb b/lib/tdlib/types/input_passport_element_error_source/files.rb index 3c06a957..dccee80b 100644 --- a/lib/tdlib/types/input_passport_element_error_source/files.rb +++ b/lib/tdlib/types/input_passport_element_error_source/files.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_hashes [Array] Current hashes of all attached files. class InputPassportElementErrorSource::Files < InputPassportElementErrorSource - attribute :file_hashes, TD::Types::Array.of(TD::Types::String) + attribute :file_hashes, TD::Types::Array.of(TD::Types::Coercible::String) end end diff --git a/lib/tdlib/types/input_passport_element_error_source/front_side.rb b/lib/tdlib/types/input_passport_element_error_source/front_side.rb index 526ff4bf..aa6bdd50 100644 --- a/lib/tdlib/types/input_passport_element_error_source/front_side.rb +++ b/lib/tdlib/types/input_passport_element_error_source/front_side.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_hash [String] Current hash of the file containing the front side. class InputPassportElementErrorSource::FrontSide < InputPassportElementErrorSource - attribute :file_hash, TD::Types::String + attribute :file_hash, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/input_passport_element_error_source/reverse_side.rb b/lib/tdlib/types/input_passport_element_error_source/reverse_side.rb index 5929ec12..28613a58 100644 --- a/lib/tdlib/types/input_passport_element_error_source/reverse_side.rb +++ b/lib/tdlib/types/input_passport_element_error_source/reverse_side.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_hash [String] Current hash of the file containing the reverse side. class InputPassportElementErrorSource::ReverseSide < InputPassportElementErrorSource - attribute :file_hash, TD::Types::String + attribute :file_hash, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/input_passport_element_error_source/selfie.rb b/lib/tdlib/types/input_passport_element_error_source/selfie.rb index 41254f14..79e5e2e3 100644 --- a/lib/tdlib/types/input_passport_element_error_source/selfie.rb +++ b/lib/tdlib/types/input_passport_element_error_source/selfie.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_hash [String] Current hash of the file containing the selfie. class InputPassportElementErrorSource::Selfie < InputPassportElementErrorSource - attribute :file_hash, TD::Types::String + attribute :file_hash, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/input_passport_element_error_source/translation_file.rb b/lib/tdlib/types/input_passport_element_error_source/translation_file.rb index fd5371ec..1b9b8b8c 100644 --- a/lib/tdlib/types/input_passport_element_error_source/translation_file.rb +++ b/lib/tdlib/types/input_passport_element_error_source/translation_file.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_hash [String] Current hash of the file containing the translation. class InputPassportElementErrorSource::TranslationFile < InputPassportElementErrorSource - attribute :file_hash, TD::Types::String + attribute :file_hash, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/input_passport_element_error_source/translation_files.rb b/lib/tdlib/types/input_passport_element_error_source/translation_files.rb index 725ad806..03b81c75 100644 --- a/lib/tdlib/types/input_passport_element_error_source/translation_files.rb +++ b/lib/tdlib/types/input_passport_element_error_source/translation_files.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_hashes [Array] Current hashes of all files with the translation. class InputPassportElementErrorSource::TranslationFiles < InputPassportElementErrorSource - attribute :file_hashes, TD::Types::Array.of(TD::Types::String) + attribute :file_hashes, TD::Types::Array.of(TD::Types::Coercible::String) end end diff --git a/lib/tdlib/types/input_passport_element_error_source/unspecified.rb b/lib/tdlib/types/input_passport_element_error_source/unspecified.rb index a33cc159..67adf1e8 100644 --- a/lib/tdlib/types/input_passport_element_error_source/unspecified.rb +++ b/lib/tdlib/types/input_passport_element_error_source/unspecified.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr element_hash [String] Current hash of the entire element. class InputPassportElementErrorSource::Unspecified < InputPassportElementErrorSource - attribute :element_hash, TD::Types::String + attribute :element_hash, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/input_sticker/animated.rb b/lib/tdlib/types/input_sticker/animated.rb index da891116..da21e16f 100644 --- a/lib/tdlib/types/input_sticker/animated.rb +++ b/lib/tdlib/types/input_sticker/animated.rb @@ -4,7 +4,7 @@ module TD::Types # @attr sticker [TD::Types::InputFile] File with the animated sticker. # Only local or uploaded within a week files are supported. # See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements. - # @attr emojis [String] Emojis corresponding to the sticker. + # @attr emojis [TD::Types::String] Emojis corresponding to the sticker. class InputSticker::Animated < InputSticker attribute :sticker, TD::Types::InputFile attribute :emojis, TD::Types::String diff --git a/lib/tdlib/types/input_sticker/static.rb b/lib/tdlib/types/input_sticker/static.rb index 20a1bd60..b5f52c13 100644 --- a/lib/tdlib/types/input_sticker/static.rb +++ b/lib/tdlib/types/input_sticker/static.rb @@ -3,7 +3,7 @@ module TD::Types # # @attr sticker [TD::Types::InputFile] PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 # square. - # @attr emojis [String] Emojis corresponding to the sticker. + # @attr emojis [TD::Types::String] Emojis corresponding to the sticker. # @attr mask_position [TD::Types::MaskPosition, nil] For masks, position where the mask should be placed; may be # null. class InputSticker::Static < InputSticker diff --git a/lib/tdlib/types/input_thumbnail.rb b/lib/tdlib/types/input_thumbnail.rb index 167ccd0b..11745565 100644 --- a/lib/tdlib/types/input_thumbnail.rb +++ b/lib/tdlib/types/input_thumbnail.rb @@ -10,7 +10,7 @@ module TD::Types # Use 0 if unknown. class InputThumbnail < Base attribute :thumbnail, TD::Types::InputFile - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/invoice.rb b/lib/tdlib/types/invoice.rb index 4a4408ad..f5a4b800 100644 --- a/lib/tdlib/types/invoice.rb +++ b/lib/tdlib/types/invoice.rb @@ -1,7 +1,7 @@ module TD::Types # Product invoice. # - # @attr currency [String] ISO 4217 currency code. + # @attr currency [TD::Types::String] ISO 4217 currency code. # @attr price_parts [Array] A list of objects used to calculate the total price of the # product. # @attr max_tip_amount [Integer] The maximum allowed amount of tip in the smallest units of the currency. @@ -17,8 +17,8 @@ module TD::Types class Invoice < Base attribute :currency, TD::Types::String attribute :price_parts, TD::Types::Array.of(TD::Types::LabeledPricePart) - attribute :max_tip_amount, TD::Types::Integer - attribute :suggested_tip_amounts, TD::Types::Array.of(TD::Types::Integer) + attribute :max_tip_amount, TD::Types::Coercible::Integer + attribute :suggested_tip_amounts, TD::Types::Array.of(TD::Types::Coercible::Integer) attribute :is_test, TD::Types::Bool attribute :need_name, TD::Types::Bool attribute :need_phone_number, TD::Types::Bool diff --git a/lib/tdlib/types/json_object_member.rb b/lib/tdlib/types/json_object_member.rb index 345b71b2..2224754f 100644 --- a/lib/tdlib/types/json_object_member.rb +++ b/lib/tdlib/types/json_object_member.rb @@ -1,7 +1,7 @@ module TD::Types # Represents one member of a JSON object. # - # @attr key [String] Member's key. + # @attr key [TD::Types::String] Member's key. # @attr value [TD::Types::JsonValue] Member's value. class JsonObjectMember < Base attribute :key, TD::Types::String diff --git a/lib/tdlib/types/json_value/number.rb b/lib/tdlib/types/json_value/number.rb index e97151b6..ef9d8ed1 100644 --- a/lib/tdlib/types/json_value/number.rb +++ b/lib/tdlib/types/json_value/number.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr value [Float] The value. class JsonValue::Number < JsonValue - attribute :value, TD::Types::Float + attribute :value, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/json_value/string.rb b/lib/tdlib/types/json_value/string.rb index 3be456c3..f63c2e66 100644 --- a/lib/tdlib/types/json_value/string.rb +++ b/lib/tdlib/types/json_value/string.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a string JSON value. # - # @attr value [String] The value. + # @attr value [TD::Types::String] The value. class JsonValue::String < JsonValue attribute :value, TD::Types::String end diff --git a/lib/tdlib/types/keyboard_button.rb b/lib/tdlib/types/keyboard_button.rb index e3117473..613b6106 100644 --- a/lib/tdlib/types/keyboard_button.rb +++ b/lib/tdlib/types/keyboard_button.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a single button in a bot keyboard. # - # @attr text [String] Text of the button. + # @attr text [TD::Types::String] Text of the button. # @attr type [TD::Types::KeyboardButtonType] Type of the button. class KeyboardButton < Base attribute :text, TD::Types::String diff --git a/lib/tdlib/types/labeled_price_part.rb b/lib/tdlib/types/labeled_price_part.rb index 01a5aad9..6dc66041 100644 --- a/lib/tdlib/types/labeled_price_part.rb +++ b/lib/tdlib/types/labeled_price_part.rb @@ -1,10 +1,10 @@ module TD::Types # Portion of the price of a product (e.g., "delivery cost", "tax amount"). # - # @attr label [String] Label for this portion of the product price. + # @attr label [TD::Types::String] Label for this portion of the product price. # @attr amount [Integer] Currency amount in the smallest units of the currency. class LabeledPricePart < Base attribute :label, TD::Types::String - attribute :amount, TD::Types::Integer + attribute :amount, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/language_pack_info.rb b/lib/tdlib/types/language_pack_info.rb index e40d9141..d70ac122 100644 --- a/lib/tdlib/types/language_pack_info.rb +++ b/lib/tdlib/types/language_pack_info.rb @@ -1,13 +1,13 @@ module TD::Types # Contains information about a language pack. # - # @attr id [String] Unique language pack identifier. - # @attr base_language_pack_id [String, nil] Identifier of a base language pack; may be empty. + # @attr id [TD::Types::String] Unique language pack identifier. + # @attr base_language_pack_id [TD::Types::String, nil] Identifier of a base language pack; may be empty. # If a string is missed in the language pack, then it should be fetched from base language pack. # Unsupported in custom language packs. - # @attr name [String] Language name. - # @attr native_name [String] Name of the language in that language. - # @attr plural_code [String] A language code to be used to apply plural forms. + # @attr name [TD::Types::String] Language name. + # @attr native_name [TD::Types::String] Name of the language in that language. + # @attr plural_code [TD::Types::String] A language code to be used to apply plural forms. # See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info. # @attr is_official [Boolean] True, if the language pack is official. # @attr is_rtl [Boolean] True, if the language pack strings are RTL. @@ -16,7 +16,8 @@ module TD::Types # @attr total_string_count [Integer] Total number of non-deleted strings from the language pack. # @attr translated_string_count [Integer] Total number of translated strings from the language pack. # @attr local_string_count [Integer] Total number of non-deleted strings from the language pack available locally. - # @attr translation_url [String, nil] Link to language translation interface; empty for custom local language packs. + # @attr translation_url [TD::Types::String, nil] Link to language translation interface; empty for custom local + # language packs. class LanguagePackInfo < Base attribute :id, TD::Types::String attribute :base_language_pack_id, TD::Types::String.optional.default(nil) @@ -27,9 +28,9 @@ class LanguagePackInfo < Base attribute :is_rtl, TD::Types::Bool attribute :is_beta, TD::Types::Bool attribute :is_installed, TD::Types::Bool - attribute :total_string_count, TD::Types::Integer - attribute :translated_string_count, TD::Types::Integer - attribute :local_string_count, TD::Types::Integer + attribute :total_string_count, TD::Types::Coercible::Integer + attribute :translated_string_count, TD::Types::Coercible::Integer + attribute :local_string_count, TD::Types::Coercible::Integer attribute :translation_url, TD::Types::String.optional.default(nil) end end diff --git a/lib/tdlib/types/language_pack_string.rb b/lib/tdlib/types/language_pack_string.rb index 219741b5..99873444 100644 --- a/lib/tdlib/types/language_pack_string.rb +++ b/lib/tdlib/types/language_pack_string.rb @@ -1,7 +1,7 @@ module TD::Types # Represents one language pack string. # - # @attr key [String] String key. + # @attr key [TD::Types::String] String key. # @attr value [TD::Types::LanguagePackStringValue] String value. class LanguagePackString < Base attribute :key, TD::Types::String diff --git a/lib/tdlib/types/language_pack_string_value/ordinary.rb b/lib/tdlib/types/language_pack_string_value/ordinary.rb index a5f6f71f..6216c52e 100644 --- a/lib/tdlib/types/language_pack_string_value/ordinary.rb +++ b/lib/tdlib/types/language_pack_string_value/ordinary.rb @@ -1,7 +1,7 @@ module TD::Types # An ordinary language pack string. # - # @attr value [String] String value. + # @attr value [TD::Types::String] String value. class LanguagePackStringValue::Ordinary < LanguagePackStringValue attribute :value, TD::Types::String end diff --git a/lib/tdlib/types/language_pack_string_value/pluralized.rb b/lib/tdlib/types/language_pack_string_value/pluralized.rb index 06b96c14..71e0ac62 100644 --- a/lib/tdlib/types/language_pack_string_value/pluralized.rb +++ b/lib/tdlib/types/language_pack_string_value/pluralized.rb @@ -2,12 +2,12 @@ module TD::Types # A language pack string which has different forms based on the number of some object it mentions. # See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info. # - # @attr zero_value [String] Value for zero objects. - # @attr one_value [String] Value for one object. - # @attr two_value [String] Value for two objects. - # @attr few_value [String] Value for few objects. - # @attr many_value [String] Value for many objects. - # @attr other_value [String] Default value. + # @attr zero_value [TD::Types::String] Value for zero objects. + # @attr one_value [TD::Types::String] Value for one object. + # @attr two_value [TD::Types::String] Value for two objects. + # @attr few_value [TD::Types::String] Value for few objects. + # @attr many_value [TD::Types::String] Value for many objects. + # @attr other_value [TD::Types::String] Default value. class LanguagePackStringValue::Pluralized < LanguagePackStringValue attribute :zero_value, TD::Types::String attribute :one_value, TD::Types::String diff --git a/lib/tdlib/types/local_file.rb b/lib/tdlib/types/local_file.rb index 70790dde..3ccddf4c 100644 --- a/lib/tdlib/types/local_file.rb +++ b/lib/tdlib/types/local_file.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a local file. # - # @attr path [String, nil] Local path to the locally available file part; may be empty. + # @attr path [TD::Types::String, nil] Local path to the locally available file part; may be empty. # @attr can_be_downloaded [Boolean] True, if it is possible to try to download or generate the file. # @attr can_be_deleted [Boolean] True, if the file can be deleted. # @attr is_downloading_active [Boolean] True, if the file is currently being downloaded (or a local copy is being @@ -21,8 +21,8 @@ class LocalFile < Base attribute :can_be_deleted, TD::Types::Bool attribute :is_downloading_active, TD::Types::Bool attribute :is_downloading_completed, TD::Types::Bool - attribute :download_offset, TD::Types::Integer - attribute :downloaded_prefix_size, TD::Types::Integer - attribute :downloaded_size, TD::Types::Integer + attribute :download_offset, TD::Types::Coercible::Integer + attribute :downloaded_prefix_size, TD::Types::Coercible::Integer + attribute :downloaded_size, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/location.rb b/lib/tdlib/types/location.rb index e898b467..05427777 100644 --- a/lib/tdlib/types/location.rb +++ b/lib/tdlib/types/location.rb @@ -7,8 +7,8 @@ module TD::Types # sender. # 0 if unknown. class Location < Base - attribute :latitude, TD::Types::Float - attribute :longitude, TD::Types::Float - attribute :horizontal_accuracy, TD::Types::Float + attribute :latitude, TD::Types::Coercible::Float + attribute :longitude, TD::Types::Coercible::Float + attribute :horizontal_accuracy, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/log_stream/file.rb b/lib/tdlib/types/log_stream/file.rb index 5cb41b6a..e819a2d2 100644 --- a/lib/tdlib/types/log_stream/file.rb +++ b/lib/tdlib/types/log_stream/file.rb @@ -1,14 +1,14 @@ module TD::Types # The log is written to a file. # - # @attr path [String] Path to the file to where the internal TDLib log will be written. + # @attr path [TD::Types::String] Path to the file to where the internal TDLib log will be written. # @attr max_file_size [Integer] The maximum size of the file to where the internal TDLib log is written before the # file will be auto-rotated. # @attr redirect_stderr [Boolean] Pass true to additionally redirect stderr to the log file. # Ignored on Windows. class LogStream::File < LogStream attribute :path, TD::Types::String - attribute :max_file_size, TD::Types::Integer + attribute :max_file_size, TD::Types::Coercible::Integer attribute :redirect_stderr, TD::Types::Bool end end diff --git a/lib/tdlib/types/log_tags.rb b/lib/tdlib/types/log_tags.rb index f0bce62f..2b7ea1c9 100644 --- a/lib/tdlib/types/log_tags.rb +++ b/lib/tdlib/types/log_tags.rb @@ -1,7 +1,7 @@ module TD::Types # Contains a list of available TDLib internal log tags. # - # @attr tags [Array] List of log tags. + # @attr tags [Array] List of log tags. class LogTags < Base attribute :tags, TD::Types::Array.of(TD::Types::String) end diff --git a/lib/tdlib/types/log_verbosity_level.rb b/lib/tdlib/types/log_verbosity_level.rb index 26e4c81d..cacf92c1 100644 --- a/lib/tdlib/types/log_verbosity_level.rb +++ b/lib/tdlib/types/log_verbosity_level.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr verbosity_level [Integer] Log verbosity level. class LogVerbosityLevel < Base - attribute :verbosity_level, TD::Types::Integer + attribute :verbosity_level, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/login_url_info/open.rb b/lib/tdlib/types/login_url_info/open.rb index f50d9c7e..fabdaaf0 100644 --- a/lib/tdlib/types/login_url_info/open.rb +++ b/lib/tdlib/types/login_url_info/open.rb @@ -1,7 +1,7 @@ module TD::Types # An HTTP url needs to be open. # - # @attr url [String] The URL to open. + # @attr url [TD::Types::String] The URL to open. # @attr skip_confirm [Boolean] True, if there is no need to show an ordinary open URL confirm. class LoginUrlInfo::Open < LoginUrlInfo attribute :url, TD::Types::String diff --git a/lib/tdlib/types/login_url_info/request_confirmation.rb b/lib/tdlib/types/login_url_info/request_confirmation.rb index de14dc16..1041d5ed 100644 --- a/lib/tdlib/types/login_url_info/request_confirmation.rb +++ b/lib/tdlib/types/login_url_info/request_confirmation.rb @@ -1,15 +1,15 @@ module TD::Types # An authorization confirmation dialog needs to be shown to the user. # - # @attr url [String] An HTTP URL to be opened. - # @attr domain [String] A domain of the URL. + # @attr url [TD::Types::String] An HTTP URL to be opened. + # @attr domain [TD::Types::String] A domain of the URL. # @attr bot_user_id [Integer] User identifier of a bot linked with the website. # @attr request_write_access [Boolean] True, if the user needs to be requested to give the permission to the bot to # send them messages. class LoginUrlInfo::RequestConfirmation < LoginUrlInfo attribute :url, TD::Types::String attribute :domain, TD::Types::String - attribute :bot_user_id, TD::Types::Integer + attribute :bot_user_id, TD::Types::Coercible::Integer attribute :request_write_access, TD::Types::Bool end end diff --git a/lib/tdlib/types/mask_position.rb b/lib/tdlib/types/mask_position.rb index 4305d836..44df2119 100644 --- a/lib/tdlib/types/mask_position.rb +++ b/lib/tdlib/types/mask_position.rb @@ -10,8 +10,8 @@ module TD::Types # (For example, 2.0 means a doubled size). class MaskPosition < Base attribute :point, TD::Types::MaskPoint - attribute :x_shift, TD::Types::Float - attribute :y_shift, TD::Types::Float - attribute :scale, TD::Types::Float + attribute :x_shift, TD::Types::Coercible::Float + attribute :y_shift, TD::Types::Coercible::Float + attribute :scale, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/message.rb b/lib/tdlib/types/message.rb index cb239465..44a0a8e3 100644 --- a/lib/tdlib/types/message.rb +++ b/lib/tdlib/types/message.rb @@ -37,17 +37,18 @@ module TD::Types # TDLib will send {TD::Types::Update::DeleteMessages} or {TD::Types::Update::MessageContent} once the TTL expires. # @attr ttl_expires_in [Float] Time left before the message expires, in seconds. # @attr via_bot_user_id [Integer] If non-zero, the user identifier of the bot through which this message was sent. - # @attr author_signature [String, nil] For channel posts and anonymous group messages, optional author signature. + # @attr author_signature [TD::Types::String, nil] For channel posts and anonymous group messages, optional author + # signature. # @attr media_album_id [Integer] Unique identifier of an album this message belongs to. # Only audios, documents, photos and videos can be grouped together in albums. - # @attr restriction_reason [String] If non-empty, contains a human-readable description of the reason why access to - # this message must be restricted. + # @attr restriction_reason [TD::Types::String] If non-empty, contains a human-readable description of the reason why + # access to this message must be restricted. # @attr content [TD::Types::MessageContent] Content of the message. # @attr reply_markup [TD::Types::ReplyMarkup, nil] Reply markup for the message; may be null. class Message < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :sender, TD::Types::MessageSender - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :sending_state, TD::Types::MessageSendingState.optional.default(nil) attribute :scheduling_state, TD::Types::MessageSchedulingState.optional.default(nil) attribute :is_outgoing, TD::Types::Bool @@ -60,18 +61,18 @@ class Message < Base attribute :can_get_message_thread, TD::Types::Bool attribute :is_channel_post, TD::Types::Bool attribute :contains_unread_mention, TD::Types::Bool - attribute :date, TD::Types::Integer - attribute :edit_date, TD::Types::Integer + attribute :date, TD::Types::Coercible::Integer + attribute :edit_date, TD::Types::Coercible::Integer attribute :forward_info, TD::Types::MessageForwardInfo.optional.default(nil) attribute :interaction_info, TD::Types::MessageInteractionInfo.optional.default(nil) - attribute :reply_in_chat_id, TD::Types::Integer - attribute :reply_to_message_id, TD::Types::Integer - attribute :message_thread_id, TD::Types::Integer - attribute :ttl, TD::Types::Integer - attribute :ttl_expires_in, TD::Types::Float - attribute :via_bot_user_id, TD::Types::Integer + attribute :reply_in_chat_id, TD::Types::Coercible::Integer + attribute :reply_to_message_id, TD::Types::Coercible::Integer + attribute :message_thread_id, TD::Types::Coercible::Integer + attribute :ttl, TD::Types::Coercible::Integer + attribute :ttl_expires_in, TD::Types::Coercible::Float + attribute :via_bot_user_id, TD::Types::Coercible::Integer attribute :author_signature, TD::Types::String.optional.default(nil) - attribute :media_album_id, TD::Types::Integer + attribute :media_album_id, TD::Types::Coercible::Integer attribute :restriction_reason, TD::Types::String attribute :content, TD::Types::MessageContent attribute :reply_markup, TD::Types::ReplyMarkup.optional.default(nil) diff --git a/lib/tdlib/types/message_content/basic_group_chat_create.rb b/lib/tdlib/types/message_content/basic_group_chat_create.rb index 3915ba1a..22ec746b 100644 --- a/lib/tdlib/types/message_content/basic_group_chat_create.rb +++ b/lib/tdlib/types/message_content/basic_group_chat_create.rb @@ -1,10 +1,10 @@ module TD::Types # A newly created basic group. # - # @attr title [String] Title of the basic group. + # @attr title [TD::Types::String] Title of the basic group. # @attr member_user_ids [Array] User identifiers of members in the basic group. class MessageContent::BasicGroupChatCreate < MessageContent attribute :title, TD::Types::String - attribute :member_user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :member_user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/message_content/call.rb b/lib/tdlib/types/message_content/call.rb index b2dedffd..d691e2d7 100644 --- a/lib/tdlib/types/message_content/call.rb +++ b/lib/tdlib/types/message_content/call.rb @@ -7,6 +7,6 @@ module TD::Types class MessageContent::Call < MessageContent attribute :is_video, TD::Types::Bool attribute :discard_reason, TD::Types::CallDiscardReason - attribute :duration, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/chat_add_members.rb b/lib/tdlib/types/message_content/chat_add_members.rb index 8b39dc30..2483739e 100644 --- a/lib/tdlib/types/message_content/chat_add_members.rb +++ b/lib/tdlib/types/message_content/chat_add_members.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr member_user_ids [Array] User identifiers of the new members. class MessageContent::ChatAddMembers < MessageContent - attribute :member_user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :member_user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/message_content/chat_change_title.rb b/lib/tdlib/types/message_content/chat_change_title.rb index d01f50c8..3dd13a42 100644 --- a/lib/tdlib/types/message_content/chat_change_title.rb +++ b/lib/tdlib/types/message_content/chat_change_title.rb @@ -1,7 +1,7 @@ module TD::Types # An updated chat title. # - # @attr title [String] New chat title. + # @attr title [TD::Types::String] New chat title. class MessageContent::ChatChangeTitle < MessageContent attribute :title, TD::Types::String end diff --git a/lib/tdlib/types/message_content/chat_delete_member.rb b/lib/tdlib/types/message_content/chat_delete_member.rb index 614875b6..d2fef3c3 100644 --- a/lib/tdlib/types/message_content/chat_delete_member.rb +++ b/lib/tdlib/types/message_content/chat_delete_member.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr user_id [Integer] User identifier of the deleted chat member. class MessageContent::ChatDeleteMember < MessageContent - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/chat_set_ttl.rb b/lib/tdlib/types/message_content/chat_set_ttl.rb index 3c787d1d..2af886db 100644 --- a/lib/tdlib/types/message_content/chat_set_ttl.rb +++ b/lib/tdlib/types/message_content/chat_set_ttl.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr ttl [Integer] New message TTL setting. class MessageContent::ChatSetTtl < MessageContent - attribute :ttl, TD::Types::Integer + attribute :ttl, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/chat_upgrade_from.rb b/lib/tdlib/types/message_content/chat_upgrade_from.rb index 10889a5f..a19eabfb 100644 --- a/lib/tdlib/types/message_content/chat_upgrade_from.rb +++ b/lib/tdlib/types/message_content/chat_upgrade_from.rb @@ -1,10 +1,10 @@ module TD::Types # A supergroup has been created from a basic group. # - # @attr title [String] Title of the newly created supergroup. + # @attr title [TD::Types::String] Title of the newly created supergroup. # @attr basic_group_id [Integer] The identifier of the original basic group. class MessageContent::ChatUpgradeFrom < MessageContent attribute :title, TD::Types::String - attribute :basic_group_id, TD::Types::Integer + attribute :basic_group_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/chat_upgrade_to.rb b/lib/tdlib/types/message_content/chat_upgrade_to.rb index b9bdedf4..b3d2ac7e 100644 --- a/lib/tdlib/types/message_content/chat_upgrade_to.rb +++ b/lib/tdlib/types/message_content/chat_upgrade_to.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr supergroup_id [Integer] Identifier of the supergroup to which the basic group was upgraded. class MessageContent::ChatUpgradeTo < MessageContent - attribute :supergroup_id, TD::Types::Integer + attribute :supergroup_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/custom_service_action.rb b/lib/tdlib/types/message_content/custom_service_action.rb index 1cfea9f7..1017c2bd 100644 --- a/lib/tdlib/types/message_content/custom_service_action.rb +++ b/lib/tdlib/types/message_content/custom_service_action.rb @@ -1,7 +1,7 @@ module TD::Types # A non-standard action has happened in the chat. # - # @attr text [String] Message text to be shown in the chat. + # @attr text [TD::Types::String] Message text to be shown in the chat. class MessageContent::CustomServiceAction < MessageContent attribute :text, TD::Types::String end diff --git a/lib/tdlib/types/message_content/dice.rb b/lib/tdlib/types/message_content/dice.rb index 9c35567d..436498b1 100644 --- a/lib/tdlib/types/message_content/dice.rb +++ b/lib/tdlib/types/message_content/dice.rb @@ -8,7 +8,7 @@ module TD::Types # @attr final_state [TD::Types::DiceStickers, nil] The animated stickers with the final dice animation; may be null # if unknown. # {TD::Types::Update::MessageContent} will be sent when the sticker became known. - # @attr emoji [String] Emoji on which the dice throw animation is based. + # @attr emoji [TD::Types::String] Emoji on which the dice throw animation is based. # @attr value [Integer] The dice value. # If the value is 0, the dice don't have final state yet. # @attr success_animation_frame_number [Integer] Number of frame after which a success animation like a shower of @@ -17,7 +17,7 @@ class MessageContent::Dice < MessageContent attribute :initial_state, TD::Types::DiceStickers.optional.default(nil) attribute :final_state, TD::Types::DiceStickers.optional.default(nil) attribute :emoji, TD::Types::String - attribute :value, TD::Types::Integer - attribute :success_animation_frame_number, TD::Types::Integer + attribute :value, TD::Types::Coercible::Integer + attribute :success_animation_frame_number, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/game_score.rb b/lib/tdlib/types/message_content/game_score.rb index 39c24cb6..227b3e8d 100644 --- a/lib/tdlib/types/message_content/game_score.rb +++ b/lib/tdlib/types/message_content/game_score.rb @@ -6,8 +6,8 @@ module TD::Types # game. # @attr score [Integer] New score. class MessageContent::GameScore < MessageContent - attribute :game_message_id, TD::Types::Integer - attribute :game_id, TD::Types::Integer - attribute :score, TD::Types::Integer + attribute :game_message_id, TD::Types::Coercible::Integer + attribute :game_id, TD::Types::Coercible::Integer + attribute :score, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/invite_voice_chat_participants.rb b/lib/tdlib/types/message_content/invite_voice_chat_participants.rb index 05964bd8..348e6e46 100644 --- a/lib/tdlib/types/message_content/invite_voice_chat_participants.rb +++ b/lib/tdlib/types/message_content/invite_voice_chat_participants.rb @@ -5,7 +5,7 @@ module TD::Types # The voice chat can be received through the method getGroupCall. # @attr user_ids [Array] Invited user identifiers. class MessageContent::InviteVoiceChatParticipants < MessageContent - attribute :group_call_id, TD::Types::Integer - attribute :user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :group_call_id, TD::Types::Coercible::Integer + attribute :user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/message_content/invoice.rb b/lib/tdlib/types/message_content/invoice.rb index e049e3f7..24032bfb 100644 --- a/lib/tdlib/types/message_content/invoice.rb +++ b/lib/tdlib/types/message_content/invoice.rb @@ -1,12 +1,12 @@ module TD::Types # A message with an invoice from a bot. # - # @attr title [String] Product title. - # @attr description [String] Product description. + # @attr title [TD::Types::String] Product title. + # @attr description [TD::Types::String] Product description. # @attr photo [TD::Types::Photo, nil] Product photo; may be null. - # @attr currency [String] Currency for the product price. + # @attr currency [TD::Types::String] Currency for the product price. # @attr total_amount [Integer] Product total price in the smallest units of the currency. - # @attr start_parameter [String] Unique invoice bot start_parameter. + # @attr start_parameter [TD::Types::String] Unique invoice bot start_parameter. # To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter}. # @attr is_test [Boolean] True, if the invoice is a test invoice. # @attr need_shipping_address [Boolean] True, if the shipping address should be specified. @@ -17,10 +17,10 @@ class MessageContent::Invoice < MessageContent attribute :description, TD::Types::String attribute :photo, TD::Types::Photo.optional.default(nil) attribute :currency, TD::Types::String - attribute :total_amount, TD::Types::Integer + attribute :total_amount, TD::Types::Coercible::Integer attribute :start_parameter, TD::Types::String attribute :is_test, TD::Types::Bool attribute :need_shipping_address, TD::Types::Bool - attribute :receipt_message_id, TD::Types::Integer + attribute :receipt_message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/location.rb b/lib/tdlib/types/message_content/location.rb index 7c94555a..c6bd32ec 100644 --- a/lib/tdlib/types/message_content/location.rb +++ b/lib/tdlib/types/message_content/location.rb @@ -14,9 +14,9 @@ module TD::Types # Available only for the message sender. class MessageContent::Location < MessageContent attribute :location, TD::Types::Location - attribute :live_period, TD::Types::Integer - attribute :expires_in, TD::Types::Integer - attribute :heading, TD::Types::Integer - attribute :proximity_alert_radius, TD::Types::Integer + attribute :live_period, TD::Types::Coercible::Integer + attribute :expires_in, TD::Types::Coercible::Integer + attribute :heading, TD::Types::Coercible::Integer + attribute :proximity_alert_radius, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/payment_successful.rb b/lib/tdlib/types/message_content/payment_successful.rb index aedc7f8f..10123127 100644 --- a/lib/tdlib/types/message_content/payment_successful.rb +++ b/lib/tdlib/types/message_content/payment_successful.rb @@ -4,12 +4,12 @@ module TD::Types # @attr invoice_chat_id [Integer] Identifier of the chat, containing the corresponding invoice message; 0 if unknown. # @attr invoice_message_id [Integer] Identifier of the message with the corresponding invoice; can be an identifier # of a deleted message. - # @attr currency [String] Currency for the price of the product. + # @attr currency [TD::Types::String] Currency for the price of the product. # @attr total_amount [Integer] Total price for the product, in the smallest units of the currency. class MessageContent::PaymentSuccessful < MessageContent - attribute :invoice_chat_id, TD::Types::Integer - attribute :invoice_message_id, TD::Types::Integer + attribute :invoice_chat_id, TD::Types::Coercible::Integer + attribute :invoice_message_id, TD::Types::Coercible::Integer attribute :currency, TD::Types::String - attribute :total_amount, TD::Types::Integer + attribute :total_amount, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/payment_successful_bot.rb b/lib/tdlib/types/message_content/payment_successful_bot.rb index c4df8940..f1347435 100644 --- a/lib/tdlib/types/message_content/payment_successful_bot.rb +++ b/lib/tdlib/types/message_content/payment_successful_bot.rb @@ -1,18 +1,18 @@ module TD::Types # A payment has been completed; for bots only. # - # @attr currency [String] Currency for price of the product. + # @attr currency [TD::Types::String] Currency for price of the product. # @attr total_amount [Integer] Total price for the product, in the smallest units of the currency. # @attr invoice_payload [String] Invoice payload. - # @attr shipping_option_id [String, nil] Identifier of the shipping option chosen by the user; may be empty if not - # applicable. + # @attr shipping_option_id [TD::Types::String, nil] Identifier of the shipping option chosen by the user; may be + # empty if not applicable. # @attr order_info [TD::Types::OrderInfo, nil] Information about the order; may be null. - # @attr telegram_payment_charge_id [String] Telegram payment identifier. - # @attr provider_payment_charge_id [String] Provider payment identifier. + # @attr telegram_payment_charge_id [TD::Types::String] Telegram payment identifier. + # @attr provider_payment_charge_id [TD::Types::String] Provider payment identifier. class MessageContent::PaymentSuccessfulBot < MessageContent attribute :currency, TD::Types::String - attribute :total_amount, TD::Types::Integer - attribute :invoice_payload, TD::Types::String + attribute :total_amount, TD::Types::Coercible::Integer + attribute :invoice_payload, TD::Types::Coercible::String attribute :shipping_option_id, TD::Types::String.optional.default(nil) attribute :order_info, TD::Types::OrderInfo.optional.default(nil) attribute :telegram_payment_charge_id, TD::Types::String diff --git a/lib/tdlib/types/message_content/pin_message.rb b/lib/tdlib/types/message_content/pin_message.rb index f0f17bfd..fe8fdc1e 100644 --- a/lib/tdlib/types/message_content/pin_message.rb +++ b/lib/tdlib/types/message_content/pin_message.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr message_id [Integer] Identifier of the pinned message, can be an identifier of a deleted message or 0. class MessageContent::PinMessage < MessageContent - attribute :message_id, TD::Types::Integer + attribute :message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/proximity_alert_triggered.rb b/lib/tdlib/types/message_content/proximity_alert_triggered.rb index 081d4428..128c5502 100644 --- a/lib/tdlib/types/message_content/proximity_alert_triggered.rb +++ b/lib/tdlib/types/message_content/proximity_alert_triggered.rb @@ -7,6 +7,6 @@ module TD::Types class MessageContent::ProximityAlertTriggered < MessageContent attribute :traveler, TD::Types::MessageSender attribute :watcher, TD::Types::MessageSender - attribute :distance, TD::Types::Integer + attribute :distance, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/supergroup_chat_create.rb b/lib/tdlib/types/message_content/supergroup_chat_create.rb index 9e283093..16e3b173 100644 --- a/lib/tdlib/types/message_content/supergroup_chat_create.rb +++ b/lib/tdlib/types/message_content/supergroup_chat_create.rb @@ -1,7 +1,7 @@ module TD::Types # A newly created supergroup or channel. # - # @attr title [String] Title of the supergroup or channel. + # @attr title [TD::Types::String] Title of the supergroup or channel. class MessageContent::SupergroupChatCreate < MessageContent attribute :title, TD::Types::String end diff --git a/lib/tdlib/types/message_content/voice_chat_ended.rb b/lib/tdlib/types/message_content/voice_chat_ended.rb index 61ee1426..57193d03 100644 --- a/lib/tdlib/types/message_content/voice_chat_ended.rb +++ b/lib/tdlib/types/message_content/voice_chat_ended.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr duration [Integer] Call duration. class MessageContent::VoiceChatEnded < MessageContent - attribute :duration, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/voice_chat_scheduled.rb b/lib/tdlib/types/message_content/voice_chat_scheduled.rb index a55d2b7a..e876918b 100644 --- a/lib/tdlib/types/message_content/voice_chat_scheduled.rb +++ b/lib/tdlib/types/message_content/voice_chat_scheduled.rb @@ -6,7 +6,7 @@ module TD::Types # @attr start_date [Integer] Point in time (Unix timestamp) when the group call is supposed to be started by an # administrator. class MessageContent::VoiceChatScheduled < MessageContent - attribute :group_call_id, TD::Types::Integer - attribute :start_date, TD::Types::Integer + attribute :group_call_id, TD::Types::Coercible::Integer + attribute :start_date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/voice_chat_started.rb b/lib/tdlib/types/message_content/voice_chat_started.rb index c3584f24..732a2783 100644 --- a/lib/tdlib/types/message_content/voice_chat_started.rb +++ b/lib/tdlib/types/message_content/voice_chat_started.rb @@ -4,6 +4,6 @@ module TD::Types # @attr group_call_id [Integer] Identifier of the voice chat. # The voice chat can be received through the method getGroupCall. class MessageContent::VoiceChatStarted < MessageContent - attribute :group_call_id, TD::Types::Integer + attribute :group_call_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_content/website_connected.rb b/lib/tdlib/types/message_content/website_connected.rb index 8bb88812..b42cbed5 100644 --- a/lib/tdlib/types/message_content/website_connected.rb +++ b/lib/tdlib/types/message_content/website_connected.rb @@ -1,7 +1,7 @@ module TD::Types # The current user has connected a website by logging in using Telegram Login Widget on it. # - # @attr domain_name [String] Domain name of the connected website. + # @attr domain_name [TD::Types::String] Domain name of the connected website. class MessageContent::WebsiteConnected < MessageContent attribute :domain_name, TD::Types::String end diff --git a/lib/tdlib/types/message_file_type/group.rb b/lib/tdlib/types/message_file_type/group.rb index 0e9b0e7d..425c9539 100644 --- a/lib/tdlib/types/message_file_type/group.rb +++ b/lib/tdlib/types/message_file_type/group.rb @@ -1,7 +1,7 @@ module TD::Types # The messages was exported from a group chat. # - # @attr title [String, nil] Title of the group chat; may be empty if unrecognized. + # @attr title [TD::Types::String, nil] Title of the group chat; may be empty if unrecognized. class MessageFileType::Group < MessageFileType attribute :title, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/message_file_type/private.rb b/lib/tdlib/types/message_file_type/private.rb index 709ff7c3..4070935f 100644 --- a/lib/tdlib/types/message_file_type/private.rb +++ b/lib/tdlib/types/message_file_type/private.rb @@ -1,7 +1,7 @@ module TD::Types # The messages was exported from a private chat. # - # @attr name [String, nil] Name of the other party; may be empty if unrecognized. + # @attr name [TD::Types::String, nil] Name of the other party; may be empty if unrecognized. class MessageFileType::Private < MessageFileType attribute :name, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/message_forward_info.rb b/lib/tdlib/types/message_forward_info.rb index 00052d66..6d0a8dc9 100644 --- a/lib/tdlib/types/message_forward_info.rb +++ b/lib/tdlib/types/message_forward_info.rb @@ -3,8 +3,8 @@ module TD::Types # # @attr origin [TD::Types::MessageForwardOrigin] Origin of a forwarded message. # @attr date [Integer] Point in time (Unix timestamp) when the message was originally sent. - # @attr public_service_announcement_type [String] The type of a public service announcement for the forwarded - # message. + # @attr public_service_announcement_type [TD::Types::String] The type of a public service announcement for the + # forwarded message. # @attr from_chat_id [Integer] For messages forwarded to the chat with the current user (Saved Messages), to the # Replies bot chat, or to the channel's discussion group, the identifier of the chat from which the message was forwarded # last time; 0 if unknown. @@ -13,9 +13,9 @@ module TD::Types # message was forwarded last time; 0 if unknown. class MessageForwardInfo < Base attribute :origin, TD::Types::MessageForwardOrigin - attribute :date, TD::Types::Integer + attribute :date, TD::Types::Coercible::Integer attribute :public_service_announcement_type, TD::Types::String - attribute :from_chat_id, TD::Types::Integer - attribute :from_message_id, TD::Types::Integer + attribute :from_chat_id, TD::Types::Coercible::Integer + attribute :from_message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_forward_origin/channel.rb b/lib/tdlib/types/message_forward_origin/channel.rb index f39d339a..4dd4732a 100644 --- a/lib/tdlib/types/message_forward_origin/channel.rb +++ b/lib/tdlib/types/message_forward_origin/channel.rb @@ -3,10 +3,10 @@ module TD::Types # # @attr chat_id [Integer] Identifier of the chat from which the message was originally forwarded. # @attr message_id [Integer] Message identifier of the original message. - # @attr author_signature [String] Original post author signature. + # @attr author_signature [TD::Types::String] Original post author signature. class MessageForwardOrigin::Channel < MessageForwardOrigin - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer attribute :author_signature, TD::Types::String end end diff --git a/lib/tdlib/types/message_forward_origin/chat.rb b/lib/tdlib/types/message_forward_origin/chat.rb index 75890075..9e102ec7 100644 --- a/lib/tdlib/types/message_forward_origin/chat.rb +++ b/lib/tdlib/types/message_forward_origin/chat.rb @@ -2,9 +2,9 @@ module TD::Types # The message was originally sent by an anonymous chat administrator on behalf of the chat. # # @attr sender_chat_id [Integer] Identifier of the chat that originally sent the message. - # @attr author_signature [String] Original message author signature. + # @attr author_signature [TD::Types::String] Original message author signature. class MessageForwardOrigin::Chat < MessageForwardOrigin - attribute :sender_chat_id, TD::Types::Integer + attribute :sender_chat_id, TD::Types::Coercible::Integer attribute :author_signature, TD::Types::String end end diff --git a/lib/tdlib/types/message_forward_origin/hidden_user.rb b/lib/tdlib/types/message_forward_origin/hidden_user.rb index 5d7de02c..a7864ca5 100644 --- a/lib/tdlib/types/message_forward_origin/hidden_user.rb +++ b/lib/tdlib/types/message_forward_origin/hidden_user.rb @@ -1,7 +1,7 @@ module TD::Types # The message was originally sent by a user, which is hidden by their privacy settings. # - # @attr sender_name [String] Name of the sender. + # @attr sender_name [TD::Types::String] Name of the sender. class MessageForwardOrigin::HiddenUser < MessageForwardOrigin attribute :sender_name, TD::Types::String end diff --git a/lib/tdlib/types/message_forward_origin/message_import.rb b/lib/tdlib/types/message_forward_origin/message_import.rb index bfd3c5d4..a43c3e9d 100644 --- a/lib/tdlib/types/message_forward_origin/message_import.rb +++ b/lib/tdlib/types/message_forward_origin/message_import.rb @@ -1,7 +1,7 @@ module TD::Types # The message was imported from an exported message history. # - # @attr sender_name [String] Name of the sender. + # @attr sender_name [TD::Types::String] Name of the sender. class MessageForwardOrigin::MessageImport < MessageForwardOrigin attribute :sender_name, TD::Types::String end diff --git a/lib/tdlib/types/message_forward_origin/user.rb b/lib/tdlib/types/message_forward_origin/user.rb index a55eefab..4393485d 100644 --- a/lib/tdlib/types/message_forward_origin/user.rb +++ b/lib/tdlib/types/message_forward_origin/user.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr sender_user_id [Integer] Identifier of the user that originally sent the message. class MessageForwardOrigin::User < MessageForwardOrigin - attribute :sender_user_id, TD::Types::Integer + attribute :sender_user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_interaction_info.rb b/lib/tdlib/types/message_interaction_info.rb index 188e0bc9..3a2691d4 100644 --- a/lib/tdlib/types/message_interaction_info.rb +++ b/lib/tdlib/types/message_interaction_info.rb @@ -8,8 +8,8 @@ module TD::Types # Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which # are not replies itself. class MessageInteractionInfo < Base - attribute :view_count, TD::Types::Integer - attribute :forward_count, TD::Types::Integer + attribute :view_count, TD::Types::Coercible::Integer + attribute :forward_count, TD::Types::Coercible::Integer attribute :reply_info, TD::Types::MessageReplyInfo.optional.default(nil) end end diff --git a/lib/tdlib/types/message_link.rb b/lib/tdlib/types/message_link.rb index 1ad70ac1..da3b0381 100644 --- a/lib/tdlib/types/message_link.rb +++ b/lib/tdlib/types/message_link.rb @@ -1,7 +1,7 @@ module TD::Types # Contains an HTTPS link to a message in a supergroup or channel. # - # @attr link [String] Message link. + # @attr link [TD::Types::String] Message link. # @attr is_public [Boolean] True, if the link will work for non-members of the chat. class MessageLink < Base attribute :link, TD::Types::String diff --git a/lib/tdlib/types/message_link_info.rb b/lib/tdlib/types/message_link_info.rb index 08c0f209..839932d9 100644 --- a/lib/tdlib/types/message_link_info.rb +++ b/lib/tdlib/types/message_link_info.rb @@ -8,7 +8,7 @@ module TD::Types # @attr for_comment [Boolean] True, if the message is linked as a channel post comment or from a message thread. class MessageLinkInfo < Base attribute :is_public, TD::Types::Bool - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :message, TD::Types::Message.optional.default(nil) attribute :for_album, TD::Types::Bool attribute :for_comment, TD::Types::Bool diff --git a/lib/tdlib/types/message_reply_info.rb b/lib/tdlib/types/message_reply_info.rb index 86ffa43e..3e10fd0f 100644 --- a/lib/tdlib/types/message_reply_info.rb +++ b/lib/tdlib/types/message_reply_info.rb @@ -8,10 +8,10 @@ module TD::Types # @attr last_read_outbox_message_id [Integer] Identifier of the last read outgoing reply to the message. # @attr last_message_id [Integer] Identifier of the last reply to the message. class MessageReplyInfo < Base - attribute :reply_count, TD::Types::Integer + attribute :reply_count, TD::Types::Coercible::Integer attribute :recent_repliers, TD::Types::Array.of(TD::Types::MessageSender) - attribute :last_read_inbox_message_id, TD::Types::Integer - attribute :last_read_outbox_message_id, TD::Types::Integer - attribute :last_message_id, TD::Types::Integer + attribute :last_read_inbox_message_id, TD::Types::Coercible::Integer + attribute :last_read_outbox_message_id, TD::Types::Coercible::Integer + attribute :last_message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_scheduling_state/send_at_date.rb b/lib/tdlib/types/message_scheduling_state/send_at_date.rb index 93c0c2ad..d41aa294 100644 --- a/lib/tdlib/types/message_scheduling_state/send_at_date.rb +++ b/lib/tdlib/types/message_scheduling_state/send_at_date.rb @@ -4,6 +4,6 @@ module TD::Types # @attr send_date [Integer] Date the message will be sent. # The date must be within 367 days in the future. class MessageSchedulingState::SendAtDate < MessageSchedulingState - attribute :send_date, TD::Types::Integer + attribute :send_date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_sender/chat.rb b/lib/tdlib/types/message_sender/chat.rb index ebb99222..3966b4ad 100644 --- a/lib/tdlib/types/message_sender/chat.rb +++ b/lib/tdlib/types/message_sender/chat.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr chat_id [Integer] Identifier of the chat that sent the message. class MessageSender::Chat < MessageSender - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_sender/user.rb b/lib/tdlib/types/message_sender/user.rb index abf76171..04fa97f4 100644 --- a/lib/tdlib/types/message_sender/user.rb +++ b/lib/tdlib/types/message_sender/user.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr user_id [Integer] Identifier of the user that sent the message. class MessageSender::User < MessageSender - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/message_senders.rb b/lib/tdlib/types/message_senders.rb index ce9d4f4b..159339bb 100644 --- a/lib/tdlib/types/message_senders.rb +++ b/lib/tdlib/types/message_senders.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total count of messages senders found. # @attr senders [Array] List of message senders. class MessageSenders < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :senders, TD::Types::Array.of(TD::Types::MessageSender) end end diff --git a/lib/tdlib/types/message_sending_state/failed.rb b/lib/tdlib/types/message_sending_state/failed.rb index f66e04b4..22a0e94e 100644 --- a/lib/tdlib/types/message_sending_state/failed.rb +++ b/lib/tdlib/types/message_sending_state/failed.rb @@ -2,14 +2,14 @@ module TD::Types # The message failed to be sent. # # @attr error_code [Integer] An error code; 0 if unknown. - # @attr error_message [String] Error message. + # @attr error_message [TD::Types::String] Error message. # @attr can_retry [Boolean] True, if the message can be re-sent. # @attr retry_after [Float] Time left before the message can be re-sent, in seconds. # No update is sent when this field changes. class MessageSendingState::Failed < MessageSendingState - attribute :error_code, TD::Types::Integer + attribute :error_code, TD::Types::Coercible::Integer attribute :error_message, TD::Types::String attribute :can_retry, TD::Types::Bool - attribute :retry_after, TD::Types::Float + attribute :retry_after, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/message_thread_info.rb b/lib/tdlib/types/message_thread_info.rb index 6820bc7c..b70b9fe1 100644 --- a/lib/tdlib/types/message_thread_info.rb +++ b/lib/tdlib/types/message_thread_info.rb @@ -8,8 +8,8 @@ module TD::Types # The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). # @attr draft_message [TD::Types::DraftMessage, nil] A draft of a message in the message thread; may be null. class MessageThreadInfo < Base - attribute :chat_id, TD::Types::Integer - attribute :message_thread_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_thread_id, TD::Types::Coercible::Integer attribute :reply_info, TD::Types::MessageReplyInfo attribute :messages, TD::Types::Array.of(TD::Types::Message) attribute :draft_message, TD::Types::DraftMessage.optional.default(nil) diff --git a/lib/tdlib/types/messages.rb b/lib/tdlib/types/messages.rb index 0e92b44e..4d63f718 100644 --- a/lib/tdlib/types/messages.rb +++ b/lib/tdlib/types/messages.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total count of messages found. # @attr messages [Array, nil] List of messages; messages may be null. class Messages < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :messages, TD::Types::Array.of(TD::Types::Message).optional.default(nil) end end diff --git a/lib/tdlib/types/minithumbnail.rb b/lib/tdlib/types/minithumbnail.rb index f9b00a0c..67299110 100644 --- a/lib/tdlib/types/minithumbnail.rb +++ b/lib/tdlib/types/minithumbnail.rb @@ -5,8 +5,8 @@ module TD::Types # @attr height [Integer] Thumbnail height, usually doesn't exceed 40. # @attr data [String] The thumbnail in JPEG format. class Minithumbnail < Base - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer - attribute :data, TD::Types::String + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer + attribute :data, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/network_statistics.rb b/lib/tdlib/types/network_statistics.rb index 14478297..d595fa1f 100644 --- a/lib/tdlib/types/network_statistics.rb +++ b/lib/tdlib/types/network_statistics.rb @@ -4,7 +4,7 @@ module TD::Types # @attr since_date [Integer] Point in time (Unix timestamp) from which the statistics are collected. # @attr entries [Array] Network statistics entries. class NetworkStatistics < Base - attribute :since_date, TD::Types::Integer + attribute :since_date, TD::Types::Coercible::Integer attribute :entries, TD::Types::Array.of(TD::Types::NetworkStatisticsEntry) end end diff --git a/lib/tdlib/types/network_statistics_entry/call.rb b/lib/tdlib/types/network_statistics_entry/call.rb index 17b7c12b..2a8805be 100644 --- a/lib/tdlib/types/network_statistics_entry/call.rb +++ b/lib/tdlib/types/network_statistics_entry/call.rb @@ -8,8 +8,8 @@ module TD::Types # @attr duration [Float] Total call duration, in seconds. class NetworkStatisticsEntry::Call < NetworkStatisticsEntry attribute :network_type, TD::Types::NetworkType - attribute :sent_bytes, TD::Types::Integer - attribute :received_bytes, TD::Types::Integer - attribute :duration, TD::Types::Float + attribute :sent_bytes, TD::Types::Coercible::Integer + attribute :received_bytes, TD::Types::Coercible::Integer + attribute :duration, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/network_statistics_entry/file.rb b/lib/tdlib/types/network_statistics_entry/file.rb index 42316954..479cacef 100644 --- a/lib/tdlib/types/network_statistics_entry/file.rb +++ b/lib/tdlib/types/network_statistics_entry/file.rb @@ -9,7 +9,7 @@ module TD::Types class NetworkStatisticsEntry::File < NetworkStatisticsEntry attribute :file_type, TD::Types::FileType attribute :network_type, TD::Types::NetworkType - attribute :sent_bytes, TD::Types::Integer - attribute :received_bytes, TD::Types::Integer + attribute :sent_bytes, TD::Types::Coercible::Integer + attribute :received_bytes, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/notification.rb b/lib/tdlib/types/notification.rb index 6f18875a..1b24c6b1 100644 --- a/lib/tdlib/types/notification.rb +++ b/lib/tdlib/types/notification.rb @@ -6,8 +6,8 @@ module TD::Types # @attr is_silent [Boolean] True, if the notification was initially silent. # @attr type [TD::Types::NotificationType] Notification type. class Notification < Base - attribute :id, TD::Types::Integer - attribute :date, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :date, TD::Types::Coercible::Integer attribute :is_silent, TD::Types::Bool attribute :type, TD::Types::NotificationType end diff --git a/lib/tdlib/types/notification_group.rb b/lib/tdlib/types/notification_group.rb index bb3e075c..27fa1bfe 100644 --- a/lib/tdlib/types/notification_group.rb +++ b/lib/tdlib/types/notification_group.rb @@ -7,10 +7,10 @@ module TD::Types # @attr total_count [Integer] Total number of active notifications in the group. # @attr notifications [Array] The list of active notifications. class NotificationGroup < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :type, TD::Types::NotificationGroupType - attribute :chat_id, TD::Types::Integer - attribute :total_count, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :notifications, TD::Types::Array.of(TD::Types::Notification) end end diff --git a/lib/tdlib/types/notification_type/new_call.rb b/lib/tdlib/types/notification_type/new_call.rb index b59400c1..f1fa3789 100644 --- a/lib/tdlib/types/notification_type/new_call.rb +++ b/lib/tdlib/types/notification_type/new_call.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr call_id [Integer] Call identifier. class NotificationType::NewCall < NotificationType - attribute :call_id, TD::Types::Integer + attribute :call_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/notification_type/new_push_message.rb b/lib/tdlib/types/notification_type/new_push_message.rb index ba74820b..46802c9f 100644 --- a/lib/tdlib/types/notification_type/new_push_message.rb +++ b/lib/tdlib/types/notification_type/new_push_message.rb @@ -6,11 +6,11 @@ module TD::Types # reply_to_message_id. # @attr sender [TD::Types::MessageSender] The sender of the message. # Corresponding user or chat may be inaccessible. - # @attr sender_name [String] Name of the sender. + # @attr sender_name [TD::Types::String] Name of the sender. # @attr is_outgoing [Boolean] True, if the message is outgoing. # @attr content [TD::Types::PushMessageContent] Push message content. class NotificationType::NewPushMessage < NotificationType - attribute :message_id, TD::Types::Integer + attribute :message_id, TD::Types::Coercible::Integer attribute :sender, TD::Types::MessageSender attribute :sender_name, TD::Types::String attribute :is_outgoing, TD::Types::Bool diff --git a/lib/tdlib/types/option_value/integer.rb b/lib/tdlib/types/option_value/integer.rb index 03f6149f..ca55fec5 100644 --- a/lib/tdlib/types/option_value/integer.rb +++ b/lib/tdlib/types/option_value/integer.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr value [Integer] The value of the option. class OptionValue::Integer < OptionValue - attribute :value, TD::Types::Integer + attribute :value, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/option_value/string.rb b/lib/tdlib/types/option_value/string.rb index 1f7c5c6b..02da708b 100644 --- a/lib/tdlib/types/option_value/string.rb +++ b/lib/tdlib/types/option_value/string.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a string option. # - # @attr value [String] The value of the option. + # @attr value [TD::Types::String] The value of the option. class OptionValue::String < OptionValue attribute :value, TD::Types::String end diff --git a/lib/tdlib/types/order_info.rb b/lib/tdlib/types/order_info.rb index 0eb0e9a0..10aebb70 100644 --- a/lib/tdlib/types/order_info.rb +++ b/lib/tdlib/types/order_info.rb @@ -1,9 +1,9 @@ module TD::Types # Order information. # - # @attr name [String] Name of the user. - # @attr phone_number [String] Phone number of the user. - # @attr email_address [String] Email address of the user. + # @attr name [TD::Types::String] Name of the user. + # @attr phone_number [TD::Types::String] Phone number of the user. + # @attr email_address [TD::Types::String] Email address of the user. # @attr shipping_address [TD::Types::Address, nil] Shipping address for this order; may be null. class OrderInfo < Base attribute :name, TD::Types::String diff --git a/lib/tdlib/types/page_block/anchor.rb b/lib/tdlib/types/page_block/anchor.rb index 0ac8b87c..b58b16f4 100644 --- a/lib/tdlib/types/page_block/anchor.rb +++ b/lib/tdlib/types/page_block/anchor.rb @@ -1,7 +1,7 @@ module TD::Types # An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor. # - # @attr name [String] Name of the anchor. + # @attr name [TD::Types::String] Name of the anchor. class PageBlock::Anchor < PageBlock attribute :name, TD::Types::String end diff --git a/lib/tdlib/types/page_block/author_date.rb b/lib/tdlib/types/page_block/author_date.rb index 82894df5..64e2d425 100644 --- a/lib/tdlib/types/page_block/author_date.rb +++ b/lib/tdlib/types/page_block/author_date.rb @@ -5,6 +5,6 @@ module TD::Types # @attr publish_date [Integer] Point in time (Unix timestamp) when the article was published; 0 if unknown. class PageBlock::AuthorDate < PageBlock attribute :author, TD::Types::RichText - attribute :publish_date, TD::Types::Integer + attribute :publish_date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/page_block/chat_link.rb b/lib/tdlib/types/page_block/chat_link.rb index e2ce1fb5..1d0e7fdc 100644 --- a/lib/tdlib/types/page_block/chat_link.rb +++ b/lib/tdlib/types/page_block/chat_link.rb @@ -1,9 +1,9 @@ module TD::Types # A link to a chat. # - # @attr title [String] Chat title. + # @attr title [TD::Types::String] Chat title. # @attr photo [TD::Types::ChatPhotoInfo, nil] Chat photo; may be null. - # @attr username [String] Chat username, by which all other information about the chat should be resolved. + # @attr username [TD::Types::String] Chat username, by which all other information about the chat should be resolved. class PageBlock::ChatLink < PageBlock attribute :title, TD::Types::String attribute :photo, TD::Types::ChatPhotoInfo.optional.default(nil) diff --git a/lib/tdlib/types/page_block/embedded.rb b/lib/tdlib/types/page_block/embedded.rb index 17ccd4a2..e1e8e1f2 100644 --- a/lib/tdlib/types/page_block/embedded.rb +++ b/lib/tdlib/types/page_block/embedded.rb @@ -1,8 +1,8 @@ module TD::Types # An embedded web page. # - # @attr url [String, nil] Web page URL, if available. - # @attr html [String] HTML-markup of the embedded page. + # @attr url [TD::Types::String, nil] Web page URL, if available. + # @attr html [TD::Types::String] HTML-markup of the embedded page. # @attr poster_photo [TD::Types::Photo, nil] Poster photo, if available; may be null. # @attr width [Integer] Block width; 0 if unknown. # @attr height [Integer] Block height; 0 if unknown. @@ -13,8 +13,8 @@ class PageBlock::Embedded < PageBlock attribute :url, TD::Types::String.optional.default(nil) attribute :html, TD::Types::String attribute :poster_photo, TD::Types::Photo.optional.default(nil) - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :caption, TD::Types::PageBlockCaption attribute :is_full_width, TD::Types::Bool attribute :allow_scrolling, TD::Types::Bool diff --git a/lib/tdlib/types/page_block/embedded_post.rb b/lib/tdlib/types/page_block/embedded_post.rb index b7eeaab6..075684a4 100644 --- a/lib/tdlib/types/page_block/embedded_post.rb +++ b/lib/tdlib/types/page_block/embedded_post.rb @@ -1,8 +1,8 @@ module TD::Types # An embedded post. # - # @attr url [String] Web page URL. - # @attr author [String] Post author. + # @attr url [TD::Types::String] Web page URL. + # @attr author [TD::Types::String] Post author. # @attr author_photo [TD::Types::Photo, nil] Post author photo; may be null. # @attr date [Integer] Point in time (Unix timestamp) when the post was created; 0 if unknown. # @attr page_blocks [Array] Post content. @@ -11,7 +11,7 @@ class PageBlock::EmbeddedPost < PageBlock attribute :url, TD::Types::String attribute :author, TD::Types::String attribute :author_photo, TD::Types::Photo.optional.default(nil) - attribute :date, TD::Types::Integer + attribute :date, TD::Types::Coercible::Integer attribute :page_blocks, TD::Types::Array.of(TD::Types::PageBlock) attribute :caption, TD::Types::PageBlockCaption end diff --git a/lib/tdlib/types/page_block/map.rb b/lib/tdlib/types/page_block/map.rb index 1fa72f88..9ef044cc 100644 --- a/lib/tdlib/types/page_block/map.rb +++ b/lib/tdlib/types/page_block/map.rb @@ -8,9 +8,9 @@ module TD::Types # @attr caption [TD::Types::PageBlockCaption] Block caption. class PageBlock::Map < PageBlock attribute :location, TD::Types::Location - attribute :zoom, TD::Types::Integer - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :zoom, TD::Types::Coercible::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :caption, TD::Types::PageBlockCaption end end diff --git a/lib/tdlib/types/page_block/photo.rb b/lib/tdlib/types/page_block/photo.rb index a3cf21b9..3d0da26c 100644 --- a/lib/tdlib/types/page_block/photo.rb +++ b/lib/tdlib/types/page_block/photo.rb @@ -3,7 +3,7 @@ module TD::Types # # @attr photo [TD::Types::Photo, nil] Photo file; may be null. # @attr caption [TD::Types::PageBlockCaption] Photo caption. - # @attr url [String] URL that needs to be opened when the photo is clicked. + # @attr url [TD::Types::String] URL that needs to be opened when the photo is clicked. class PageBlock::Photo < PageBlock attribute :photo, TD::Types::Photo.optional.default(nil) attribute :caption, TD::Types::PageBlockCaption diff --git a/lib/tdlib/types/page_block/preformatted.rb b/lib/tdlib/types/page_block/preformatted.rb index f14da682..8901a09d 100644 --- a/lib/tdlib/types/page_block/preformatted.rb +++ b/lib/tdlib/types/page_block/preformatted.rb @@ -2,7 +2,7 @@ module TD::Types # A preformatted text paragraph. # # @attr text [TD::Types::RichText] Paragraph text. - # @attr language [String] Programming language for which the text should be formatted. + # @attr language [TD::Types::String] Programming language for which the text should be formatted. class PageBlock::Preformatted < PageBlock attribute :text, TD::Types::RichText attribute :language, TD::Types::String diff --git a/lib/tdlib/types/page_block_list_item.rb b/lib/tdlib/types/page_block_list_item.rb index 4196402d..cb150cce 100644 --- a/lib/tdlib/types/page_block_list_item.rb +++ b/lib/tdlib/types/page_block_list_item.rb @@ -1,7 +1,7 @@ module TD::Types # Describes an item of a list page block. # - # @attr label [String] Item label. + # @attr label [TD::Types::String] Item label. # @attr page_blocks [Array] Item blocks. class PageBlockListItem < Base attribute :label, TD::Types::String diff --git a/lib/tdlib/types/page_block_related_article.rb b/lib/tdlib/types/page_block_related_article.rb index 4e33eeb8..0a9c225b 100644 --- a/lib/tdlib/types/page_block_related_article.rb +++ b/lib/tdlib/types/page_block_related_article.rb @@ -1,11 +1,11 @@ module TD::Types # Contains information about a related article. # - # @attr url [String] Related article URL. - # @attr title [String, nil] Article title; may be empty. - # @attr description [String, nil] Article description; may be empty. + # @attr url [TD::Types::String] Related article URL. + # @attr title [TD::Types::String, nil] Article title; may be empty. + # @attr description [TD::Types::String, nil] Article description; may be empty. # @attr photo [TD::Types::Photo, nil] Article photo; may be null. - # @attr author [String, nil] Article author; may be empty. + # @attr author [TD::Types::String, nil] Article author; may be empty. # @attr publish_date [Integer] Point in time (Unix timestamp) when the article was published; 0 if unknown. class PageBlockRelatedArticle < Base attribute :url, TD::Types::String @@ -13,6 +13,6 @@ class PageBlockRelatedArticle < Base attribute :description, TD::Types::String.optional.default(nil) attribute :photo, TD::Types::Photo.optional.default(nil) attribute :author, TD::Types::String.optional.default(nil) - attribute :publish_date, TD::Types::Integer + attribute :publish_date, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/page_block_table_cell.rb b/lib/tdlib/types/page_block_table_cell.rb index 3379e3de..442a23b7 100644 --- a/lib/tdlib/types/page_block_table_cell.rb +++ b/lib/tdlib/types/page_block_table_cell.rb @@ -11,8 +11,8 @@ module TD::Types class PageBlockTableCell < Base attribute :text, TD::Types::RichText.optional.default(nil) attribute :is_header, TD::Types::Bool - attribute :colspan, TD::Types::Integer - attribute :rowspan, TD::Types::Integer + attribute :colspan, TD::Types::Coercible::Integer + attribute :rowspan, TD::Types::Coercible::Integer attribute :align, TD::Types::PageBlockHorizontalAlignment attribute :valign, TD::Types::PageBlockVerticalAlignment end diff --git a/lib/tdlib/types/passport_authorization_form.rb b/lib/tdlib/types/passport_authorization_form.rb index 31d62dee..b880128b 100644 --- a/lib/tdlib/types/passport_authorization_form.rb +++ b/lib/tdlib/types/passport_authorization_form.rb @@ -4,9 +4,9 @@ module TD::Types # @attr id [Integer] Unique identifier of the authorization form. # @attr required_elements [Array] Information about the Telegram Passport # elements that must be provided to complete the form. - # @attr privacy_policy_url [String, nil] URL for the privacy policy of the service; may be empty. + # @attr privacy_policy_url [TD::Types::String, nil] URL for the privacy policy of the service; may be empty. class PassportAuthorizationForm < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :required_elements, TD::Types::Array.of(TD::Types::PassportRequiredElement) attribute :privacy_policy_url, TD::Types::String.optional.default(nil) end diff --git a/lib/tdlib/types/passport_element/email_address.rb b/lib/tdlib/types/passport_element/email_address.rb index 24f39b58..550bffe9 100644 --- a/lib/tdlib/types/passport_element/email_address.rb +++ b/lib/tdlib/types/passport_element/email_address.rb @@ -1,7 +1,7 @@ module TD::Types # A Telegram Passport element containing the user's email address. # - # @attr email_address [String] Email address. + # @attr email_address [TD::Types::String] Email address. class PassportElement::EmailAddress < PassportElement attribute :email_address, TD::Types::String end diff --git a/lib/tdlib/types/passport_element/phone_number.rb b/lib/tdlib/types/passport_element/phone_number.rb index 44039a27..11e45a5f 100644 --- a/lib/tdlib/types/passport_element/phone_number.rb +++ b/lib/tdlib/types/passport_element/phone_number.rb @@ -1,7 +1,7 @@ module TD::Types # A Telegram Passport element containing the user's phone number. # - # @attr phone_number [String] Phone number. + # @attr phone_number [TD::Types::String] Phone number. class PassportElement::PhoneNumber < PassportElement attribute :phone_number, TD::Types::String end diff --git a/lib/tdlib/types/passport_element_error.rb b/lib/tdlib/types/passport_element_error.rb index 3a96e8d9..fe605a57 100644 --- a/lib/tdlib/types/passport_element_error.rb +++ b/lib/tdlib/types/passport_element_error.rb @@ -2,7 +2,7 @@ module TD::Types # Contains the description of an error in a Telegram Passport element. # # @attr type [TD::Types::PassportElementType] Type of the Telegram Passport element which has the error. - # @attr message [String] Error message. + # @attr message [TD::Types::String] Error message. # @attr source [TD::Types::PassportElementErrorSource] Error source. class PassportElementError < Base attribute :type, TD::Types::PassportElementType diff --git a/lib/tdlib/types/passport_element_error_source/data_field.rb b/lib/tdlib/types/passport_element_error_source/data_field.rb index d19b5e11..e749e4b4 100644 --- a/lib/tdlib/types/passport_element_error_source/data_field.rb +++ b/lib/tdlib/types/passport_element_error_source/data_field.rb @@ -2,7 +2,7 @@ module TD::Types # One of the data fields contains an error. # The error will be considered resolved when the value of the field changes. # - # @attr field_name [String] Field name. + # @attr field_name [TD::Types::String] Field name. class PassportElementErrorSource::DataField < PassportElementErrorSource attribute :field_name, TD::Types::String end diff --git a/lib/tdlib/types/passport_element_error_source/file.rb b/lib/tdlib/types/passport_element_error_source/file.rb index 0c1c164f..7f599264 100644 --- a/lib/tdlib/types/passport_element_error_source/file.rb +++ b/lib/tdlib/types/passport_element_error_source/file.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_index [Integer] Index of a file with the error. class PassportElementErrorSource::File < PassportElementErrorSource - attribute :file_index, TD::Types::Integer + attribute :file_index, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/passport_element_error_source/translation_file.rb b/lib/tdlib/types/passport_element_error_source/translation_file.rb index dba8e8ac..9998ddd4 100644 --- a/lib/tdlib/types/passport_element_error_source/translation_file.rb +++ b/lib/tdlib/types/passport_element_error_source/translation_file.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr file_index [Integer] Index of a file with the error. class PassportElementErrorSource::TranslationFile < PassportElementErrorSource - attribute :file_index, TD::Types::Integer + attribute :file_index, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/password_state.rb b/lib/tdlib/types/password_state.rb index 6b5d3007..6e975f1f 100644 --- a/lib/tdlib/types/password_state.rb +++ b/lib/tdlib/types/password_state.rb @@ -2,7 +2,7 @@ module TD::Types # Represents the current state of 2-step verification. # # @attr has_password [Boolean] True, if a 2-step verification password is set. - # @attr password_hint [String, nil] Hint for the password; may be empty. + # @attr password_hint [TD::Types::String, nil] Hint for the password; may be empty. # @attr has_recovery_email_address [Boolean] True, if a recovery email is set. # @attr has_passport_data [Boolean] True, if some Telegram Passport elements were saved. # @attr recovery_email_address_code_info [TD::Types::EmailAddressAuthenticationCodeInfo, nil] Information about the diff --git a/lib/tdlib/types/payment_form.rb b/lib/tdlib/types/payment_form.rb index c0a64ba7..486fb86e 100644 --- a/lib/tdlib/types/payment_form.rb +++ b/lib/tdlib/types/payment_form.rb @@ -3,7 +3,7 @@ module TD::Types # # @attr id [Integer] The payment form identifier. # @attr invoice [TD::Types::Invoice] Full information of the invoice. - # @attr url [String] Payment form URL. + # @attr url [TD::Types::String] Payment form URL. # @attr seller_bot_user_id [Integer] User identifier of the seller bot. # @attr payments_provider_user_id [Integer] User identifier of the payment provider bot. # @attr payments_provider [TD::Types::PaymentsProviderStripe, nil] Contains information about the payment provider, @@ -15,11 +15,11 @@ module TD::Types # @attr need_password [Boolean] True, if the user will be able to save credentials protected by a password they set # up. class PaymentForm < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :invoice, TD::Types::Invoice attribute :url, TD::Types::String - attribute :seller_bot_user_id, TD::Types::Integer - attribute :payments_provider_user_id, TD::Types::Integer + attribute :seller_bot_user_id, TD::Types::Coercible::Integer + attribute :payments_provider_user_id, TD::Types::Coercible::Integer attribute :payments_provider, TD::Types::PaymentsProviderStripe.optional.default(nil) attribute :saved_order_info, TD::Types::OrderInfo.optional.default(nil) attribute :saved_credentials, TD::Types::SavedCredentials.optional.default(nil) diff --git a/lib/tdlib/types/payment_form_theme.rb b/lib/tdlib/types/payment_form_theme.rb index 53fc21af..0fc53d3a 100644 --- a/lib/tdlib/types/payment_form_theme.rb +++ b/lib/tdlib/types/payment_form_theme.rb @@ -8,11 +8,11 @@ module TD::Types # @attr button_color [Integer] A color of thebuttons in the RGB24 format. # @attr button_text_color [Integer] A color of text on the buttons in the RGB24 format. class PaymentFormTheme < Base - attribute :background_color, TD::Types::Integer - attribute :text_color, TD::Types::Integer - attribute :hint_color, TD::Types::Integer - attribute :link_color, TD::Types::Integer - attribute :button_color, TD::Types::Integer - attribute :button_text_color, TD::Types::Integer + attribute :background_color, TD::Types::Coercible::Integer + attribute :text_color, TD::Types::Coercible::Integer + attribute :hint_color, TD::Types::Coercible::Integer + attribute :link_color, TD::Types::Coercible::Integer + attribute :button_color, TD::Types::Coercible::Integer + attribute :button_text_color, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/payment_receipt.rb b/lib/tdlib/types/payment_receipt.rb index a11ec8cc..128c6f26 100644 --- a/lib/tdlib/types/payment_receipt.rb +++ b/lib/tdlib/types/payment_receipt.rb @@ -1,8 +1,8 @@ module TD::Types # Contains information about a successful payment. # - # @attr title [String] Product title. - # @attr description [String] Product description. + # @attr title [TD::Types::String] Product title. + # @attr description [TD::Types::String] Product description. # @attr photo [TD::Types::Photo, nil] Product photo; may be null. # @attr date [Integer] Point in time (Unix timestamp) when the payment was made. # @attr seller_bot_user_id [Integer] User identifier of the seller bot. @@ -10,19 +10,19 @@ module TD::Types # @attr invoice [TD::Types::Invoice] Contains information about the invoice. # @attr order_info [TD::Types::OrderInfo, nil] Order information; may be null. # @attr shipping_option [TD::Types::ShippingOption, nil] Chosen shipping option; may be null. - # @attr credentials_title [String] Title of the saved credentials chosen by the buyer. + # @attr credentials_title [TD::Types::String] Title of the saved credentials chosen by the buyer. # @attr tip_amount [Integer] The amount of tip chosen by the buyer in the smallest units of the currency. class PaymentReceipt < Base attribute :title, TD::Types::String attribute :description, TD::Types::String attribute :photo, TD::Types::Photo.optional.default(nil) - attribute :date, TD::Types::Integer - attribute :seller_bot_user_id, TD::Types::Integer - attribute :payments_provider_user_id, TD::Types::Integer + attribute :date, TD::Types::Coercible::Integer + attribute :seller_bot_user_id, TD::Types::Coercible::Integer + attribute :payments_provider_user_id, TD::Types::Coercible::Integer attribute :invoice, TD::Types::Invoice attribute :order_info, TD::Types::OrderInfo.optional.default(nil) attribute :shipping_option, TD::Types::ShippingOption.optional.default(nil) attribute :credentials_title, TD::Types::String - attribute :tip_amount, TD::Types::Integer + attribute :tip_amount, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/payment_result.rb b/lib/tdlib/types/payment_result.rb index d911bc3b..48556488 100644 --- a/lib/tdlib/types/payment_result.rb +++ b/lib/tdlib/types/payment_result.rb @@ -3,7 +3,7 @@ module TD::Types # # @attr success [Boolean] True, if the payment request was successful; otherwise the verification_url will be not # empty. - # @attr verification_url [String] URL for additional payment credentials verification. + # @attr verification_url [TD::Types::String] URL for additional payment credentials verification. class PaymentResult < Base attribute :success, TD::Types::Bool attribute :verification_url, TD::Types::String diff --git a/lib/tdlib/types/payments_provider_stripe.rb b/lib/tdlib/types/payments_provider_stripe.rb index 922a426e..31ceb1b4 100644 --- a/lib/tdlib/types/payments_provider_stripe.rb +++ b/lib/tdlib/types/payments_provider_stripe.rb @@ -1,7 +1,7 @@ module TD::Types # Stripe payment provider. # - # @attr publishable_key [String] Stripe API publishable key. + # @attr publishable_key [TD::Types::String] Stripe API publishable key. # @attr need_country [Boolean] True, if the user country must be provided. # @attr need_postal_code [Boolean] True, if the user ZIP/postal code must be provided. # @attr need_cardholder_name [Boolean] True, if the cardholder name must be provided. diff --git a/lib/tdlib/types/personal_details.rb b/lib/tdlib/types/personal_details.rb index 3f03339c..5d77557b 100644 --- a/lib/tdlib/types/personal_details.rb +++ b/lib/tdlib/types/personal_details.rb @@ -1,16 +1,17 @@ module TD::Types # Contains the user's personal details. # - # @attr first_name [String] First name of the user written in English; 1-255 characters. - # @attr middle_name [String] Middle name of the user written in English; 0-255 characters. - # @attr last_name [String] Last name of the user written in English; 1-255 characters. - # @attr native_first_name [String] Native first name of the user; 1-255 characters. - # @attr native_middle_name [String] Native middle name of the user; 0-255 characters. - # @attr native_last_name [String] Native last name of the user; 1-255 characters. + # @attr first_name [TD::Types::String] First name of the user written in English; 1-255 characters. + # @attr middle_name [TD::Types::String] Middle name of the user written in English; 0-255 characters. + # @attr last_name [TD::Types::String] Last name of the user written in English; 1-255 characters. + # @attr native_first_name [TD::Types::String] Native first name of the user; 1-255 characters. + # @attr native_middle_name [TD::Types::String] Native middle name of the user; 0-255 characters. + # @attr native_last_name [TD::Types::String] Native last name of the user; 1-255 characters. # @attr birthdate [TD::Types::Date] Birthdate of the user. - # @attr gender [String] Gender of the user, "male" or "female". - # @attr country_code [String] A two-letter ISO 3166-1 alpha-2 country code of the user's country. - # @attr residence_country_code [String] A two-letter ISO 3166-1 alpha-2 country code of the user's residence country. + # @attr gender [TD::Types::String] Gender of the user, "male" or "female". + # @attr country_code [TD::Types::String] A two-letter ISO 3166-1 alpha-2 country code of the user's country. + # @attr residence_country_code [TD::Types::String] A two-letter ISO 3166-1 alpha-2 country code of the user's + # residence country. class PersonalDetails < Base attribute :first_name, TD::Types::String attribute :middle_name, TD::Types::String diff --git a/lib/tdlib/types/phone_number_info.rb b/lib/tdlib/types/phone_number_info.rb index 084a08a6..12bd84fa 100644 --- a/lib/tdlib/types/phone_number_info.rb +++ b/lib/tdlib/types/phone_number_info.rb @@ -3,9 +3,10 @@ module TD::Types # # @attr country [TD::Types::CountryInfo, nil] Information about the country to which the phone number belongs; may be # null. - # @attr country_calling_code [String] The part of the phone number denoting country calling code or its part. - # @attr formatted_phone_number [String] The phone number without country calling code formatted accordingly to local - # rules. + # @attr country_calling_code [TD::Types::String] The part of the phone number denoting country calling code or its + # part. + # @attr formatted_phone_number [TD::Types::String] The phone number without country calling code formatted + # accordingly to local rules. class PhoneNumberInfo < Base attribute :country, TD::Types::CountryInfo.optional.default(nil) attribute :country_calling_code, TD::Types::String diff --git a/lib/tdlib/types/photo_size.rb b/lib/tdlib/types/photo_size.rb index a045e007..c9e3bdac 100644 --- a/lib/tdlib/types/photo_size.rb +++ b/lib/tdlib/types/photo_size.rb @@ -1,7 +1,7 @@ module TD::Types # Describes an image in JPEG format. # - # @attr type [String] Image type (see https://core.telegram.org/constructor/photoSize). + # @attr type [TD::Types::String] Image type (see https://core.telegram.org/constructor/photoSize). # @attr photo [TD::Types::File] Information about the image file. # @attr width [Integer] Image width. # @attr height [Integer] Image height. @@ -10,8 +10,8 @@ module TD::Types class PhotoSize < Base attribute :type, TD::Types::String attribute :photo, TD::Types::File - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer - attribute :progressive_sizes, TD::Types::Array.of(TD::Types::Integer) + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer + attribute :progressive_sizes, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/point.rb b/lib/tdlib/types/point.rb index 1b9359fa..dfd6bd76 100644 --- a/lib/tdlib/types/point.rb +++ b/lib/tdlib/types/point.rb @@ -4,7 +4,7 @@ module TD::Types # @attr x [Float] The point's first coordinate. # @attr y [Float] The point's second coordinate. class Point < Base - attribute :x, TD::Types::Float - attribute :y, TD::Types::Float + attribute :x, TD::Types::Coercible::Float + attribute :y, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/poll.rb b/lib/tdlib/types/poll.rb index ad039cc2..b87fa92d 100644 --- a/lib/tdlib/types/poll.rb +++ b/lib/tdlib/types/poll.rb @@ -2,7 +2,7 @@ module TD::Types # Describes a poll. # # @attr id [Integer] Unique poll identifier. - # @attr question [String] Poll question; 1-300 characters. + # @attr question [TD::Types::String] Poll question; 1-300 characters. # @attr options [Array] List of poll answer options. # @attr total_voter_count [Integer] Total number of voters, participating in the poll. # @attr recent_voter_user_ids [Array] User identifiers of recent voters, if the poll is non-anonymous. @@ -12,15 +12,15 @@ module TD::Types # @attr close_date [Integer] Point in time (Unix timestamp) when the poll will be automatically closed. # @attr is_closed [Boolean] True, if the poll is closed. class Poll < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :question, TD::Types::String attribute :options, TD::Types::Array.of(TD::Types::PollOption) - attribute :total_voter_count, TD::Types::Integer - attribute :recent_voter_user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :total_voter_count, TD::Types::Coercible::Integer + attribute :recent_voter_user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) attribute :is_anonymous, TD::Types::Bool attribute :type, TD::Types::PollType - attribute :open_period, TD::Types::Integer - attribute :close_date, TD::Types::Integer + attribute :open_period, TD::Types::Coercible::Integer + attribute :close_date, TD::Types::Coercible::Integer attribute :is_closed, TD::Types::Bool end end diff --git a/lib/tdlib/types/poll_option.rb b/lib/tdlib/types/poll_option.rb index 987ed35c..20f196a5 100644 --- a/lib/tdlib/types/poll_option.rb +++ b/lib/tdlib/types/poll_option.rb @@ -1,15 +1,15 @@ module TD::Types # Describes one answer option of a poll. # - # @attr text [String] Option text; 1-100 characters. + # @attr text [TD::Types::String] Option text; 1-100 characters. # @attr voter_count [Integer] Number of voters for this option, available only for closed or voted polls. # @attr vote_percentage [Integer] The percentage of votes for this option; 0-100. # @attr is_chosen [Boolean] True, if the option was chosen by the user. # @attr is_being_chosen [Boolean] True, if the option is being chosen by a pending setPollAnswer request. class PollOption < Base attribute :text, TD::Types::String - attribute :voter_count, TD::Types::Integer - attribute :vote_percentage, TD::Types::Integer + attribute :voter_count, TD::Types::Coercible::Integer + attribute :vote_percentage, TD::Types::Coercible::Integer attribute :is_chosen, TD::Types::Bool attribute :is_being_chosen, TD::Types::Bool end diff --git a/lib/tdlib/types/poll_type/quiz.rb b/lib/tdlib/types/poll_type/quiz.rb index 7a25c815..21524149 100644 --- a/lib/tdlib/types/poll_type/quiz.rb +++ b/lib/tdlib/types/poll_type/quiz.rb @@ -5,7 +5,7 @@ module TD::Types # @attr explanation [TD::Types::FormattedText, nil] Text that is shown when the user chooses an incorrect answer or # taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll. class PollType::Quiz < PollType - attribute :correct_option_id, TD::Types::Integer + attribute :correct_option_id, TD::Types::Coercible::Integer attribute :explanation, TD::Types::FormattedText.optional.default(nil) end end diff --git a/lib/tdlib/types/profile_photo.rb b/lib/tdlib/types/profile_photo.rb index 975c015a..fa46f29a 100644 --- a/lib/tdlib/types/profile_photo.rb +++ b/lib/tdlib/types/profile_photo.rb @@ -10,7 +10,7 @@ module TD::Types # @attr minithumbnail [TD::Types::Minithumbnail, nil] User profile photo minithumbnail; may be null. # @attr has_animation [Boolean] True, if the photo has animated variant. class ProfilePhoto < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :small, TD::Types::File attribute :big, TD::Types::File attribute :minithumbnail, TD::Types::Minithumbnail.optional.default(nil) diff --git a/lib/tdlib/types/proxy.rb b/lib/tdlib/types/proxy.rb index 6c25365e..7a985b3e 100644 --- a/lib/tdlib/types/proxy.rb +++ b/lib/tdlib/types/proxy.rb @@ -2,16 +2,16 @@ module TD::Types # Contains information about a proxy server. # # @attr id [Integer] Unique identifier of the proxy. - # @attr server [String] Proxy server IP address. + # @attr server [TD::Types::String] Proxy server IP address. # @attr port [Integer] Proxy server port. # @attr last_used_date [Integer] Point in time (Unix timestamp) when the proxy was last used; 0 if never. # @attr is_enabled [Boolean] True, if the proxy is enabled now. # @attr type [TD::Types::ProxyType] Type of the proxy. class Proxy < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :server, TD::Types::String - attribute :port, TD::Types::Integer - attribute :last_used_date, TD::Types::Integer + attribute :port, TD::Types::Coercible::Integer + attribute :last_used_date, TD::Types::Coercible::Integer attribute :is_enabled, TD::Types::Bool attribute :type, TD::Types::ProxyType end diff --git a/lib/tdlib/types/proxy_type/http.rb b/lib/tdlib/types/proxy_type/http.rb index 7829606a..29484a3d 100644 --- a/lib/tdlib/types/proxy_type/http.rb +++ b/lib/tdlib/types/proxy_type/http.rb @@ -1,8 +1,8 @@ module TD::Types # A HTTP transparent proxy server. # - # @attr username [String, nil] Username for logging in; may be empty. - # @attr password [String, nil] Password for logging in; may be empty. + # @attr username [TD::Types::String, nil] Username for logging in; may be empty. + # @attr password [TD::Types::String, nil] Password for logging in; may be empty. # @attr http_only [Boolean] Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP # connections via HTTP CONNECT method. class ProxyType::Http < ProxyType diff --git a/lib/tdlib/types/proxy_type/mtproto.rb b/lib/tdlib/types/proxy_type/mtproto.rb index 89f99b31..5f05c735 100644 --- a/lib/tdlib/types/proxy_type/mtproto.rb +++ b/lib/tdlib/types/proxy_type/mtproto.rb @@ -1,7 +1,7 @@ module TD::Types # An MTProto proxy server. # - # @attr secret [String] The proxy's secret in hexadecimal encoding. + # @attr secret [TD::Types::String] The proxy's secret in hexadecimal encoding. class ProxyType::Mtproto < ProxyType attribute :secret, TD::Types::String end diff --git a/lib/tdlib/types/proxy_type/socks5.rb b/lib/tdlib/types/proxy_type/socks5.rb index 16b611b5..f895d6a2 100644 --- a/lib/tdlib/types/proxy_type/socks5.rb +++ b/lib/tdlib/types/proxy_type/socks5.rb @@ -1,8 +1,8 @@ module TD::Types # A SOCKS5 proxy server. # - # @attr username [String, nil] Username for logging in; may be empty. - # @attr password [String, nil] Password for logging in; may be empty. + # @attr username [TD::Types::String, nil] Username for logging in; may be empty. + # @attr password [TD::Types::String, nil] Password for logging in; may be empty. class ProxyType::Socks5 < ProxyType attribute :username, TD::Types::String.optional.default(nil) attribute :password, TD::Types::String.optional.default(nil) diff --git a/lib/tdlib/types/push_message_content/animation.rb b/lib/tdlib/types/push_message_content/animation.rb index 7ab426f3..4ebd7b6b 100644 --- a/lib/tdlib/types/push_message_content/animation.rb +++ b/lib/tdlib/types/push_message_content/animation.rb @@ -2,7 +2,7 @@ module TD::Types # An animation message (GIF-style).. # # @attr animation [TD::Types::Animation, nil] Message content; may be null. - # @attr caption [String] Animation caption. + # @attr caption [TD::Types::String] Animation caption. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Animation < PushMessageContent attribute :animation, TD::Types::Animation.optional.default(nil) diff --git a/lib/tdlib/types/push_message_content/chat_add_members.rb b/lib/tdlib/types/push_message_content/chat_add_members.rb index 6b6236ec..6de8218e 100644 --- a/lib/tdlib/types/push_message_content/chat_add_members.rb +++ b/lib/tdlib/types/push_message_content/chat_add_members.rb @@ -1,7 +1,7 @@ module TD::Types # New chat members were invited to a group. # - # @attr member_name [String] Name of the added member. + # @attr member_name [TD::Types::String] Name of the added member. # @attr is_current_user [Boolean] True, if the current user was added to the group. # @attr is_returned [Boolean] True, if the user has returned to the group themself. class PushMessageContent::ChatAddMembers < PushMessageContent diff --git a/lib/tdlib/types/push_message_content/chat_change_title.rb b/lib/tdlib/types/push_message_content/chat_change_title.rb index 0c35c51c..db876aed 100644 --- a/lib/tdlib/types/push_message_content/chat_change_title.rb +++ b/lib/tdlib/types/push_message_content/chat_change_title.rb @@ -1,7 +1,7 @@ module TD::Types # A chat title was edited. # - # @attr title [String] New chat title. + # @attr title [TD::Types::String] New chat title. class PushMessageContent::ChatChangeTitle < PushMessageContent attribute :title, TD::Types::String end diff --git a/lib/tdlib/types/push_message_content/chat_delete_member.rb b/lib/tdlib/types/push_message_content/chat_delete_member.rb index 14e378ce..28e01d98 100644 --- a/lib/tdlib/types/push_message_content/chat_delete_member.rb +++ b/lib/tdlib/types/push_message_content/chat_delete_member.rb @@ -1,7 +1,7 @@ module TD::Types # A chat member was deleted. # - # @attr member_name [String] Name of the deleted member. + # @attr member_name [TD::Types::String] Name of the deleted member. # @attr is_current_user [Boolean] True, if the current user was deleted from the group. # @attr is_left [Boolean] True, if the user has left the group themself. class PushMessageContent::ChatDeleteMember < PushMessageContent diff --git a/lib/tdlib/types/push_message_content/contact.rb b/lib/tdlib/types/push_message_content/contact.rb index fde76fd0..c498eb63 100644 --- a/lib/tdlib/types/push_message_content/contact.rb +++ b/lib/tdlib/types/push_message_content/contact.rb @@ -1,7 +1,7 @@ module TD::Types # A message with a user contact. # - # @attr name [String] Contact's name. + # @attr name [TD::Types::String] Contact's name. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Contact < PushMessageContent attribute :name, TD::Types::String diff --git a/lib/tdlib/types/push_message_content/game.rb b/lib/tdlib/types/push_message_content/game.rb index 5bb8a417..2c7d2932 100644 --- a/lib/tdlib/types/push_message_content/game.rb +++ b/lib/tdlib/types/push_message_content/game.rb @@ -1,7 +1,7 @@ module TD::Types # A message with a game. # - # @attr title [String, nil] Game title, empty for pinned game message. + # @attr title [TD::Types::String, nil] Game title, empty for pinned game message. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Game < PushMessageContent attribute :title, TD::Types::String.optional.default(nil) diff --git a/lib/tdlib/types/push_message_content/game_score.rb b/lib/tdlib/types/push_message_content/game_score.rb index 0333c6ff..bc6e2464 100644 --- a/lib/tdlib/types/push_message_content/game_score.rb +++ b/lib/tdlib/types/push_message_content/game_score.rb @@ -1,12 +1,12 @@ module TD::Types # A new high score was achieved in a game. # - # @attr title [String, nil] Game title, empty for pinned message. + # @attr title [TD::Types::String, nil] Game title, empty for pinned message. # @attr score [Integer] New score, 0 for pinned message. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::GameScore < PushMessageContent attribute :title, TD::Types::String.optional.default(nil) - attribute :score, TD::Types::Integer + attribute :score, TD::Types::Coercible::Integer attribute :is_pinned, TD::Types::Bool end end diff --git a/lib/tdlib/types/push_message_content/invoice.rb b/lib/tdlib/types/push_message_content/invoice.rb index 90d68581..475f2930 100644 --- a/lib/tdlib/types/push_message_content/invoice.rb +++ b/lib/tdlib/types/push_message_content/invoice.rb @@ -1,7 +1,7 @@ module TD::Types # A message with an invoice from a bot. # - # @attr price [String] Product price. + # @attr price [TD::Types::String] Product price. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Invoice < PushMessageContent attribute :price, TD::Types::String diff --git a/lib/tdlib/types/push_message_content/media_album.rb b/lib/tdlib/types/push_message_content/media_album.rb index f9de01f6..af8e1dfc 100644 --- a/lib/tdlib/types/push_message_content/media_album.rb +++ b/lib/tdlib/types/push_message_content/media_album.rb @@ -7,7 +7,7 @@ module TD::Types # @attr has_audios [Boolean] True, if the album has at least one audio file. # @attr has_documents [Boolean] True, if the album has at least one document. class PushMessageContent::MediaAlbum < PushMessageContent - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :has_photos, TD::Types::Bool attribute :has_videos, TD::Types::Bool attribute :has_audios, TD::Types::Bool diff --git a/lib/tdlib/types/push_message_content/message_forwards.rb b/lib/tdlib/types/push_message_content/message_forwards.rb index a636377a..2ca15555 100644 --- a/lib/tdlib/types/push_message_content/message_forwards.rb +++ b/lib/tdlib/types/push_message_content/message_forwards.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr total_count [Integer] Number of forwarded messages. class PushMessageContent::MessageForwards < PushMessageContent - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/push_message_content/photo.rb b/lib/tdlib/types/push_message_content/photo.rb index 6ebc287b..e10421d4 100644 --- a/lib/tdlib/types/push_message_content/photo.rb +++ b/lib/tdlib/types/push_message_content/photo.rb @@ -2,7 +2,7 @@ module TD::Types # A photo message. # # @attr photo [TD::Types::Photo, nil] Message content; may be null. - # @attr caption [String] Photo caption. + # @attr caption [TD::Types::String] Photo caption. # @attr is_secret [Boolean] True, if the photo is secret. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Photo < PushMessageContent diff --git a/lib/tdlib/types/push_message_content/poll.rb b/lib/tdlib/types/push_message_content/poll.rb index c144047b..65107fb9 100644 --- a/lib/tdlib/types/push_message_content/poll.rb +++ b/lib/tdlib/types/push_message_content/poll.rb @@ -1,7 +1,7 @@ module TD::Types # A message with a poll. # - # @attr question [String] Poll question. + # @attr question [TD::Types::String] Poll question. # @attr is_regular [Boolean] True, if the poll is regular and not in quiz mode. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Poll < PushMessageContent diff --git a/lib/tdlib/types/push_message_content/sticker.rb b/lib/tdlib/types/push_message_content/sticker.rb index 14f173e0..fc875419 100644 --- a/lib/tdlib/types/push_message_content/sticker.rb +++ b/lib/tdlib/types/push_message_content/sticker.rb @@ -2,7 +2,7 @@ module TD::Types # A message with a sticker. # # @attr sticker [TD::Types::Sticker, nil] Message content; may be null. - # @attr emoji [String, nil] Emoji corresponding to the sticker; may be empty. + # @attr emoji [TD::Types::String, nil] Emoji corresponding to the sticker; may be empty. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Sticker < PushMessageContent attribute :sticker, TD::Types::Sticker.optional.default(nil) diff --git a/lib/tdlib/types/push_message_content/text.rb b/lib/tdlib/types/push_message_content/text.rb index 81ea2f67..6288b30c 100644 --- a/lib/tdlib/types/push_message_content/text.rb +++ b/lib/tdlib/types/push_message_content/text.rb @@ -1,7 +1,7 @@ module TD::Types # A text message. # - # @attr text [String] Message text. + # @attr text [TD::Types::String] Message text. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Text < PushMessageContent attribute :text, TD::Types::String diff --git a/lib/tdlib/types/push_message_content/video.rb b/lib/tdlib/types/push_message_content/video.rb index 484c412f..10cc3a89 100644 --- a/lib/tdlib/types/push_message_content/video.rb +++ b/lib/tdlib/types/push_message_content/video.rb @@ -2,7 +2,7 @@ module TD::Types # A video message. # # @attr video [TD::Types::Video, nil] Message content; may be null. - # @attr caption [String] Video caption. + # @attr caption [TD::Types::String] Video caption. # @attr is_secret [Boolean] True, if the video is secret. # @attr is_pinned [Boolean] True, if the message is a pinned message with the specified content. class PushMessageContent::Video < PushMessageContent diff --git a/lib/tdlib/types/push_receiver_id.rb b/lib/tdlib/types/push_receiver_id.rb index da6ace56..2630b383 100644 --- a/lib/tdlib/types/push_receiver_id.rb +++ b/lib/tdlib/types/push_receiver_id.rb @@ -4,6 +4,6 @@ module TD::Types # # @attr id [Integer] The globally unique identifier of push notification subscription. class PushReceiverId < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/recommended_chat_filter.rb b/lib/tdlib/types/recommended_chat_filter.rb index 7cb0bc02..3dc47681 100644 --- a/lib/tdlib/types/recommended_chat_filter.rb +++ b/lib/tdlib/types/recommended_chat_filter.rb @@ -2,7 +2,7 @@ module TD::Types # Describes a recommended chat filter. # # @attr filter [TD::Types::ChatFilter] The chat filter. - # @attr description [String] Chat filter description. + # @attr description [TD::Types::String] Chat filter description. class RecommendedChatFilter < Base attribute :filter, TD::Types::ChatFilter attribute :description, TD::Types::String diff --git a/lib/tdlib/types/recovery_email_address.rb b/lib/tdlib/types/recovery_email_address.rb index da313d14..e0e6bc36 100644 --- a/lib/tdlib/types/recovery_email_address.rb +++ b/lib/tdlib/types/recovery_email_address.rb @@ -1,7 +1,7 @@ module TD::Types # Contains information about the current recovery email address. # - # @attr recovery_email_address [String] Recovery email address. + # @attr recovery_email_address [TD::Types::String] Recovery email address. class RecoveryEmailAddress < Base attribute :recovery_email_address, TD::Types::String end diff --git a/lib/tdlib/types/remote_file.rb b/lib/tdlib/types/remote_file.rb index abf0fa8f..1c88f205 100644 --- a/lib/tdlib/types/remote_file.rb +++ b/lib/tdlib/types/remote_file.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a remote file. # - # @attr id [String, nil] Remote file identifier; may be empty. + # @attr id [TD::Types::String, nil] Remote file identifier; may be empty. # Can be used by the current user across application restarts or even from other devices. # Uniquely identifies a file, but a file can have a lot of different valid identifiers. # If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. @@ -10,7 +10,7 @@ module TD::Types # process by sending {TD::Types::Update::FileGenerationStart} to the application with the HTTP URL in the original_path # and "#url#" as the conversion string. # Application should generate the file by downloading it to the specified location. - # @attr unique_id [String, nil] Unique file identifier; may be empty if unknown. + # @attr unique_id [TD::Types::String, nil] Unique file identifier; may be empty if unknown. # The unique file identifier which is the same for the same file even for different users and is persistent over # time. # @attr is_uploading_active [Boolean] True, if the file is currently being uploaded (or a remote copy is being @@ -22,6 +22,6 @@ class RemoteFile < Base attribute :unique_id, TD::Types::String.optional.default(nil) attribute :is_uploading_active, TD::Types::Bool attribute :is_uploading_completed, TD::Types::Bool - attribute :uploaded_size, TD::Types::Integer + attribute :uploaded_size, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/rich_text/anchor.rb b/lib/tdlib/types/rich_text/anchor.rb index a65285a9..76977dc1 100644 --- a/lib/tdlib/types/rich_text/anchor.rb +++ b/lib/tdlib/types/rich_text/anchor.rb @@ -1,7 +1,7 @@ module TD::Types # An anchor. # - # @attr name [String] Anchor name. + # @attr name [TD::Types::String] Anchor name. class RichText::Anchor < RichText attribute :name, TD::Types::String end diff --git a/lib/tdlib/types/rich_text/anchor_link.rb b/lib/tdlib/types/rich_text/anchor_link.rb index db242fcd..9bcb1219 100644 --- a/lib/tdlib/types/rich_text/anchor_link.rb +++ b/lib/tdlib/types/rich_text/anchor_link.rb @@ -2,9 +2,9 @@ module TD::Types # A link to an anchor on the same web page. # # @attr text [TD::Types::RichText] The link text. - # @attr anchor_name [String] The anchor name. + # @attr anchor_name [TD::Types::String] The anchor name. # If the name is empty, the link should bring back to top. - # @attr url [String] An HTTP URL, opening the anchor. + # @attr url [TD::Types::String] An HTTP URL, opening the anchor. class RichText::AnchorLink < RichText attribute :text, TD::Types::RichText attribute :anchor_name, TD::Types::String diff --git a/lib/tdlib/types/rich_text/email_address.rb b/lib/tdlib/types/rich_text/email_address.rb index 5a15cae6..88923aa3 100644 --- a/lib/tdlib/types/rich_text/email_address.rb +++ b/lib/tdlib/types/rich_text/email_address.rb @@ -2,7 +2,7 @@ module TD::Types # A rich text email link. # # @attr text [TD::Types::RichText] Text. - # @attr email_address [String] Email address. + # @attr email_address [TD::Types::String] Email address. class RichText::EmailAddress < RichText attribute :text, TD::Types::RichText attribute :email_address, TD::Types::String diff --git a/lib/tdlib/types/rich_text/icon.rb b/lib/tdlib/types/rich_text/icon.rb index a6e85622..2654de93 100644 --- a/lib/tdlib/types/rich_text/icon.rb +++ b/lib/tdlib/types/rich_text/icon.rb @@ -7,7 +7,7 @@ module TD::Types # @attr height [Integer] Height of a bounding box in which the image should be shown; 0 if unknown. class RichText::Icon < RichText attribute :document, TD::Types::Document - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/rich_text/phone_number.rb b/lib/tdlib/types/rich_text/phone_number.rb index 174446a3..5e378bc8 100644 --- a/lib/tdlib/types/rich_text/phone_number.rb +++ b/lib/tdlib/types/rich_text/phone_number.rb @@ -2,7 +2,7 @@ module TD::Types # A rich text phone number. # # @attr text [TD::Types::RichText] Text. - # @attr phone_number [String] Phone number. + # @attr phone_number [TD::Types::String] Phone number. class RichText::PhoneNumber < RichText attribute :text, TD::Types::RichText attribute :phone_number, TD::Types::String diff --git a/lib/tdlib/types/rich_text/plain.rb b/lib/tdlib/types/rich_text/plain.rb index fbdb79fb..a5374e09 100644 --- a/lib/tdlib/types/rich_text/plain.rb +++ b/lib/tdlib/types/rich_text/plain.rb @@ -1,7 +1,7 @@ module TD::Types # A plain text. # - # @attr text [String] Text. + # @attr text [TD::Types::String] Text. class RichText::Plain < RichText attribute :text, TD::Types::String end diff --git a/lib/tdlib/types/rich_text/reference.rb b/lib/tdlib/types/rich_text/reference.rb index bcef9c28..5ba53e0c 100644 --- a/lib/tdlib/types/rich_text/reference.rb +++ b/lib/tdlib/types/rich_text/reference.rb @@ -2,9 +2,9 @@ module TD::Types # A reference to a richTexts object on the same web page. # # @attr text [TD::Types::RichText] The text. - # @attr anchor_name [String] The name of a {TD::Types::RichText::Anchor} object, which is the first element of the - # target {TD::Types::RichText::s} object. - # @attr url [String] An HTTP URL, opening the reference. + # @attr anchor_name [TD::Types::String] The name of a {TD::Types::RichText::Anchor} object, which is the first + # element of the target {TD::Types::RichText::s} object. + # @attr url [TD::Types::String] An HTTP URL, opening the reference. class RichText::Reference < RichText attribute :text, TD::Types::RichText attribute :anchor_name, TD::Types::String diff --git a/lib/tdlib/types/rich_text/url.rb b/lib/tdlib/types/rich_text/url.rb index 0d65b86c..5082f6b0 100644 --- a/lib/tdlib/types/rich_text/url.rb +++ b/lib/tdlib/types/rich_text/url.rb @@ -2,7 +2,7 @@ module TD::Types # A rich text URL link. # # @attr text [TD::Types::RichText] Text. - # @attr url [String] URL. + # @attr url [TD::Types::String] URL. # @attr is_cached [Boolean] True, if the URL has cached instant view server-side. class RichText::Url < RichText attribute :text, TD::Types::RichText diff --git a/lib/tdlib/types/saved_credentials.rb b/lib/tdlib/types/saved_credentials.rb index b9aa2a9d..3037d351 100644 --- a/lib/tdlib/types/saved_credentials.rb +++ b/lib/tdlib/types/saved_credentials.rb @@ -1,8 +1,8 @@ module TD::Types # Contains information about saved card credentials. # - # @attr id [String] Unique identifier of the saved credentials. - # @attr title [String] Title of the saved credentials. + # @attr id [TD::Types::String] Unique identifier of the saved credentials. + # @attr title [TD::Types::String] Title of the saved credentials. class SavedCredentials < Base attribute :id, TD::Types::String attribute :title, TD::Types::String diff --git a/lib/tdlib/types/scope_notification_settings.rb b/lib/tdlib/types/scope_notification_settings.rb index dfbe9109..afd3a6dd 100644 --- a/lib/tdlib/types/scope_notification_settings.rb +++ b/lib/tdlib/types/scope_notification_settings.rb @@ -2,7 +2,7 @@ module TD::Types # Contains information about notification settings for several chats. # # @attr mute_for [Integer] Time left before notifications will be unmuted, in seconds. - # @attr sound [String] The name of an audio file to be used for notification sounds; only applies to iOS + # @attr sound [TD::Types::String] The name of an audio file to be used for notification sounds; only applies to iOS # applications. # @attr show_preview [Boolean] True, if message content should be displayed in notifications. # @attr disable_pinned_message_notifications [Boolean] True, if notifications for incoming pinned messages will be @@ -10,7 +10,7 @@ module TD::Types # @attr disable_mention_notifications [Boolean] True, if notifications for messages with mentions will be created as # for an ordinary unread message. class ScopeNotificationSettings < Base - attribute :mute_for, TD::Types::Integer + attribute :mute_for, TD::Types::Coercible::Integer attribute :sound, TD::Types::String attribute :show_preview, TD::Types::Bool attribute :disable_pinned_message_notifications, TD::Types::Bool diff --git a/lib/tdlib/types/seconds.rb b/lib/tdlib/types/seconds.rb index 8634a927..47648927 100644 --- a/lib/tdlib/types/seconds.rb +++ b/lib/tdlib/types/seconds.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr seconds [Float] Number of seconds. class Seconds < Base - attribute :seconds, TD::Types::Float + attribute :seconds, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/secret_chat.rb b/lib/tdlib/types/secret_chat.rb index 42ffbef7..6db11956 100644 --- a/lib/tdlib/types/secret_chat.rb +++ b/lib/tdlib/types/secret_chat.rb @@ -15,11 +15,11 @@ module TD::Types # Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are # supported if the layer >= 101. class SecretChat < Base - attribute :id, TD::Types::Integer - attribute :user_id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :state, TD::Types::SecretChatState attribute :is_outbound, TD::Types::Bool - attribute :key_hash, TD::Types::String - attribute :layer, TD::Types::Integer + attribute :key_hash, TD::Types::Coercible::String + attribute :layer, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/session.rb b/lib/tdlib/types/session.rb index bf5ea6a8..40037349 100644 --- a/lib/tdlib/types/session.rb +++ b/lib/tdlib/types/session.rb @@ -6,35 +6,35 @@ module TD::Types # @attr is_current [Boolean] True, if this session is the current session. # @attr is_password_pending [Boolean] True, if a password is needed to complete authorization of the session. # @attr api_id [Integer] Telegram API identifier, as provided by the application. - # @attr application_name [String] Name of the application, as provided by the application. - # @attr application_version [String] The version of the application, as provided by the application. + # @attr application_name [TD::Types::String] Name of the application, as provided by the application. + # @attr application_version [TD::Types::String] The version of the application, as provided by the application. # @attr is_official_application [Boolean] True, if the application is an official application or uses the api_id of # an official application. - # @attr device_model [String] Model of the device the application has been run or is running on, as provided by the - # application. - # @attr platform [String] Operating system the application has been run or is running on, as provided by the - # application. - # @attr system_version [String] Version of the operating system the application has been run or is running on, as + # @attr device_model [TD::Types::String] Model of the device the application has been run or is running on, as # provided by the application. + # @attr platform [TD::Types::String] Operating system the application has been run or is running on, as provided by + # the application. + # @attr system_version [TD::Types::String] Version of the operating system the application has been run or is running + # on, as provided by the application. # @attr log_in_date [Integer] Point in time (Unix timestamp) when the user has logged in. # @attr last_active_date [Integer] Point in time (Unix timestamp) when the session was last used. - # @attr ip [String] IP address from which the session was created, in human-readable format. - # @attr country [String] A two-letter country code for the country from which the session was created, based on the - # IP address. - # @attr region [String] Region code from which the session was created, based on the IP address. + # @attr ip [TD::Types::String] IP address from which the session was created, in human-readable format. + # @attr country [TD::Types::String] A two-letter country code for the country from which the session was created, + # based on the IP address. + # @attr region [TD::Types::String] Region code from which the session was created, based on the IP address. class Session < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :is_current, TD::Types::Bool attribute :is_password_pending, TD::Types::Bool - attribute :api_id, TD::Types::Integer + attribute :api_id, TD::Types::Coercible::Integer attribute :application_name, TD::Types::String attribute :application_version, TD::Types::String attribute :is_official_application, TD::Types::Bool attribute :device_model, TD::Types::String attribute :platform, TD::Types::String attribute :system_version, TD::Types::String - attribute :log_in_date, TD::Types::Integer - attribute :last_active_date, TD::Types::Integer + attribute :log_in_date, TD::Types::Coercible::Integer + attribute :last_active_date, TD::Types::Coercible::Integer attribute :ip, TD::Types::String attribute :country, TD::Types::String attribute :region, TD::Types::String diff --git a/lib/tdlib/types/shipping_option.rb b/lib/tdlib/types/shipping_option.rb index 52842c5a..72334eca 100644 --- a/lib/tdlib/types/shipping_option.rb +++ b/lib/tdlib/types/shipping_option.rb @@ -1,8 +1,8 @@ module TD::Types # One shipping option. # - # @attr id [String] Shipping option identifier. - # @attr title [String] Option title. + # @attr id [TD::Types::String] Shipping option identifier. + # @attr title [TD::Types::String] Option title. # @attr price_parts [Array] A list of objects used to calculate the total shipping # costs. class ShippingOption < Base diff --git a/lib/tdlib/types/statistical_graph/async.rb b/lib/tdlib/types/statistical_graph/async.rb index 4a0f7ce8..cdcb4d1b 100644 --- a/lib/tdlib/types/statistical_graph/async.rb +++ b/lib/tdlib/types/statistical_graph/async.rb @@ -1,7 +1,7 @@ module TD::Types # The graph data to be asynchronously loaded through getStatisticalGraph. # - # @attr token [String] The token to use for data loading. + # @attr token [TD::Types::String] The token to use for data loading. class StatisticalGraph::Async < StatisticalGraph attribute :token, TD::Types::String end diff --git a/lib/tdlib/types/statistical_graph/data.rb b/lib/tdlib/types/statistical_graph/data.rb index 2230950c..1b9d0587 100644 --- a/lib/tdlib/types/statistical_graph/data.rb +++ b/lib/tdlib/types/statistical_graph/data.rb @@ -1,8 +1,8 @@ module TD::Types # A graph data. # - # @attr json_data [String] Graph data in JSON format. - # @attr zoom_token [String] If non-empty, a token which can be used to receive a zoomed in graph. + # @attr json_data [TD::Types::String] Graph data in JSON format. + # @attr zoom_token [TD::Types::String] If non-empty, a token which can be used to receive a zoomed in graph. class StatisticalGraph::Data < StatisticalGraph attribute :json_data, TD::Types::String attribute :zoom_token, TD::Types::String diff --git a/lib/tdlib/types/statistical_graph/error.rb b/lib/tdlib/types/statistical_graph/error.rb index bb7a83e0..350a4ab1 100644 --- a/lib/tdlib/types/statistical_graph/error.rb +++ b/lib/tdlib/types/statistical_graph/error.rb @@ -1,7 +1,7 @@ module TD::Types # An error message to be shown to the user instead of the graph. # - # @attr error_message [String] The error message. + # @attr error_message [TD::Types::String] The error message. class StatisticalGraph::Error < StatisticalGraph attribute :error_message, TD::Types::String end diff --git a/lib/tdlib/types/statistical_value.rb b/lib/tdlib/types/statistical_value.rb index 8802e986..ca94ffe5 100644 --- a/lib/tdlib/types/statistical_value.rb +++ b/lib/tdlib/types/statistical_value.rb @@ -5,8 +5,8 @@ module TD::Types # @attr previous_value [Float] The value for the previous day. # @attr growth_rate_percentage [Float] The growth rate of the value, as a percentage. class StatisticalValue < Base - attribute :value, TD::Types::Float - attribute :previous_value, TD::Types::Float - attribute :growth_rate_percentage, TD::Types::Float + attribute :value, TD::Types::Coercible::Float + attribute :previous_value, TD::Types::Coercible::Float + attribute :growth_rate_percentage, TD::Types::Coercible::Float end end diff --git a/lib/tdlib/types/sticker.rb b/lib/tdlib/types/sticker.rb index bcca6f31..52a48f35 100644 --- a/lib/tdlib/types/sticker.rb +++ b/lib/tdlib/types/sticker.rb @@ -4,7 +4,7 @@ module TD::Types # @attr set_id [Integer] The identifier of the sticker set to which the sticker belongs; 0 if none. # @attr width [Integer] Sticker width; as defined by the sender. # @attr height [Integer] Sticker height; as defined by the sender. - # @attr emoji [String] Emoji corresponding to the sticker. + # @attr emoji [TD::Types::String] Emoji corresponding to the sticker. # @attr is_animated [Boolean] True, if the sticker is an animated sticker in TGS format. # @attr is_mask [Boolean] True, if the sticker is a mask. # @attr mask_position [TD::Types::MaskPosition, nil] Position where the mask should be placed; may be null. @@ -14,9 +14,9 @@ module TD::Types # @attr thumbnail [TD::Types::Thumbnail, nil] Sticker thumbnail in WEBP or JPEG format; may be null. # @attr sticker [TD::Types::File] File containing the sticker. class Sticker < Base - attribute :set_id, TD::Types::Integer - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :set_id, TD::Types::Coercible::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :emoji, TD::Types::String attribute :is_animated, TD::Types::Bool attribute :is_mask, TD::Types::Bool diff --git a/lib/tdlib/types/sticker_set.rb b/lib/tdlib/types/sticker_set.rb index 23d21405..6d8c2c07 100644 --- a/lib/tdlib/types/sticker_set.rb +++ b/lib/tdlib/types/sticker_set.rb @@ -2,8 +2,8 @@ module TD::Types # Represents a sticker set. # # @attr id [Integer] Identifier of the sticker set. - # @attr title [String] Title of the sticker set. - # @attr name [String] Name of the sticker set. + # @attr title [TD::Types::String] Title of the sticker set. + # @attr name [TD::Types::String] Name of the sticker set. # @attr thumbnail [TD::Types::Thumbnail, nil] Sticker set thumbnail in WEBP or TGS format with width and height 100; # may be null. # The file can be downloaded only before the thumbnail is changed. @@ -22,7 +22,7 @@ module TD::Types # The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the # corresponding Sticker object. class StickerSet < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :title, TD::Types::String attribute :name, TD::Types::String attribute :thumbnail, TD::Types::Thumbnail.optional.default(nil) diff --git a/lib/tdlib/types/sticker_set_info.rb b/lib/tdlib/types/sticker_set_info.rb index 1db072af..33c4415e 100644 --- a/lib/tdlib/types/sticker_set_info.rb +++ b/lib/tdlib/types/sticker_set_info.rb @@ -2,8 +2,8 @@ module TD::Types # Represents short information about a sticker set. # # @attr id [Integer] Identifier of the sticker set. - # @attr title [String] Title of the sticker set. - # @attr name [String] Name of the sticker set. + # @attr title [TD::Types::String] Title of the sticker set. + # @attr name [TD::Types::String] Name of the sticker set. # @attr thumbnail [TD::Types::Thumbnail, nil] Sticker set thumbnail in WEBP or TGS format with width and height 100; # may be null. # @attr thumbnail_outline [Array, nil] Sticker set thumbnail's outline represented as a @@ -21,7 +21,7 @@ module TD::Types # context. # If the application needs more stickers the full set should be requested. class StickerSetInfo < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :title, TD::Types::String attribute :name, TD::Types::String attribute :thumbnail, TD::Types::Thumbnail.optional.default(nil) @@ -32,7 +32,7 @@ class StickerSetInfo < Base attribute :is_animated, TD::Types::Bool attribute :is_masks, TD::Types::Bool attribute :is_viewed, TD::Types::Bool - attribute :size, TD::Types::Integer + attribute :size, TD::Types::Coercible::Integer attribute :covers, TD::Types::Array.of(TD::Types::Sticker) end end diff --git a/lib/tdlib/types/sticker_sets.rb b/lib/tdlib/types/sticker_sets.rb index 11644b2b..2f748311 100644 --- a/lib/tdlib/types/sticker_sets.rb +++ b/lib/tdlib/types/sticker_sets.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total number of sticker sets found. # @attr sets [Array] List of sticker sets. class StickerSets < Base - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :sets, TD::Types::Array.of(TD::Types::StickerSetInfo) end end diff --git a/lib/tdlib/types/storage_statistics.rb b/lib/tdlib/types/storage_statistics.rb index bdc9572f..c7d9a0f5 100644 --- a/lib/tdlib/types/storage_statistics.rb +++ b/lib/tdlib/types/storage_statistics.rb @@ -5,8 +5,8 @@ module TD::Types # @attr count [Integer] Total number of files. # @attr by_chat [Array] Statistics split by chats. class StorageStatistics < Base - attribute :size, TD::Types::Integer - attribute :count, TD::Types::Integer + attribute :size, TD::Types::Coercible::Integer + attribute :count, TD::Types::Coercible::Integer attribute :by_chat, TD::Types::Array.of(TD::Types::StorageStatisticsByChat) end end diff --git a/lib/tdlib/types/storage_statistics_by_chat.rb b/lib/tdlib/types/storage_statistics_by_chat.rb index 05903c26..59316056 100644 --- a/lib/tdlib/types/storage_statistics_by_chat.rb +++ b/lib/tdlib/types/storage_statistics_by_chat.rb @@ -6,9 +6,9 @@ module TD::Types # @attr count [Integer] Total number of files in the chat. # @attr by_file_type [Array] Statistics split by file types. class StorageStatisticsByChat < Base - attribute :chat_id, TD::Types::Integer - attribute :size, TD::Types::Integer - attribute :count, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :size, TD::Types::Coercible::Integer + attribute :count, TD::Types::Coercible::Integer attribute :by_file_type, TD::Types::Array.of(TD::Types::StorageStatisticsByFileType) end end diff --git a/lib/tdlib/types/storage_statistics_by_file_type.rb b/lib/tdlib/types/storage_statistics_by_file_type.rb index de8981f5..9a0fd805 100644 --- a/lib/tdlib/types/storage_statistics_by_file_type.rb +++ b/lib/tdlib/types/storage_statistics_by_file_type.rb @@ -6,7 +6,7 @@ module TD::Types # @attr count [Integer] Total number of files. class StorageStatisticsByFileType < Base attribute :file_type, TD::Types::FileType - attribute :size, TD::Types::Integer - attribute :count, TD::Types::Integer + attribute :size, TD::Types::Coercible::Integer + attribute :count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/storage_statistics_fast.rb b/lib/tdlib/types/storage_statistics_fast.rb index f1b0a054..11d3dbb7 100644 --- a/lib/tdlib/types/storage_statistics_fast.rb +++ b/lib/tdlib/types/storage_statistics_fast.rb @@ -7,10 +7,10 @@ module TD::Types # @attr language_pack_database_size [Integer] Size of the language pack database. # @attr log_size [Integer] Size of the TDLib internal log. class StorageStatisticsFast < Base - attribute :files_size, TD::Types::Integer - attribute :file_count, TD::Types::Integer - attribute :database_size, TD::Types::Integer - attribute :language_pack_database_size, TD::Types::Integer - attribute :log_size, TD::Types::Integer + attribute :files_size, TD::Types::Coercible::Integer + attribute :file_count, TD::Types::Coercible::Integer + attribute :database_size, TD::Types::Coercible::Integer + attribute :language_pack_database_size, TD::Types::Coercible::Integer + attribute :log_size, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/suggested_action/convert_to_broadcast_group.rb b/lib/tdlib/types/suggested_action/convert_to_broadcast_group.rb index aa0aaeb5..fa15c29f 100644 --- a/lib/tdlib/types/suggested_action/convert_to_broadcast_group.rb +++ b/lib/tdlib/types/suggested_action/convert_to_broadcast_group.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr supergroup_id [Integer] Supergroup identifier. class SuggestedAction::ConvertToBroadcastGroup < SuggestedAction - attribute :supergroup_id, TD::Types::Integer + attribute :supergroup_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/supergroup.rb b/lib/tdlib/types/supergroup.rb index 12a10316..185133c3 100644 --- a/lib/tdlib/types/supergroup.rb +++ b/lib/tdlib/types/supergroup.rb @@ -6,7 +6,8 @@ module TD::Types # Unlike supergroups, channels can have an unlimited number of subscribers. # # @attr id [Integer] Supergroup or channel identifier. - # @attr username [String, nil] Username of the supergroup or channel; empty for private supergroups or channels. + # @attr username [TD::Types::String, nil] Username of the supergroup or channel; empty for private supergroups or + # channels. # @attr date [Integer] Point in time (Unix timestamp) when the current user joined, or the point in time when the # supergroup or channel was created, in case the user is not a member. # @attr status [TD::Types::ChatMemberStatus] Status of the current user in the supergroup or channel; custom title @@ -26,16 +27,16 @@ module TD::Types # @attr is_broadcast_group [Boolean] True, if the supergroup is a broadcast group, i.e. # only administrators can send messages and there is no limit on number of members. # @attr is_verified [Boolean] True, if the supergroup or channel is verified. - # @attr restriction_reason [String] If non-empty, contains a human-readable description of the reason why access to - # this supergroup or channel must be restricted. + # @attr restriction_reason [TD::Types::String] If non-empty, contains a human-readable description of the reason why + # access to this supergroup or channel must be restricted. # @attr is_scam [Boolean] True, if many users reported this supergroup or channel as a scam. # @attr is_fake [Boolean] True, if many users reported this supergroup or channel as a fake account. class Supergroup < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :username, TD::Types::String.optional.default(nil) - attribute :date, TD::Types::Integer + attribute :date, TD::Types::Coercible::Integer attribute :status, TD::Types::ChatMemberStatus - attribute :member_count, TD::Types::Integer + attribute :member_count, TD::Types::Coercible::Integer attribute :has_linked_chat, TD::Types::Bool attribute :has_location, TD::Types::Bool attribute :sign_messages, TD::Types::Bool diff --git a/lib/tdlib/types/supergroup_full_info.rb b/lib/tdlib/types/supergroup_full_info.rb index c11efe77..51f9ea6e 100644 --- a/lib/tdlib/types/supergroup_full_info.rb +++ b/lib/tdlib/types/supergroup_full_info.rb @@ -2,7 +2,7 @@ module TD::Types # Contains full information about a supergroup or channel. # # @attr photo [TD::Types::ChatPhoto, nil] Chat photo; may be null. - # @attr description [String] Supergroup or channel description. + # @attr description [TD::Types::String] Supergroup or channel description. # @attr member_count [Integer] Number of members in the supergroup or channel; 0 if unknown. # @attr administrator_count [Integer] Number of privileged users in the supergroup or channel; 0 if unknown. # @attr restricted_count [Integer] Number of restricted users in the supergroup; 0 if unknown. @@ -34,23 +34,23 @@ module TD::Types class SupergroupFullInfo < Base attribute :photo, TD::Types::ChatPhoto.optional.default(nil) attribute :description, TD::Types::String - attribute :member_count, TD::Types::Integer - attribute :administrator_count, TD::Types::Integer - attribute :restricted_count, TD::Types::Integer - attribute :banned_count, TD::Types::Integer - attribute :linked_chat_id, TD::Types::Integer - attribute :slow_mode_delay, TD::Types::Integer - attribute :slow_mode_delay_expires_in, TD::Types::Float + attribute :member_count, TD::Types::Coercible::Integer + attribute :administrator_count, TD::Types::Coercible::Integer + attribute :restricted_count, TD::Types::Coercible::Integer + attribute :banned_count, TD::Types::Coercible::Integer + attribute :linked_chat_id, TD::Types::Coercible::Integer + attribute :slow_mode_delay, TD::Types::Coercible::Integer + attribute :slow_mode_delay_expires_in, TD::Types::Coercible::Float attribute :can_get_members, TD::Types::Bool attribute :can_set_username, TD::Types::Bool attribute :can_set_sticker_set, TD::Types::Bool attribute :can_set_location, TD::Types::Bool attribute :can_get_statistics, TD::Types::Bool attribute :is_all_history_available, TD::Types::Bool - attribute :sticker_set_id, TD::Types::Integer + attribute :sticker_set_id, TD::Types::Coercible::Integer attribute :location, TD::Types::ChatLocation.optional.default(nil) attribute :invite_link, TD::Types::ChatInviteLink.optional.default(nil) - attribute :upgraded_from_basic_group_id, TD::Types::Integer - attribute :upgraded_from_max_message_id, TD::Types::Integer + attribute :upgraded_from_basic_group_id, TD::Types::Coercible::Integer + attribute :upgraded_from_max_message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/supergroup_members_filter/banned.rb b/lib/tdlib/types/supergroup_members_filter/banned.rb index 7bc38a1c..1bb0223d 100644 --- a/lib/tdlib/types/supergroup_members_filter/banned.rb +++ b/lib/tdlib/types/supergroup_members_filter/banned.rb @@ -1,7 +1,7 @@ module TD::Types # Returns users banned from the supergroup or channel; can be used only by administrators. # - # @attr query [String] Query to search for. + # @attr query [TD::Types::String] Query to search for. class SupergroupMembersFilter::Banned < SupergroupMembersFilter attribute :query, TD::Types::String end diff --git a/lib/tdlib/types/supergroup_members_filter/contacts.rb b/lib/tdlib/types/supergroup_members_filter/contacts.rb index 87770d89..0b847267 100644 --- a/lib/tdlib/types/supergroup_members_filter/contacts.rb +++ b/lib/tdlib/types/supergroup_members_filter/contacts.rb @@ -1,7 +1,7 @@ module TD::Types # Returns contacts of the user, which are members of the supergroup or channel. # - # @attr query [String] Query to search for. + # @attr query [TD::Types::String] Query to search for. class SupergroupMembersFilter::Contacts < SupergroupMembersFilter attribute :query, TD::Types::String end diff --git a/lib/tdlib/types/supergroup_members_filter/mention.rb b/lib/tdlib/types/supergroup_members_filter/mention.rb index 343a9dce..0515c70d 100644 --- a/lib/tdlib/types/supergroup_members_filter/mention.rb +++ b/lib/tdlib/types/supergroup_members_filter/mention.rb @@ -1,10 +1,10 @@ module TD::Types # Returns users which can be mentioned in the supergroup. # - # @attr query [String] Query to search for. + # @attr query [TD::Types::String] Query to search for. # @attr message_thread_id [Integer] If non-zero, the identifier of the current message thread. class SupergroupMembersFilter::Mention < SupergroupMembersFilter attribute :query, TD::Types::String - attribute :message_thread_id, TD::Types::Integer + attribute :message_thread_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/supergroup_members_filter/restricted.rb b/lib/tdlib/types/supergroup_members_filter/restricted.rb index 3ef8433b..44efe3ce 100644 --- a/lib/tdlib/types/supergroup_members_filter/restricted.rb +++ b/lib/tdlib/types/supergroup_members_filter/restricted.rb @@ -1,7 +1,7 @@ module TD::Types # Returns restricted supergroup members; can be used only by administrators. # - # @attr query [String] Query to search for. + # @attr query [TD::Types::String] Query to search for. class SupergroupMembersFilter::Restricted < SupergroupMembersFilter attribute :query, TD::Types::String end diff --git a/lib/tdlib/types/supergroup_members_filter/search.rb b/lib/tdlib/types/supergroup_members_filter/search.rb index a9148b34..81c85e90 100644 --- a/lib/tdlib/types/supergroup_members_filter/search.rb +++ b/lib/tdlib/types/supergroup_members_filter/search.rb @@ -1,7 +1,7 @@ module TD::Types # Used to search for supergroup or channel members via a (string) query. # - # @attr query [String] Query to search for. + # @attr query [TD::Types::String] Query to search for. class SupergroupMembersFilter::Search < SupergroupMembersFilter attribute :query, TD::Types::String end diff --git a/lib/tdlib/types/t_me_url.rb b/lib/tdlib/types/t_me_url.rb index 41ef9553..1c0b07a3 100644 --- a/lib/tdlib/types/t_me_url.rb +++ b/lib/tdlib/types/t_me_url.rb @@ -1,7 +1,7 @@ module TD::Types # Represents a URL linking to an internal Telegram entity. # - # @attr url [String] URL. + # @attr url [TD::Types::String] URL. # @attr type [TD::Types::TMeUrlType] Type of the URL. class TMeUrl < Base attribute :url, TD::Types::String diff --git a/lib/tdlib/types/t_me_url_type/sticker_set.rb b/lib/tdlib/types/t_me_url_type/sticker_set.rb index aeb95f03..d12f54d1 100644 --- a/lib/tdlib/types/t_me_url_type/sticker_set.rb +++ b/lib/tdlib/types/t_me_url_type/sticker_set.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr sticker_set_id [Integer] Identifier of the sticker set. class TMeUrlType::StickerSet < TMeUrlType - attribute :sticker_set_id, TD::Types::Integer + attribute :sticker_set_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/t_me_url_type/supergroup.rb b/lib/tdlib/types/t_me_url_type/supergroup.rb index e89281da..d2fb03bb 100644 --- a/lib/tdlib/types/t_me_url_type/supergroup.rb +++ b/lib/tdlib/types/t_me_url_type/supergroup.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr supergroup_id [Integer] Identifier of the supergroup or channel. class TMeUrlType::Supergroup < TMeUrlType - attribute :supergroup_id, TD::Types::Integer + attribute :supergroup_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/t_me_url_type/user.rb b/lib/tdlib/types/t_me_url_type/user.rb index 653a005a..dc757563 100644 --- a/lib/tdlib/types/t_me_url_type/user.rb +++ b/lib/tdlib/types/t_me_url_type/user.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr user_id [Integer] Identifier of the user. class TMeUrlType::User < TMeUrlType - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/tdlib_parameters.rb b/lib/tdlib/types/tdlib_parameters.rb index 26292e6f..7e66cf98 100644 --- a/lib/tdlib/types/tdlib_parameters.rb +++ b/lib/tdlib/types/tdlib_parameters.rb @@ -3,10 +3,10 @@ module TD::Types # # @attr use_test_dc [Boolean, nil] If set to true, the Telegram test environment will be used instead of the # production environment. - # @attr database_directory [String, nil] The path to the directory for the persistent database; if empty, the current - # working directory will be used. - # @attr files_directory [String, nil] The path to the directory for storing files; if empty, database_directory will - # be used. + # @attr database_directory [TD::Types::String, nil] The path to the directory for the persistent database; if empty, + # the current working directory will be used. + # @attr files_directory [TD::Types::String, nil] The path to the directory for storing files; if empty, + # database_directory will be used. # @attr use_file_database [Boolean, nil] If set to true, information about downloaded and uploaded files will be # saved between application restarts. # @attr use_chat_info_database [Boolean, nil] If set to true, the library will maintain a cache of users, basic @@ -17,13 +17,14 @@ module TD::Types # @attr use_secret_chats [Boolean, nil] If set to true, support for secret chats will be enabled. # @attr api_id [Integer, nil] Application identifier for Telegram API access, which can be obtained at # https://my.telegram.org. - # @attr api_hash [String, nil] Application identifier hash for Telegram API access, which can be obtained at - # https://my.telegram.org. - # @attr system_language_code [String] IETF language tag of the user's operating system language; must be non-empty. - # @attr device_model [String] Model of the device the application is being run on; must be non-empty. - # @attr system_version [String, nil] Version of the operating system the application is being run on. + # @attr api_hash [TD::Types::String, nil] Application identifier hash for Telegram API access, which can be obtained + # at https://my.telegram.org. + # @attr system_language_code [TD::Types::String] IETF language tag of the user's operating system language; must be + # non-empty. + # @attr device_model [TD::Types::String] Model of the device the application is being run on; must be non-empty. + # @attr system_version [TD::Types::String, nil] Version of the operating system the application is being run on. # If empty, the version is automatically detected by TDLib. - # @attr application_version [String] Application version; must be non-empty. + # @attr application_version [TD::Types::String] Application version; must be non-empty. # @attr enable_storage_optimizer [Boolean, nil] If set to true, old files will automatically be deleted. # @attr ignore_file_names [Boolean, nil] If set to true, original file names will be ignored. # Otherwise, downloaded files will be saved under names as close as possible to the original name. @@ -35,7 +36,7 @@ class TdlibParameters < Base attribute :use_chat_info_database, TD::Types::Bool.optional.default(nil) attribute :use_message_database, TD::Types::Bool.optional.default(nil) attribute :use_secret_chats, TD::Types::Bool.optional.default(nil) - attribute :api_id, TD::Types::Integer.optional.default(nil) + attribute :api_id, TD::Types::Coercible::Integer.optional.default(nil) attribute :api_hash, TD::Types::String.optional.default(nil) attribute :system_language_code, TD::Types::String attribute :device_model, TD::Types::String diff --git a/lib/tdlib/types/temporary_password_state.rb b/lib/tdlib/types/temporary_password_state.rb index 13e7ad8c..9168ac60 100644 --- a/lib/tdlib/types/temporary_password_state.rb +++ b/lib/tdlib/types/temporary_password_state.rb @@ -5,6 +5,6 @@ module TD::Types # @attr valid_for [Integer] Time left before the temporary password expires, in seconds. class TemporaryPasswordState < Base attribute :has_password, TD::Types::Bool - attribute :valid_for, TD::Types::Integer + attribute :valid_for, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/terms_of_service.rb b/lib/tdlib/types/terms_of_service.rb index c0876030..ca5e97cf 100644 --- a/lib/tdlib/types/terms_of_service.rb +++ b/lib/tdlib/types/terms_of_service.rb @@ -6,7 +6,7 @@ module TD::Types # @attr show_popup [Boolean] True, if a blocking popup with terms of service must be shown to the user. class TermsOfService < Base attribute :text, TD::Types::FormattedText - attribute :min_user_age, TD::Types::Integer + attribute :min_user_age, TD::Types::Coercible::Integer attribute :show_popup, TD::Types::Bool end end diff --git a/lib/tdlib/types/text.rb b/lib/tdlib/types/text.rb index 8815c160..c65be0c2 100644 --- a/lib/tdlib/types/text.rb +++ b/lib/tdlib/types/text.rb @@ -1,7 +1,7 @@ module TD::Types # Contains some text. # - # @attr text [String] Text. + # @attr text [TD::Types::String] Text. class Text < Base attribute :text, TD::Types::String end diff --git a/lib/tdlib/types/text_entity.rb b/lib/tdlib/types/text_entity.rb index 066d8174..c4a65198 100644 --- a/lib/tdlib/types/text_entity.rb +++ b/lib/tdlib/types/text_entity.rb @@ -5,8 +5,8 @@ module TD::Types # @attr length [Integer] Length of the entity, in UTF-16 code units. # @attr type [TD::Types::TextEntityType] Type of the entity. class TextEntity < Base - attribute :offset, TD::Types::Integer - attribute :length, TD::Types::Integer + attribute :offset, TD::Types::Coercible::Integer + attribute :length, TD::Types::Coercible::Integer attribute :type, TD::Types::TextEntityType end end diff --git a/lib/tdlib/types/text_entity_type/mention_name.rb b/lib/tdlib/types/text_entity_type/mention_name.rb index 765e2a2f..086b32b0 100644 --- a/lib/tdlib/types/text_entity_type/mention_name.rb +++ b/lib/tdlib/types/text_entity_type/mention_name.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr user_id [Integer] Identifier of the mentioned user. class TextEntityType::MentionName < TextEntityType - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/text_entity_type/pre_code.rb b/lib/tdlib/types/text_entity_type/pre_code.rb index 681e4b63..71685d88 100644 --- a/lib/tdlib/types/text_entity_type/pre_code.rb +++ b/lib/tdlib/types/text_entity_type/pre_code.rb @@ -1,7 +1,7 @@ module TD::Types # Text that must be formatted as if inside pre, and code HTML tags. # - # @attr language [String] Programming language of the code; as defined by the sender. + # @attr language [TD::Types::String] Programming language of the code; as defined by the sender. class TextEntityType::PreCode < TextEntityType attribute :language, TD::Types::String end diff --git a/lib/tdlib/types/text_entity_type/text_url.rb b/lib/tdlib/types/text_entity_type/text_url.rb index 4f493499..59de9a77 100644 --- a/lib/tdlib/types/text_entity_type/text_url.rb +++ b/lib/tdlib/types/text_entity_type/text_url.rb @@ -1,7 +1,7 @@ module TD::Types # A text description shown instead of a raw URL. # - # @attr url [String] HTTP or tg:// URL to be opened when the link is clicked. + # @attr url [TD::Types::String] HTTP or tg:// URL to be opened when the link is clicked. class TextEntityType::TextUrl < TextEntityType attribute :url, TD::Types::String end diff --git a/lib/tdlib/types/text_parse_mode/markdown.rb b/lib/tdlib/types/text_parse_mode/markdown.rb index 9a4e6ecb..f0e5b5c9 100644 --- a/lib/tdlib/types/text_parse_mode/markdown.rb +++ b/lib/tdlib/types/text_parse_mode/markdown.rb @@ -4,6 +4,6 @@ module TD::Types # @attr version [Integer] Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot # API "MarkdownV2" parse mode. class TextParseMode::Markdown < TextParseMode - attribute :version, TD::Types::Integer + attribute :version, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/thumbnail.rb b/lib/tdlib/types/thumbnail.rb index 4f3e73e6..f397f423 100644 --- a/lib/tdlib/types/thumbnail.rb +++ b/lib/tdlib/types/thumbnail.rb @@ -7,8 +7,8 @@ module TD::Types # @attr file [TD::Types::File] The thumbnail. class Thumbnail < Base attribute :format, TD::Types::ThumbnailFormat - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :file, TD::Types::File end end diff --git a/lib/tdlib/types/update/animation_search_parameters.rb b/lib/tdlib/types/update/animation_search_parameters.rb index f877d3d1..0eece6d7 100644 --- a/lib/tdlib/types/update/animation_search_parameters.rb +++ b/lib/tdlib/types/update/animation_search_parameters.rb @@ -1,8 +1,8 @@ module TD::Types # The parameters of animation search through GetOption("animation_search_bot_username") bot has changed. # - # @attr provider [String] Name of the animation search provider. - # @attr emojis [Array] The new list of emojis suggested for searching. + # @attr provider [TD::Types::String] Name of the animation search provider. + # @attr emojis [Array] The new list of emojis suggested for searching. class Update::AnimationSearchParameters < Update attribute :provider, TD::Types::String attribute :emojis, TD::Types::Array.of(TD::Types::String) diff --git a/lib/tdlib/types/update/basic_group_full_info.rb b/lib/tdlib/types/update/basic_group_full_info.rb index 2ce1fccf..cbb2ea6d 100644 --- a/lib/tdlib/types/update/basic_group_full_info.rb +++ b/lib/tdlib/types/update/basic_group_full_info.rb @@ -4,7 +4,7 @@ module TD::Types # @attr basic_group_id [Integer] Identifier of a basic group. # @attr basic_group_full_info [TD::Types::BasicGroupFullInfo] New full information about the group. class Update::BasicGroupFullInfo < Update - attribute :basic_group_id, TD::Types::Integer + attribute :basic_group_id, TD::Types::Coercible::Integer attribute :basic_group_full_info, TD::Types::BasicGroupFullInfo end end diff --git a/lib/tdlib/types/update/chat_action_bar.rb b/lib/tdlib/types/update/chat_action_bar.rb index 0f2ecb87..23d99017 100644 --- a/lib/tdlib/types/update/chat_action_bar.rb +++ b/lib/tdlib/types/update/chat_action_bar.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr action_bar [TD::Types::ChatActionBar, nil] The new value of the action bar; may be null. class Update::ChatActionBar < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :action_bar, TD::Types::ChatActionBar.optional.default(nil) end end diff --git a/lib/tdlib/types/update/chat_default_disable_notification.rb b/lib/tdlib/types/update/chat_default_disable_notification.rb index d23388b7..1779bc1f 100644 --- a/lib/tdlib/types/update/chat_default_disable_notification.rb +++ b/lib/tdlib/types/update/chat_default_disable_notification.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr default_disable_notification [Boolean] The new default_disable_notification value. class Update::ChatDefaultDisableNotification < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :default_disable_notification, TD::Types::Bool end end diff --git a/lib/tdlib/types/update/chat_draft_message.rb b/lib/tdlib/types/update/chat_draft_message.rb index c4b12e91..98c78d57 100644 --- a/lib/tdlib/types/update/chat_draft_message.rb +++ b/lib/tdlib/types/update/chat_draft_message.rb @@ -7,7 +7,7 @@ module TD::Types # @attr draft_message [TD::Types::DraftMessage, nil] The new draft message; may be null. # @attr positions [Array] The new chat positions in the chat lists. class Update::ChatDraftMessage < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :draft_message, TD::Types::DraftMessage.optional.default(nil) attribute :positions, TD::Types::Array.of(TD::Types::ChatPosition) end diff --git a/lib/tdlib/types/update/chat_has_scheduled_messages.rb b/lib/tdlib/types/update/chat_has_scheduled_messages.rb index 59915c07..201405e7 100644 --- a/lib/tdlib/types/update/chat_has_scheduled_messages.rb +++ b/lib/tdlib/types/update/chat_has_scheduled_messages.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr has_scheduled_messages [Boolean] New value of has_scheduled_messages. class Update::ChatHasScheduledMessages < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :has_scheduled_messages, TD::Types::Bool end end diff --git a/lib/tdlib/types/update/chat_is_blocked.rb b/lib/tdlib/types/update/chat_is_blocked.rb index ab6a6992..53f0039e 100644 --- a/lib/tdlib/types/update/chat_is_blocked.rb +++ b/lib/tdlib/types/update/chat_is_blocked.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr is_blocked [Boolean] New value of is_blocked. class Update::ChatIsBlocked < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :is_blocked, TD::Types::Bool end end diff --git a/lib/tdlib/types/update/chat_is_marked_as_unread.rb b/lib/tdlib/types/update/chat_is_marked_as_unread.rb index 2bbce681..8db0c136 100644 --- a/lib/tdlib/types/update/chat_is_marked_as_unread.rb +++ b/lib/tdlib/types/update/chat_is_marked_as_unread.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr is_marked_as_unread [Boolean] New value of is_marked_as_unread. class Update::ChatIsMarkedAsUnread < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :is_marked_as_unread, TD::Types::Bool end end diff --git a/lib/tdlib/types/update/chat_last_message.rb b/lib/tdlib/types/update/chat_last_message.rb index e3ef444d..65dd57fe 100644 --- a/lib/tdlib/types/update/chat_last_message.rb +++ b/lib/tdlib/types/update/chat_last_message.rb @@ -7,7 +7,7 @@ module TD::Types # @attr last_message [TD::Types::Message, nil] The new last message in the chat; may be null. # @attr positions [Array] The new chat positions in the chat lists. class Update::ChatLastMessage < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :last_message, TD::Types::Message.optional.default(nil) attribute :positions, TD::Types::Array.of(TD::Types::ChatPosition) end diff --git a/lib/tdlib/types/update/chat_member.rb b/lib/tdlib/types/update/chat_member.rb index 349bd73e..10d1f8c0 100644 --- a/lib/tdlib/types/update/chat_member.rb +++ b/lib/tdlib/types/update/chat_member.rb @@ -9,9 +9,9 @@ module TD::Types # @attr old_chat_member [TD::Types::ChatMember] Previous chat member. # @attr new_chat_member [TD::Types::ChatMember] New chat member. class Update::ChatMember < Update - attribute :chat_id, TD::Types::Integer - attribute :actor_user_id, TD::Types::Integer - attribute :date, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :actor_user_id, TD::Types::Coercible::Integer + attribute :date, TD::Types::Coercible::Integer attribute :invite_link, TD::Types::ChatInviteLink.optional.default(nil) attribute :old_chat_member, TD::Types::ChatMember attribute :new_chat_member, TD::Types::ChatMember diff --git a/lib/tdlib/types/update/chat_message_ttl_setting.rb b/lib/tdlib/types/update/chat_message_ttl_setting.rb index 6bf12254..d60dcada 100644 --- a/lib/tdlib/types/update/chat_message_ttl_setting.rb +++ b/lib/tdlib/types/update/chat_message_ttl_setting.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr message_ttl_setting [Integer] New value of message_ttl_setting. class Update::ChatMessageTtlSetting < Update - attribute :chat_id, TD::Types::Integer - attribute :message_ttl_setting, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_ttl_setting, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/chat_notification_settings.rb b/lib/tdlib/types/update/chat_notification_settings.rb index 53c7cd5d..c996fb57 100644 --- a/lib/tdlib/types/update/chat_notification_settings.rb +++ b/lib/tdlib/types/update/chat_notification_settings.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr notification_settings [TD::Types::ChatNotificationSettings] The new notification settings. class Update::ChatNotificationSettings < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :notification_settings, TD::Types::ChatNotificationSettings end end diff --git a/lib/tdlib/types/update/chat_online_member_count.rb b/lib/tdlib/types/update/chat_online_member_count.rb index ece30699..54a73fad 100644 --- a/lib/tdlib/types/update/chat_online_member_count.rb +++ b/lib/tdlib/types/update/chat_online_member_count.rb @@ -6,7 +6,7 @@ module TD::Types # @attr chat_id [Integer] Identifier of the chat. # @attr online_member_count [Integer] New number of online members in the chat, or 0 if unknown. class Update::ChatOnlineMemberCount < Update - attribute :chat_id, TD::Types::Integer - attribute :online_member_count, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :online_member_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/chat_permissions.rb b/lib/tdlib/types/update/chat_permissions.rb index 30d6e962..682e8bef 100644 --- a/lib/tdlib/types/update/chat_permissions.rb +++ b/lib/tdlib/types/update/chat_permissions.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr permissions [TD::Types::ChatPermissions] The new chat permissions. class Update::ChatPermissions < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :permissions, TD::Types::ChatPermissions end end diff --git a/lib/tdlib/types/update/chat_photo.rb b/lib/tdlib/types/update/chat_photo.rb index 101e6f46..7340e88d 100644 --- a/lib/tdlib/types/update/chat_photo.rb +++ b/lib/tdlib/types/update/chat_photo.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr photo [TD::Types::ChatPhotoInfo, nil] The new chat photo; may be null. class Update::ChatPhoto < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :photo, TD::Types::ChatPhotoInfo.optional.default(nil) end end diff --git a/lib/tdlib/types/update/chat_position.rb b/lib/tdlib/types/update/chat_position.rb index d8e9a741..8c44c7e1 100644 --- a/lib/tdlib/types/update/chat_position.rb +++ b/lib/tdlib/types/update/chat_position.rb @@ -6,7 +6,7 @@ module TD::Types # @attr position [TD::Types::ChatPosition] New chat position. # If new order is 0, then the chat needs to be removed from the list. class Update::ChatPosition < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :position, TD::Types::ChatPosition end end diff --git a/lib/tdlib/types/update/chat_read_inbox.rb b/lib/tdlib/types/update/chat_read_inbox.rb index 68643fe9..d51e5f2c 100644 --- a/lib/tdlib/types/update/chat_read_inbox.rb +++ b/lib/tdlib/types/update/chat_read_inbox.rb @@ -5,8 +5,8 @@ module TD::Types # @attr last_read_inbox_message_id [Integer] Identifier of the last read incoming message. # @attr unread_count [Integer] The number of unread messages left in the chat. class Update::ChatReadInbox < Update - attribute :chat_id, TD::Types::Integer - attribute :last_read_inbox_message_id, TD::Types::Integer - attribute :unread_count, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :last_read_inbox_message_id, TD::Types::Coercible::Integer + attribute :unread_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/chat_read_outbox.rb b/lib/tdlib/types/update/chat_read_outbox.rb index 8e2fbd45..347c9348 100644 --- a/lib/tdlib/types/update/chat_read_outbox.rb +++ b/lib/tdlib/types/update/chat_read_outbox.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr last_read_outbox_message_id [Integer] Identifier of last read outgoing message. class Update::ChatReadOutbox < Update - attribute :chat_id, TD::Types::Integer - attribute :last_read_outbox_message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :last_read_outbox_message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/chat_reply_markup.rb b/lib/tdlib/types/update/chat_reply_markup.rb index bfc3dd70..8e9fe2b2 100644 --- a/lib/tdlib/types/update/chat_reply_markup.rb +++ b/lib/tdlib/types/update/chat_reply_markup.rb @@ -7,7 +7,7 @@ module TD::Types # @attr reply_markup_message_id [Integer] Identifier of the message from which reply markup needs to be used; 0 if # there is no default custom reply markup in the chat. class Update::ChatReplyMarkup < Update - attribute :chat_id, TD::Types::Integer - attribute :reply_markup_message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :reply_markup_message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/chat_title.rb b/lib/tdlib/types/update/chat_title.rb index 8e2edb06..5d8f0c6b 100644 --- a/lib/tdlib/types/update/chat_title.rb +++ b/lib/tdlib/types/update/chat_title.rb @@ -2,9 +2,9 @@ module TD::Types # The title of a chat was changed. # # @attr chat_id [Integer] Chat identifier. - # @attr title [String] The new chat title. + # @attr title [TD::Types::String] The new chat title. class Update::ChatTitle < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :title, TD::Types::String end end diff --git a/lib/tdlib/types/update/chat_unread_mention_count.rb b/lib/tdlib/types/update/chat_unread_mention_count.rb index ee30bc04..5315f5d6 100644 --- a/lib/tdlib/types/update/chat_unread_mention_count.rb +++ b/lib/tdlib/types/update/chat_unread_mention_count.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr unread_mention_count [Integer] The number of unread mention messages left in the chat. class Update::ChatUnreadMentionCount < Update - attribute :chat_id, TD::Types::Integer - attribute :unread_mention_count, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :unread_mention_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/chat_voice_chat.rb b/lib/tdlib/types/update/chat_voice_chat.rb index 2d75ee02..da215829 100644 --- a/lib/tdlib/types/update/chat_voice_chat.rb +++ b/lib/tdlib/types/update/chat_voice_chat.rb @@ -4,7 +4,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr voice_chat [TD::Types::VoiceChat] New value of voice_chat. class Update::ChatVoiceChat < Update - attribute :chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer attribute :voice_chat, TD::Types::VoiceChat end end diff --git a/lib/tdlib/types/update/delete_messages.rb b/lib/tdlib/types/update/delete_messages.rb index 9373337b..7c51ea05 100644 --- a/lib/tdlib/types/update/delete_messages.rb +++ b/lib/tdlib/types/update/delete_messages.rb @@ -8,8 +8,8 @@ module TD::Types # @attr from_cache [Boolean] True, if the messages are deleted only from the cache and can possibly be retrieved # again in the future. class Update::DeleteMessages < Update - attribute :chat_id, TD::Types::Integer - attribute :message_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) attribute :is_permanent, TD::Types::Bool attribute :from_cache, TD::Types::Bool end diff --git a/lib/tdlib/types/update/dice_emojis.rb b/lib/tdlib/types/update/dice_emojis.rb index a99d2121..d0016136 100644 --- a/lib/tdlib/types/update/dice_emojis.rb +++ b/lib/tdlib/types/update/dice_emojis.rb @@ -1,7 +1,7 @@ module TD::Types # The list of supported dice emojis has changed. # - # @attr emojis [Array] The new list of supported dice emojis. + # @attr emojis [Array] The new list of supported dice emojis. class Update::DiceEmojis < Update attribute :emojis, TD::Types::Array.of(TD::Types::String) end diff --git a/lib/tdlib/types/update/favorite_stickers.rb b/lib/tdlib/types/update/favorite_stickers.rb index 374ec451..19ea5b2e 100644 --- a/lib/tdlib/types/update/favorite_stickers.rb +++ b/lib/tdlib/types/update/favorite_stickers.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr sticker_ids [Array] The new list of file identifiers of favorite stickers. class Update::FavoriteStickers < Update - attribute :sticker_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :sticker_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/update/file_generation_start.rb b/lib/tdlib/types/update/file_generation_start.rb index 2af4fc77..50f71ab9 100644 --- a/lib/tdlib/types/update/file_generation_start.rb +++ b/lib/tdlib/types/update/file_generation_start.rb @@ -2,14 +2,14 @@ module TD::Types # The file generation process needs to be started by the application. # # @attr generation_id [Integer] Unique identifier for the generation process. - # @attr original_path [String, nil] The path to a file from which a new file is generated; may be empty. - # @attr destination_path [String] The path to a file that should be created and where the new file should be - # generated. - # @attr conversion [String] String specifying the conversion applied to the original file. + # @attr original_path [TD::Types::String, nil] The path to a file from which a new file is generated; may be empty. + # @attr destination_path [TD::Types::String] The path to a file that should be created and where the new file should + # be generated. + # @attr conversion [TD::Types::String] String specifying the conversion applied to the original file. # If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which should be downloaded by # the application. class Update::FileGenerationStart < Update - attribute :generation_id, TD::Types::Integer + attribute :generation_id, TD::Types::Coercible::Integer attribute :original_path, TD::Types::String.optional.default(nil) attribute :destination_path, TD::Types::String attribute :conversion, TD::Types::String diff --git a/lib/tdlib/types/update/file_generation_stop.rb b/lib/tdlib/types/update/file_generation_stop.rb index b36422a9..61352f0f 100644 --- a/lib/tdlib/types/update/file_generation_stop.rb +++ b/lib/tdlib/types/update/file_generation_stop.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr generation_id [Integer] Unique identifier for the generation process. class Update::FileGenerationStop < Update - attribute :generation_id, TD::Types::Integer + attribute :generation_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/group_call_participant.rb b/lib/tdlib/types/update/group_call_participant.rb index b3e7cd5a..b0f28194 100644 --- a/lib/tdlib/types/update/group_call_participant.rb +++ b/lib/tdlib/types/update/group_call_participant.rb @@ -6,7 +6,7 @@ module TD::Types # @attr group_call_id [Integer] Identifier of group call. # @attr participant [TD::Types::GroupCallParticipant] New data about a participant. class Update::GroupCallParticipant < Update - attribute :group_call_id, TD::Types::Integer + attribute :group_call_id, TD::Types::Coercible::Integer attribute :participant, TD::Types::GroupCallParticipant end end diff --git a/lib/tdlib/types/update/installed_sticker_sets.rb b/lib/tdlib/types/update/installed_sticker_sets.rb index 29cf1695..20a5aa86 100644 --- a/lib/tdlib/types/update/installed_sticker_sets.rb +++ b/lib/tdlib/types/update/installed_sticker_sets.rb @@ -5,6 +5,6 @@ module TD::Types # @attr sticker_set_ids [Array] The new list of installed ordinary sticker sets. class Update::InstalledStickerSets < Update attribute :is_masks, TD::Types::Bool - attribute :sticker_set_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :sticker_set_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/update/language_pack_strings.rb b/lib/tdlib/types/update/language_pack_strings.rb index 5969170a..7d0da65c 100644 --- a/lib/tdlib/types/update/language_pack_strings.rb +++ b/lib/tdlib/types/update/language_pack_strings.rb @@ -1,8 +1,8 @@ module TD::Types # Some language pack strings have been updated. # - # @attr localization_target [String] Localization target to which the language pack belongs. - # @attr language_pack_id [String] Identifier of the updated language pack. + # @attr localization_target [TD::Types::String] Localization target to which the language pack belongs. + # @attr language_pack_id [TD::Types::String] Identifier of the updated language pack. # @attr strings [Array] List of changed language pack strings. class Update::LanguagePackStrings < Update attribute :localization_target, TD::Types::String diff --git a/lib/tdlib/types/update/message_content.rb b/lib/tdlib/types/update/message_content.rb index c0446aa7..d73695a1 100644 --- a/lib/tdlib/types/update/message_content.rb +++ b/lib/tdlib/types/update/message_content.rb @@ -5,8 +5,8 @@ module TD::Types # @attr message_id [Integer] Message identifier. # @attr new_content [TD::Types::MessageContent] New message content. class Update::MessageContent < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer attribute :new_content, TD::Types::MessageContent end end diff --git a/lib/tdlib/types/update/message_content_opened.rb b/lib/tdlib/types/update/message_content_opened.rb index fb9fe914..3a3594e6 100644 --- a/lib/tdlib/types/update/message_content_opened.rb +++ b/lib/tdlib/types/update/message_content_opened.rb @@ -6,7 +6,7 @@ module TD::Types # @attr chat_id [Integer] Chat identifier. # @attr message_id [Integer] Message identifier. class Update::MessageContentOpened < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/message_edited.rb b/lib/tdlib/types/update/message_edited.rb index 17a94710..9110b49a 100644 --- a/lib/tdlib/types/update/message_edited.rb +++ b/lib/tdlib/types/update/message_edited.rb @@ -7,9 +7,9 @@ module TD::Types # @attr edit_date [Integer] Point in time (Unix timestamp) when the message was edited. # @attr reply_markup [TD::Types::ReplyMarkup, nil] New message reply markup; may be null. class Update::MessageEdited < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer - attribute :edit_date, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer + attribute :edit_date, TD::Types::Coercible::Integer attribute :reply_markup, TD::Types::ReplyMarkup.optional.default(nil) end end diff --git a/lib/tdlib/types/update/message_interaction_info.rb b/lib/tdlib/types/update/message_interaction_info.rb index 00a3b809..78ed4f60 100644 --- a/lib/tdlib/types/update/message_interaction_info.rb +++ b/lib/tdlib/types/update/message_interaction_info.rb @@ -6,8 +6,8 @@ module TD::Types # @attr interaction_info [TD::Types::MessageInteractionInfo, nil] New information about interactions with the # message; may be null. class Update::MessageInteractionInfo < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer attribute :interaction_info, TD::Types::MessageInteractionInfo.optional.default(nil) end end diff --git a/lib/tdlib/types/update/message_is_pinned.rb b/lib/tdlib/types/update/message_is_pinned.rb index 1a6af284..611e201a 100644 --- a/lib/tdlib/types/update/message_is_pinned.rb +++ b/lib/tdlib/types/update/message_is_pinned.rb @@ -5,8 +5,8 @@ module TD::Types # @attr message_id [Integer] The message identifier. # @attr is_pinned [Boolean] True, if the message is pinned. class Update::MessageIsPinned < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer attribute :is_pinned, TD::Types::Bool end end diff --git a/lib/tdlib/types/update/message_live_location_viewed.rb b/lib/tdlib/types/update/message_live_location_viewed.rb index d0cdf8d8..6f88d29c 100644 --- a/lib/tdlib/types/update/message_live_location_viewed.rb +++ b/lib/tdlib/types/update/message_live_location_viewed.rb @@ -5,7 +5,7 @@ module TD::Types # @attr chat_id [Integer] Identifier of the chat with the live location message. # @attr message_id [Integer] Identifier of the message with live location. class Update::MessageLiveLocationViewed < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/message_mention_read.rb b/lib/tdlib/types/update/message_mention_read.rb index 0c331dd2..6f368f98 100644 --- a/lib/tdlib/types/update/message_mention_read.rb +++ b/lib/tdlib/types/update/message_mention_read.rb @@ -5,8 +5,8 @@ module TD::Types # @attr message_id [Integer] Message identifier. # @attr unread_mention_count [Integer] The new number of unread mention messages left in the chat. class Update::MessageMentionRead < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer - attribute :unread_mention_count, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer + attribute :unread_mention_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/message_send_acknowledged.rb b/lib/tdlib/types/update/message_send_acknowledged.rb index f8cd91c3..34b24cee 100644 --- a/lib/tdlib/types/update/message_send_acknowledged.rb +++ b/lib/tdlib/types/update/message_send_acknowledged.rb @@ -8,7 +8,7 @@ module TD::Types # @attr chat_id [Integer] The chat identifier of the sent message. # @attr message_id [Integer] A temporary message identifier. class Update::MessageSendAcknowledged < Update - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/message_send_failed.rb b/lib/tdlib/types/update/message_send_failed.rb index 54201259..12617abd 100644 --- a/lib/tdlib/types/update/message_send_failed.rb +++ b/lib/tdlib/types/update/message_send_failed.rb @@ -6,11 +6,11 @@ module TD::Types # @attr message [TD::Types::Message] Contains information about the message which failed to send. # @attr old_message_id [Integer] The previous temporary message identifier. # @attr error_code [Integer] An error code. - # @attr error_message [String] Error message. + # @attr error_message [TD::Types::String] Error message. class Update::MessageSendFailed < Update attribute :message, TD::Types::Message - attribute :old_message_id, TD::Types::Integer - attribute :error_code, TD::Types::Integer + attribute :old_message_id, TD::Types::Coercible::Integer + attribute :error_code, TD::Types::Coercible::Integer attribute :error_message, TD::Types::String end end diff --git a/lib/tdlib/types/update/message_send_succeeded.rb b/lib/tdlib/types/update/message_send_succeeded.rb index b2f029f1..0e323731 100644 --- a/lib/tdlib/types/update/message_send_succeeded.rb +++ b/lib/tdlib/types/update/message_send_succeeded.rb @@ -6,6 +6,6 @@ module TD::Types # @attr old_message_id [Integer] The previous temporary message identifier. class Update::MessageSendSucceeded < Update attribute :message, TD::Types::Message - attribute :old_message_id, TD::Types::Integer + attribute :old_message_id, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/new_call_signaling_data.rb b/lib/tdlib/types/update/new_call_signaling_data.rb index 1c20d29e..c9e86c2e 100644 --- a/lib/tdlib/types/update/new_call_signaling_data.rb +++ b/lib/tdlib/types/update/new_call_signaling_data.rb @@ -4,7 +4,7 @@ module TD::Types # @attr call_id [Integer] The call identifier. # @attr data [String] The data. class Update::NewCallSignalingData < Update - attribute :call_id, TD::Types::Integer - attribute :data, TD::Types::String + attribute :call_id, TD::Types::Coercible::Integer + attribute :data, TD::Types::Coercible::String end end diff --git a/lib/tdlib/types/update/new_callback_query.rb b/lib/tdlib/types/update/new_callback_query.rb index 8bc07494..b52d0f26 100644 --- a/lib/tdlib/types/update/new_callback_query.rb +++ b/lib/tdlib/types/update/new_callback_query.rb @@ -8,11 +8,11 @@ module TD::Types # @attr chat_instance [Integer] Identifier that uniquely corresponds to the chat to which the message was sent. # @attr payload [TD::Types::CallbackQueryPayload] Query payload. class Update::NewCallbackQuery < Update - attribute :id, TD::Types::Integer - attribute :sender_user_id, TD::Types::Integer - attribute :chat_id, TD::Types::Integer - attribute :message_id, TD::Types::Integer - attribute :chat_instance, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :sender_user_id, TD::Types::Coercible::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_id, TD::Types::Coercible::Integer + attribute :chat_instance, TD::Types::Coercible::Integer attribute :payload, TD::Types::CallbackQueryPayload end end diff --git a/lib/tdlib/types/update/new_chosen_inline_result.rb b/lib/tdlib/types/update/new_chosen_inline_result.rb index 184315af..2a259aed 100644 --- a/lib/tdlib/types/update/new_chosen_inline_result.rb +++ b/lib/tdlib/types/update/new_chosen_inline_result.rb @@ -3,11 +3,11 @@ module TD::Types # # @attr sender_user_id [Integer] Identifier of the user who sent the query. # @attr user_location [TD::Types::Location, nil] User location; may be null. - # @attr query [String] Text of the query. - # @attr result_id [String] Identifier of the chosen result. - # @attr inline_message_id [String] Identifier of the sent inline message, if known. + # @attr query [TD::Types::String] Text of the query. + # @attr result_id [TD::Types::String] Identifier of the chosen result. + # @attr inline_message_id [TD::Types::String] Identifier of the sent inline message, if known. class Update::NewChosenInlineResult < Update - attribute :sender_user_id, TD::Types::Integer + attribute :sender_user_id, TD::Types::Coercible::Integer attribute :user_location, TD::Types::Location.optional.default(nil) attribute :query, TD::Types::String attribute :result_id, TD::Types::String diff --git a/lib/tdlib/types/update/new_custom_event.rb b/lib/tdlib/types/update/new_custom_event.rb index 5c4b1a68..9b1d234d 100644 --- a/lib/tdlib/types/update/new_custom_event.rb +++ b/lib/tdlib/types/update/new_custom_event.rb @@ -1,7 +1,7 @@ module TD::Types # A new incoming event; for bots only. # - # @attr event [String] A JSON-serialized event. + # @attr event [TD::Types::String] A JSON-serialized event. class Update::NewCustomEvent < Update attribute :event, TD::Types::String end diff --git a/lib/tdlib/types/update/new_custom_query.rb b/lib/tdlib/types/update/new_custom_query.rb index 6ab06459..0437ba51 100644 --- a/lib/tdlib/types/update/new_custom_query.rb +++ b/lib/tdlib/types/update/new_custom_query.rb @@ -2,11 +2,11 @@ module TD::Types # A new incoming query; for bots only. # # @attr id [Integer] The query identifier. - # @attr data [String] JSON-serialized query data. + # @attr data [TD::Types::String] JSON-serialized query data. # @attr timeout [Integer] Query timeout. class Update::NewCustomQuery < Update - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :data, TD::Types::String - attribute :timeout, TD::Types::Integer + attribute :timeout, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/new_inline_callback_query.rb b/lib/tdlib/types/update/new_inline_callback_query.rb index ab04ce14..dc1c1672 100644 --- a/lib/tdlib/types/update/new_inline_callback_query.rb +++ b/lib/tdlib/types/update/new_inline_callback_query.rb @@ -3,14 +3,14 @@ module TD::Types # # @attr id [Integer] Unique query identifier. # @attr sender_user_id [Integer] Identifier of the user who sent the query. - # @attr inline_message_id [String] Identifier of the inline message, from which the query originated. + # @attr inline_message_id [TD::Types::String] Identifier of the inline message, from which the query originated. # @attr chat_instance [Integer] An identifier uniquely corresponding to the chat a message was sent to. # @attr payload [TD::Types::CallbackQueryPayload] Query payload. class Update::NewInlineCallbackQuery < Update - attribute :id, TD::Types::Integer - attribute :sender_user_id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :sender_user_id, TD::Types::Coercible::Integer attribute :inline_message_id, TD::Types::String - attribute :chat_instance, TD::Types::Integer + attribute :chat_instance, TD::Types::Coercible::Integer attribute :payload, TD::Types::CallbackQueryPayload end end diff --git a/lib/tdlib/types/update/new_inline_query.rb b/lib/tdlib/types/update/new_inline_query.rb index c4a8fb79..29a580cb 100644 --- a/lib/tdlib/types/update/new_inline_query.rb +++ b/lib/tdlib/types/update/new_inline_query.rb @@ -6,11 +6,11 @@ module TD::Types # @attr user_location [TD::Types::Location, nil] User location; may be null. # @attr chat_type [TD::Types::ChatType, nil] Contains information about the type of the chat, from which the query # originated; may be null if unknown. - # @attr query [String] Text of the query. - # @attr offset [String] Offset of the first entry to return. + # @attr query [TD::Types::String] Text of the query. + # @attr offset [TD::Types::String] Offset of the first entry to return. class Update::NewInlineQuery < Update - attribute :id, TD::Types::Integer - attribute :sender_user_id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :sender_user_id, TD::Types::Coercible::Integer attribute :user_location, TD::Types::Location.optional.default(nil) attribute :chat_type, TD::Types::ChatType.optional.default(nil) attribute :query, TD::Types::String diff --git a/lib/tdlib/types/update/new_pre_checkout_query.rb b/lib/tdlib/types/update/new_pre_checkout_query.rb index af15513c..0c268e9f 100644 --- a/lib/tdlib/types/update/new_pre_checkout_query.rb +++ b/lib/tdlib/types/update/new_pre_checkout_query.rb @@ -4,18 +4,18 @@ module TD::Types # # @attr id [Integer] Unique query identifier. # @attr sender_user_id [Integer] Identifier of the user who sent the query. - # @attr currency [String] Currency for the product price. + # @attr currency [TD::Types::String] Currency for the product price. # @attr total_amount [Integer] Total price for the product, in the smallest units of the currency. # @attr invoice_payload [String] Invoice payload. - # @attr shipping_option_id [String, nil] Identifier of a shipping option chosen by the user; may be empty if not - # applicable. + # @attr shipping_option_id [TD::Types::String, nil] Identifier of a shipping option chosen by the user; may be empty + # if not applicable. # @attr order_info [TD::Types::OrderInfo, nil] Information about the order; may be null. class Update::NewPreCheckoutQuery < Update - attribute :id, TD::Types::Integer - attribute :sender_user_id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :sender_user_id, TD::Types::Coercible::Integer attribute :currency, TD::Types::String - attribute :total_amount, TD::Types::Integer - attribute :invoice_payload, TD::Types::String + attribute :total_amount, TD::Types::Coercible::Integer + attribute :invoice_payload, TD::Types::Coercible::String attribute :shipping_option_id, TD::Types::String.optional.default(nil) attribute :order_info, TD::Types::OrderInfo.optional.default(nil) end diff --git a/lib/tdlib/types/update/new_shipping_query.rb b/lib/tdlib/types/update/new_shipping_query.rb index bdc517c2..9bcbdba8 100644 --- a/lib/tdlib/types/update/new_shipping_query.rb +++ b/lib/tdlib/types/update/new_shipping_query.rb @@ -4,11 +4,11 @@ module TD::Types # # @attr id [Integer] Unique query identifier. # @attr sender_user_id [Integer] Identifier of the user who sent the query. - # @attr invoice_payload [String] Invoice payload. + # @attr invoice_payload [TD::Types::String] Invoice payload. # @attr shipping_address [TD::Types::Address] User shipping address. class Update::NewShippingQuery < Update - attribute :id, TD::Types::Integer - attribute :sender_user_id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer + attribute :sender_user_id, TD::Types::Coercible::Integer attribute :invoice_payload, TD::Types::String attribute :shipping_address, TD::Types::Address end diff --git a/lib/tdlib/types/update/notification.rb b/lib/tdlib/types/update/notification.rb index da216986..c27ee532 100644 --- a/lib/tdlib/types/update/notification.rb +++ b/lib/tdlib/types/update/notification.rb @@ -4,7 +4,7 @@ module TD::Types # @attr notification_group_id [Integer] Unique notification group identifier. # @attr notification [TD::Types::Notification] Changed notification. class Update::Notification < Update - attribute :notification_group_id, TD::Types::Integer + attribute :notification_group_id, TD::Types::Coercible::Integer attribute :notification, TD::Types::Notification end end diff --git a/lib/tdlib/types/update/notification_group.rb b/lib/tdlib/types/update/notification_group.rb index cca5284e..3a70431a 100644 --- a/lib/tdlib/types/update/notification_group.rb +++ b/lib/tdlib/types/update/notification_group.rb @@ -14,13 +14,13 @@ module TD::Types # @attr removed_notification_ids [Array] Identifiers of removed group notifications, sorted by notification # ID. class Update::NotificationGroup < Update - attribute :notification_group_id, TD::Types::Integer + attribute :notification_group_id, TD::Types::Coercible::Integer attribute :type, TD::Types::NotificationGroupType - attribute :chat_id, TD::Types::Integer - attribute :notification_settings_chat_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :notification_settings_chat_id, TD::Types::Coercible::Integer attribute :is_silent, TD::Types::Bool - attribute :total_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer attribute :added_notifications, TD::Types::Array.of(TD::Types::Notification) - attribute :removed_notification_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :removed_notification_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/update/option.rb b/lib/tdlib/types/update/option.rb index d7c0b710..99b0b3b0 100644 --- a/lib/tdlib/types/update/option.rb +++ b/lib/tdlib/types/update/option.rb @@ -1,7 +1,7 @@ module TD::Types # An option changed its value. # - # @attr name [String] The option name. + # @attr name [TD::Types::String] The option name. # @attr value [TD::Types::OptionValue] The new option value. class Update::Option < Update attribute :name, TD::Types::String diff --git a/lib/tdlib/types/update/poll_answer.rb b/lib/tdlib/types/update/poll_answer.rb index 5513bb5b..90103384 100644 --- a/lib/tdlib/types/update/poll_answer.rb +++ b/lib/tdlib/types/update/poll_answer.rb @@ -5,8 +5,8 @@ module TD::Types # @attr user_id [Integer] The user, who changed the answer to the poll. # @attr option_ids [Array] 0-based identifiers of answer options, chosen by the user. class Update::PollAnswer < Update - attribute :poll_id, TD::Types::Integer - attribute :user_id, TD::Types::Integer - attribute :option_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :poll_id, TD::Types::Coercible::Integer + attribute :user_id, TD::Types::Coercible::Integer + attribute :option_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/update/recent_stickers.rb b/lib/tdlib/types/update/recent_stickers.rb index 7e4dcaae..217b22b0 100644 --- a/lib/tdlib/types/update/recent_stickers.rb +++ b/lib/tdlib/types/update/recent_stickers.rb @@ -6,6 +6,6 @@ module TD::Types # @attr sticker_ids [Array] The new list of file identifiers of recently used stickers. class Update::RecentStickers < Update attribute :is_attached, TD::Types::Bool - attribute :sticker_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :sticker_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/update/saved_animations.rb b/lib/tdlib/types/update/saved_animations.rb index 38fcaacc..9d420abe 100644 --- a/lib/tdlib/types/update/saved_animations.rb +++ b/lib/tdlib/types/update/saved_animations.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr animation_ids [Array] The new list of file identifiers of saved animations. class Update::SavedAnimations < Update - attribute :animation_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :animation_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/update/service_notification.rb b/lib/tdlib/types/update/service_notification.rb index bbe43b29..f9ba714b 100644 --- a/lib/tdlib/types/update/service_notification.rb +++ b/lib/tdlib/types/update/service_notification.rb @@ -2,7 +2,7 @@ module TD::Types # Service notification from the server. # Upon receiving this the application must show a popup with the content of the notification. # - # @attr type [String] Notification type. + # @attr type [TD::Types::String] Notification type. # If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; # if user presses the second, all local data should be destroyed using Destroy method. # @attr content [TD::Types::MessageContent] Notification content. diff --git a/lib/tdlib/types/update/supergroup_full_info.rb b/lib/tdlib/types/update/supergroup_full_info.rb index 951a1710..17307918 100644 --- a/lib/tdlib/types/update/supergroup_full_info.rb +++ b/lib/tdlib/types/update/supergroup_full_info.rb @@ -4,7 +4,7 @@ module TD::Types # @attr supergroup_id [Integer] Identifier of the supergroup or channel. # @attr supergroup_full_info [TD::Types::SupergroupFullInfo] New full information about the supergroup. class Update::SupergroupFullInfo < Update - attribute :supergroup_id, TD::Types::Integer + attribute :supergroup_id, TD::Types::Coercible::Integer attribute :supergroup_full_info, TD::Types::SupergroupFullInfo end end diff --git a/lib/tdlib/types/update/terms_of_service.rb b/lib/tdlib/types/update/terms_of_service.rb index 5de5c057..9d6fd5de 100644 --- a/lib/tdlib/types/update/terms_of_service.rb +++ b/lib/tdlib/types/update/terms_of_service.rb @@ -3,7 +3,7 @@ module TD::Types # If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS # update". # - # @attr terms_of_service_id [String] Identifier of the terms of service. + # @attr terms_of_service_id [TD::Types::String] Identifier of the terms of service. # @attr terms_of_service [TD::Types::TermsOfService] The new terms of service. class Update::TermsOfService < Update attribute :terms_of_service_id, TD::Types::String diff --git a/lib/tdlib/types/update/unread_chat_count.rb b/lib/tdlib/types/update/unread_chat_count.rb index 92362da7..e3b9081a 100644 --- a/lib/tdlib/types/update/unread_chat_count.rb +++ b/lib/tdlib/types/update/unread_chat_count.rb @@ -11,10 +11,10 @@ module TD::Types # @attr marked_as_unread_unmuted_count [Integer] Total number of unmuted chats marked as unread. class Update::UnreadChatCount < Update attribute :chat_list, TD::Types::ChatList - attribute :total_count, TD::Types::Integer - attribute :unread_count, TD::Types::Integer - attribute :unread_unmuted_count, TD::Types::Integer - attribute :marked_as_unread_count, TD::Types::Integer - attribute :marked_as_unread_unmuted_count, TD::Types::Integer + attribute :total_count, TD::Types::Coercible::Integer + attribute :unread_count, TD::Types::Coercible::Integer + attribute :unread_unmuted_count, TD::Types::Coercible::Integer + attribute :marked_as_unread_count, TD::Types::Coercible::Integer + attribute :marked_as_unread_unmuted_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/unread_message_count.rb b/lib/tdlib/types/update/unread_message_count.rb index fa8862e8..361a0862 100644 --- a/lib/tdlib/types/update/unread_message_count.rb +++ b/lib/tdlib/types/update/unread_message_count.rb @@ -7,7 +7,7 @@ module TD::Types # @attr unread_unmuted_count [Integer] Total number of unread messages in unmuted chats. class Update::UnreadMessageCount < Update attribute :chat_list, TD::Types::ChatList - attribute :unread_count, TD::Types::Integer - attribute :unread_unmuted_count, TD::Types::Integer + attribute :unread_count, TD::Types::Coercible::Integer + attribute :unread_unmuted_count, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/update/user_chat_action.rb b/lib/tdlib/types/update/user_chat_action.rb index 10a72241..c6f7963e 100644 --- a/lib/tdlib/types/update/user_chat_action.rb +++ b/lib/tdlib/types/update/user_chat_action.rb @@ -6,9 +6,9 @@ module TD::Types # @attr user_id [Integer] Identifier of a user performing an action. # @attr action [TD::Types::ChatAction] The action description. class Update::UserChatAction < Update - attribute :chat_id, TD::Types::Integer - attribute :message_thread_id, TD::Types::Integer - attribute :user_id, TD::Types::Integer + attribute :chat_id, TD::Types::Coercible::Integer + attribute :message_thread_id, TD::Types::Coercible::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :action, TD::Types::ChatAction end end diff --git a/lib/tdlib/types/update/user_full_info.rb b/lib/tdlib/types/update/user_full_info.rb index c18bc5dd..41edc81e 100644 --- a/lib/tdlib/types/update/user_full_info.rb +++ b/lib/tdlib/types/update/user_full_info.rb @@ -4,7 +4,7 @@ module TD::Types # @attr user_id [Integer] User identifier. # @attr user_full_info [TD::Types::UserFullInfo] New full information about the user. class Update::UserFullInfo < Update - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :user_full_info, TD::Types::UserFullInfo end end diff --git a/lib/tdlib/types/update/user_status.rb b/lib/tdlib/types/update/user_status.rb index 20809f09..0eae18b4 100644 --- a/lib/tdlib/types/update/user_status.rb +++ b/lib/tdlib/types/update/user_status.rb @@ -4,7 +4,7 @@ module TD::Types # @attr user_id [Integer] User identifier. # @attr status [TD::Types::UserStatus] New status of the user. class Update::UserStatus < Update - attribute :user_id, TD::Types::Integer + attribute :user_id, TD::Types::Coercible::Integer attribute :status, TD::Types::UserStatus end end diff --git a/lib/tdlib/types/user.rb b/lib/tdlib/types/user.rb index 92e6e470..4263f4f3 100644 --- a/lib/tdlib/types/user.rb +++ b/lib/tdlib/types/user.rb @@ -2,10 +2,10 @@ module TD::Types # Represents a user. # # @attr id [Integer] User identifier. - # @attr first_name [String] First name of the user. - # @attr last_name [String] Last name of the user. - # @attr username [String] Username of the user. - # @attr phone_number [String] Phone number of the user. + # @attr first_name [TD::Types::String] First name of the user. + # @attr last_name [TD::Types::String] Last name of the user. + # @attr username [TD::Types::String] Username of the user. + # @attr phone_number [TD::Types::String] Phone number of the user. # @attr status [TD::Types::UserStatus] Current online status of the user. # @attr profile_photo [TD::Types::ProfilePhoto, nil] Profile photo of the user; may be null. # @attr is_contact [Boolean] The user is a contact of the current user. @@ -13,17 +13,17 @@ module TD::Types # the user. # @attr is_verified [Boolean] True, if the user is verified. # @attr is_support [Boolean] True, if the user is Telegram support account. - # @attr restriction_reason [String] If non-empty, it contains a human-readable description of the reason why access - # to this user must be restricted. + # @attr restriction_reason [TD::Types::String] If non-empty, it contains a human-readable description of the reason + # why access to this user must be restricted. # @attr is_scam [Boolean] True, if many users reported this user as a scam. # @attr is_fake [Boolean] True, if many users reported this user as a fake account. # @attr have_access [Boolean] If false, the user is inaccessible, and the only information known about the user is # inside this class. # It can't be passed to any method except GetUser. # @attr type [TD::Types::UserType] Type of the user. - # @attr language_code [String] IETF language tag of the user's language; only available to bots. + # @attr language_code [TD::Types::String] IETF language tag of the user's language; only available to bots. class User < Base - attribute :id, TD::Types::Integer + attribute :id, TD::Types::Coercible::Integer attribute :first_name, TD::Types::String attribute :last_name, TD::Types::String attribute :username, TD::Types::String diff --git a/lib/tdlib/types/user_full_info.rb b/lib/tdlib/types/user_full_info.rb index 65f88160..b0092683 100644 --- a/lib/tdlib/types/user_full_info.rb +++ b/lib/tdlib/types/user_full_info.rb @@ -8,8 +8,8 @@ module TD::Types # @attr has_private_calls [Boolean] True, if the user can't be called due to their privacy settings. # @attr need_phone_number_privacy_exception [Boolean] True, if the current user needs to explicitly allow to share # their phone number with the user when the method addContact is used. - # @attr bio [String] A short user bio. - # @attr share_text [String] For bots, the text that is included with the link when users share the bot. + # @attr bio [TD::Types::String] A short user bio. + # @attr share_text [TD::Types::String] For bots, the text that is included with the link when users share the bot. # @attr group_in_common_count [Integer] Number of group chats where both the other user and the current user are a # member; 0 for the current user. # @attr bot_info [TD::Types::BotInfo, nil] If the user is a bot, information about the bot; may be null. @@ -22,7 +22,7 @@ class UserFullInfo < Base attribute :need_phone_number_privacy_exception, TD::Types::Bool attribute :bio, TD::Types::String attribute :share_text, TD::Types::String - attribute :group_in_common_count, TD::Types::Integer + attribute :group_in_common_count, TD::Types::Coercible::Integer attribute :bot_info, TD::Types::BotInfo.optional.default(nil) end end diff --git a/lib/tdlib/types/user_privacy_setting_rule/allow_chat_members.rb b/lib/tdlib/types/user_privacy_setting_rule/allow_chat_members.rb index 8ba529e7..bd82886c 100644 --- a/lib/tdlib/types/user_privacy_setting_rule/allow_chat_members.rb +++ b/lib/tdlib/types/user_privacy_setting_rule/allow_chat_members.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr chat_ids [Array] The chat identifiers, total number of chats in all rules must not exceed 20. class UserPrivacySettingRule::AllowChatMembers < UserPrivacySettingRule - attribute :chat_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :chat_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/user_privacy_setting_rule/allow_users.rb b/lib/tdlib/types/user_privacy_setting_rule/allow_users.rb index c3a1cce4..e300c215 100644 --- a/lib/tdlib/types/user_privacy_setting_rule/allow_users.rb +++ b/lib/tdlib/types/user_privacy_setting_rule/allow_users.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr user_ids [Array] The user identifiers, total number of users in all rules must not exceed 1000. class UserPrivacySettingRule::AllowUsers < UserPrivacySettingRule - attribute :user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/user_privacy_setting_rule/restrict_chat_members.rb b/lib/tdlib/types/user_privacy_setting_rule/restrict_chat_members.rb index 3a324735..e1bbae0f 100644 --- a/lib/tdlib/types/user_privacy_setting_rule/restrict_chat_members.rb +++ b/lib/tdlib/types/user_privacy_setting_rule/restrict_chat_members.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr chat_ids [Array] The chat identifiers, total number of chats in all rules must not exceed 20. class UserPrivacySettingRule::RestrictChatMembers < UserPrivacySettingRule - attribute :chat_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :chat_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/user_privacy_setting_rule/restrict_users.rb b/lib/tdlib/types/user_privacy_setting_rule/restrict_users.rb index bd67b667..6638a527 100644 --- a/lib/tdlib/types/user_privacy_setting_rule/restrict_users.rb +++ b/lib/tdlib/types/user_privacy_setting_rule/restrict_users.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr user_ids [Array] The user identifiers, total number of users in all rules must not exceed 1000. class UserPrivacySettingRule::RestrictUsers < UserPrivacySettingRule - attribute :user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/user_status/offline.rb b/lib/tdlib/types/user_status/offline.rb index 31bc26df..43a96372 100644 --- a/lib/tdlib/types/user_status/offline.rb +++ b/lib/tdlib/types/user_status/offline.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr was_online [Integer] Point in time (Unix timestamp) when the user was last online. class UserStatus::Offline < UserStatus - attribute :was_online, TD::Types::Integer + attribute :was_online, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/user_status/online.rb b/lib/tdlib/types/user_status/online.rb index 12275257..91398ed2 100644 --- a/lib/tdlib/types/user_status/online.rb +++ b/lib/tdlib/types/user_status/online.rb @@ -3,6 +3,6 @@ module TD::Types # # @attr expires [Integer] Point in time (Unix timestamp) when the user's online status will expire. class UserStatus::Online < UserStatus - attribute :expires, TD::Types::Integer + attribute :expires, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/user_type/bot.rb b/lib/tdlib/types/user_type/bot.rb index 984fbec5..6a900a71 100644 --- a/lib/tdlib/types/user_type/bot.rb +++ b/lib/tdlib/types/user_type/bot.rb @@ -6,7 +6,8 @@ module TD::Types # chats and not just those addressed to the bot. # In private and channel chats a bot can always read all messages. # @attr is_inline [Boolean] True, if the bot supports inline queries. - # @attr inline_query_placeholder [String] Placeholder for inline queries (displayed on the application input field). + # @attr inline_query_placeholder [TD::Types::String] Placeholder for inline queries (displayed on the application + # input field). # @attr need_location [Boolean] True, if the location of the user should be sent with every inline query to this bot. class UserType::Bot < UserType attribute :can_join_groups, TD::Types::Bool diff --git a/lib/tdlib/types/users.rb b/lib/tdlib/types/users.rb index 743ec87d..ee49a29f 100644 --- a/lib/tdlib/types/users.rb +++ b/lib/tdlib/types/users.rb @@ -4,7 +4,7 @@ module TD::Types # @attr total_count [Integer] Approximate total count of users found. # @attr user_ids [Array] A list of user identifiers. class Users < Base - attribute :total_count, TD::Types::Integer - attribute :user_ids, TD::Types::Array.of(TD::Types::Integer) + attribute :total_count, TD::Types::Coercible::Integer + attribute :user_ids, TD::Types::Array.of(TD::Types::Coercible::Integer) end end diff --git a/lib/tdlib/types/validated_order_info.rb b/lib/tdlib/types/validated_order_info.rb index 8aa84a1d..37e7e527 100644 --- a/lib/tdlib/types/validated_order_info.rb +++ b/lib/tdlib/types/validated_order_info.rb @@ -2,7 +2,7 @@ module TD::Types # Contains a temporary identifier of validated order information, which is stored for one hour. # Also contains the available shipping options. # - # @attr order_info_id [String] Temporary identifier of the order information. + # @attr order_info_id [TD::Types::String] Temporary identifier of the order information. # @attr shipping_options [Array] Available shipping options. class ValidatedOrderInfo < Base attribute :order_info_id, TD::Types::String diff --git a/lib/tdlib/types/venue.rb b/lib/tdlib/types/venue.rb index 4650c965..bd0e9fb0 100644 --- a/lib/tdlib/types/venue.rb +++ b/lib/tdlib/types/venue.rb @@ -2,12 +2,12 @@ module TD::Types # Describes a venue. # # @attr location [TD::Types::Location] Venue location; as defined by the sender. - # @attr title [String] Venue name; as defined by the sender. - # @attr address [String] Venue address; as defined by the sender. - # @attr provider [String] Provider of the venue database; as defined by the sender. + # @attr title [TD::Types::String] Venue name; as defined by the sender. + # @attr address [TD::Types::String] Venue address; as defined by the sender. + # @attr provider [TD::Types::String] Provider of the venue database; as defined by the sender. # Currently only "foursquare" and "gplaces" (Google Places) need to be supported. - # @attr id [String] Identifier of the venue in the provider database; as defined by the sender. - # @attr type [String] Type of the venue in the provider database; as defined by the sender. + # @attr id [TD::Types::String] Identifier of the venue in the provider database; as defined by the sender. + # @attr type [TD::Types::String] Type of the venue in the provider database; as defined by the sender. class Venue < Base attribute :location, TD::Types::Location attribute :title, TD::Types::String diff --git a/lib/tdlib/types/video.rb b/lib/tdlib/types/video.rb index ebf3f7e6..407455cf 100644 --- a/lib/tdlib/types/video.rb +++ b/lib/tdlib/types/video.rb @@ -4,8 +4,8 @@ module TD::Types # @attr duration [Integer] Duration of the video, in seconds; as defined by the sender. # @attr width [Integer] Video width; as defined by the sender. # @attr height [Integer] Video height; as defined by the sender. - # @attr file_name [String] Original name of the file; as defined by the sender. - # @attr mime_type [String] MIME type of the file; as defined by the sender. + # @attr file_name [TD::Types::String] Original name of the file; as defined by the sender. + # @attr mime_type [TD::Types::String] MIME type of the file; as defined by the sender. # @attr has_stickers [Boolean] True, if stickers were added to the video. # The list of corresponding sticker sets can be received using getAttachedStickerSets. # @attr supports_streaming [Boolean] True, if the video should be tried to be streamed. @@ -14,9 +14,9 @@ module TD::Types # be null. # @attr video [TD::Types::File] File containing the video. class Video < Base - attribute :duration, TD::Types::Integer - attribute :width, TD::Types::Integer - attribute :height, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer + attribute :width, TD::Types::Coercible::Integer + attribute :height, TD::Types::Coercible::Integer attribute :file_name, TD::Types::String attribute :mime_type, TD::Types::String attribute :has_stickers, TD::Types::Bool diff --git a/lib/tdlib/types/video_note.rb b/lib/tdlib/types/video_note.rb index 183ee575..5a447e19 100644 --- a/lib/tdlib/types/video_note.rb +++ b/lib/tdlib/types/video_note.rb @@ -8,8 +8,8 @@ module TD::Types # @attr thumbnail [TD::Types::Thumbnail, nil] Video thumbnail in JPEG format; as defined by the sender; may be null. # @attr video [TD::Types::File] File containing the video. class VideoNote < Base - attribute :duration, TD::Types::Integer - attribute :length, TD::Types::Integer + attribute :duration, TD::Types::Coercible::Integer + attribute :length, TD::Types::Coercible::Integer attribute :minithumbnail, TD::Types::Minithumbnail.optional.default(nil) attribute :thumbnail, TD::Types::Thumbnail.optional.default(nil) attribute :video, TD::Types::File diff --git a/lib/tdlib/types/voice_chat.rb b/lib/tdlib/types/voice_chat.rb index b2db1cb1..72994363 100644 --- a/lib/tdlib/types/voice_chat.rb +++ b/lib/tdlib/types/voice_chat.rb @@ -7,7 +7,7 @@ module TD::Types # @attr default_participant_id [TD::Types::MessageSender, nil] Default group call participant identifier to join the # voice chat; may be null. class VoiceChat < Base - attribute :group_call_id, TD::Types::Integer + attribute :group_call_id, TD::Types::Coercible::Integer attribute :has_participants, TD::Types::Bool attribute :default_participant_id, TD::Types::MessageSender.optional.default(nil) end diff --git a/lib/tdlib/types/voice_note.rb b/lib/tdlib/types/voice_note.rb index 3de2c83b..448d0680 100644 --- a/lib/tdlib/types/voice_note.rb +++ b/lib/tdlib/types/voice_note.rb @@ -5,11 +5,11 @@ module TD::Types # # @attr duration [Integer] Duration of the voice note, in seconds; as defined by the sender. # @attr waveform [String] A waveform representation of the voice note in 5-bit format. - # @attr mime_type [String] MIME type of the file; as defined by the sender. + # @attr mime_type [TD::Types::String] MIME type of the file; as defined by the sender. # @attr voice [TD::Types::File] File containing the voice note. class VoiceNote < Base - attribute :duration, TD::Types::Integer - attribute :waveform, TD::Types::String + attribute :duration, TD::Types::Coercible::Integer + attribute :waveform, TD::Types::Coercible::String attribute :mime_type, TD::Types::String attribute :voice, TD::Types::File end diff --git a/lib/tdlib/types/web_page.rb b/lib/tdlib/types/web_page.rb index e480e6e1..a8705dbc 100644 --- a/lib/tdlib/types/web_page.rb +++ b/lib/tdlib/types/web_page.rb @@ -1,20 +1,20 @@ module TD::Types # Describes a web page preview. # - # @attr url [String] Original URL of the link. - # @attr display_url [String] URL to display. - # @attr type [String] Type of the web page. + # @attr url [TD::Types::String] Original URL of the link. + # @attr display_url [TD::Types::String] URL to display. + # @attr type [TD::Types::String] Type of the web page. # Can be: article, photo, audio, video, document, profile, app, or something else. - # @attr site_name [String] Short name of the site (e.g., Google Docs, App Store). - # @attr title [String] Title of the content. + # @attr site_name [TD::Types::String] Short name of the site (e.g., Google Docs, App Store). + # @attr title [TD::Types::String] Title of the content. # @attr description [TD::Types::FormattedText] Description of the content. # @attr photo [TD::Types::Photo, nil] Image representing the content; may be null. - # @attr embed_url [String] URL to show in the embedded preview. - # @attr embed_type [String] MIME type of the embedded preview, (e.g., text/html or video/mp4). + # @attr embed_url [TD::Types::String] URL to show in the embedded preview. + # @attr embed_type [TD::Types::String] MIME type of the embedded preview, (e.g., text/html or video/mp4). # @attr embed_width [Integer] Width of the embedded preview. # @attr embed_height [Integer] Height of the embedded preview. # @attr duration [Integer] Duration of the content, in seconds. - # @attr author [String] Author of the content. + # @attr author [TD::Types::String] Author of the content. # @attr animation [TD::Types::Animation, nil] Preview of the content as an animation, if available; may be null. # @attr audio [TD::Types::Audio, nil] Preview of the content as an audio file, if available; may be null. # @attr document [TD::Types::Document, nil] Preview of the content as a document, if available (currently only @@ -36,9 +36,9 @@ class WebPage < Base attribute :photo, TD::Types::Photo.optional.default(nil) attribute :embed_url, TD::Types::String attribute :embed_type, TD::Types::String - attribute :embed_width, TD::Types::Integer - attribute :embed_height, TD::Types::Integer - attribute :duration, TD::Types::Integer + attribute :embed_width, TD::Types::Coercible::Integer + attribute :embed_height, TD::Types::Coercible::Integer + attribute :duration, TD::Types::Coercible::Integer attribute :author, TD::Types::String attribute :animation, TD::Types::Animation.optional.default(nil) attribute :audio, TD::Types::Audio.optional.default(nil) @@ -47,6 +47,6 @@ class WebPage < Base attribute :video, TD::Types::Video.optional.default(nil) attribute :video_note, TD::Types::VideoNote.optional.default(nil) attribute :voice_note, TD::Types::VoiceNote.optional.default(nil) - attribute :instant_view_version, TD::Types::Integer + attribute :instant_view_version, TD::Types::Coercible::Integer end end diff --git a/lib/tdlib/types/web_page_instant_view.rb b/lib/tdlib/types/web_page_instant_view.rb index bd5688c9..05d07558 100644 --- a/lib/tdlib/types/web_page_instant_view.rb +++ b/lib/tdlib/types/web_page_instant_view.rb @@ -9,8 +9,8 @@ module TD::Types # A network request might be needed to get the full web page instant view. class WebPageInstantView < Base attribute :page_blocks, TD::Types::Array.of(TD::Types::PageBlock) - attribute :view_count, TD::Types::Integer - attribute :version, TD::Types::Integer + attribute :view_count, TD::Types::Coercible::Integer + attribute :version, TD::Types::Coercible::Integer attribute :is_rtl, TD::Types::Bool attribute :is_full, TD::Types::Bool end diff --git a/tdlib-schema.gemspec b/tdlib-schema.gemspec index 8325752e..bac8c80a 100644 --- a/tdlib-schema.gemspec +++ b/tdlib-schema.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "tdlib-schema" - spec.version = "1.7.0.1" + spec.version = "1.7.0.2" spec.authors = ["Southbridge"] spec.email = ["ask@southbridge.io"]