telegram-bot-ruby 0.23.0 → 1.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env.sample +2 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +2 -1
- data/README.md +25 -13
- data/Rakefile +43 -0
- data/lib/telegram/bot/types/animation.rb +9 -9
- data/lib/telegram/bot/types/audio.rb +9 -9
- data/lib/telegram/bot/types/base.rb +3 -2
- data/lib/telegram/bot/types/bot_command.rb +2 -2
- data/lib/telegram/bot/types/bot_command_scope_all_chat_administrators.rb +1 -1
- data/lib/telegram/bot/types/bot_command_scope_all_group_chats.rb +1 -1
- data/lib/telegram/bot/types/bot_command_scope_all_private_chats.rb +1 -1
- data/lib/telegram/bot/types/bot_command_scope_chat.rb +2 -2
- data/lib/telegram/bot/types/bot_command_scope_chat_administrators.rb +2 -2
- data/lib/telegram/bot/types/bot_command_scope_chat_member.rb +3 -3
- data/lib/telegram/bot/types/bot_command_scope_default.rb +1 -1
- data/lib/telegram/bot/types/callback_query.rb +6 -6
- data/lib/telegram/bot/types/chat.rb +27 -28
- data/lib/telegram/bot/types/chat_administrator_rights.rb +13 -12
- data/lib/telegram/bot/types/chat_invite_link.rb +8 -8
- data/lib/telegram/bot/types/chat_join_request.rb +3 -3
- data/lib/telegram/bot/types/chat_location.rb +1 -1
- data/lib/telegram/bot/types/chat_member.rb +0 -22
- data/lib/telegram/bot/types/chat_member_administrator.rb +26 -0
- data/lib/telegram/bot/types/chat_member_banned.rb +13 -0
- data/lib/telegram/bot/types/chat_member_left.rb +12 -0
- data/lib/telegram/bot/types/chat_member_member.rb +12 -0
- data/lib/telegram/bot/types/chat_member_owner.rb +14 -0
- data/lib/telegram/bot/types/chat_member_restricted.rb +23 -0
- data/lib/telegram/bot/types/chat_member_updated.rb +2 -2
- data/lib/telegram/bot/types/chat_permissions.rb +9 -8
- data/lib/telegram/bot/types/chat_photo.rb +4 -4
- data/lib/telegram/bot/types/chosen_inline_result.rb +4 -4
- data/lib/telegram/bot/types/contact.rb +5 -5
- data/lib/telegram/bot/types/dice.rb +2 -2
- data/lib/telegram/bot/types/document.rb +6 -6
- data/lib/telegram/bot/types/encrypted_credentials.rb +3 -3
- data/lib/telegram/bot/types/encrypted_passport_element.rb +10 -10
- data/lib/telegram/bot/types/file.rb +4 -4
- data/lib/telegram/bot/types/force_reply.rb +3 -3
- data/lib/telegram/bot/types/forum_topic.rb +14 -0
- data/lib/telegram/bot/types/forum_topic_closed.rb +10 -0
- data/lib/telegram/bot/types/forum_topic_created.rb +13 -0
- data/lib/telegram/bot/types/forum_topic_reopened.rb +10 -0
- data/lib/telegram/bot/types/game.rb +6 -6
- data/lib/telegram/bot/types/game_high_score.rb +2 -2
- data/lib/telegram/bot/types/inline_keyboard_button.rb +9 -9
- data/lib/telegram/bot/types/inline_keyboard_markup.rb +1 -1
- data/lib/telegram/bot/types/inline_query.rb +5 -5
- data/lib/telegram/bot/types/inline_query_result_article.rb +10 -10
- data/lib/telegram/bot/types/inline_query_result_audio.rb +11 -10
- data/lib/telegram/bot/types/inline_query_result_cached_audio.rb +8 -7
- data/lib/telegram/bot/types/inline_query_result_cached_document.rb +10 -9
- data/lib/telegram/bot/types/inline_query_result_cached_gif.rb +9 -8
- data/lib/telegram/bot/types/inline_query_result_cached_mpeg4_gif.rb +9 -8
- data/lib/telegram/bot/types/inline_query_result_cached_photo.rb +10 -9
- data/lib/telegram/bot/types/inline_query_result_cached_sticker.rb +5 -5
- data/lib/telegram/bot/types/inline_query_result_cached_video.rb +10 -9
- data/lib/telegram/bot/types/inline_query_result_cached_voice.rb +9 -8
- data/lib/telegram/bot/types/inline_query_result_contact.rb +11 -11
- data/lib/telegram/bot/types/inline_query_result_document.rb +14 -13
- data/lib/telegram/bot/types/inline_query_result_game.rb +4 -4
- data/lib/telegram/bot/types/inline_query_result_gif.rb +14 -12
- data/lib/telegram/bot/types/inline_query_result_location.rb +14 -14
- data/lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb +14 -13
- data/lib/telegram/bot/types/inline_query_result_photo.rb +13 -12
- data/lib/telegram/bot/types/inline_query_result_venue.rb +15 -15
- data/lib/telegram/bot/types/inline_query_result_video.rb +15 -14
- data/lib/telegram/bot/types/inline_query_result_voice.rb +10 -9
- data/lib/telegram/bot/types/input_contact_message_content.rb +4 -4
- data/lib/telegram/bot/types/input_invoice_message_content.rb +20 -20
- data/lib/telegram/bot/types/input_location_message_content.rb +6 -6
- data/lib/telegram/bot/types/input_media_animation.rb +9 -8
- data/lib/telegram/bot/types/input_media_audio.rb +9 -8
- data/lib/telegram/bot/types/input_media_document.rb +7 -7
- data/lib/telegram/bot/types/input_media_photo.rb +5 -4
- data/lib/telegram/bot/types/input_media_video.rb +10 -8
- data/lib/telegram/bot/types/input_text_message_content.rb +4 -3
- data/lib/telegram/bot/types/input_venue_message_content.rb +8 -8
- data/lib/telegram/bot/types/invoice.rb +5 -5
- data/lib/telegram/bot/types/keyboard_button.rb +5 -5
- data/lib/telegram/bot/types/keyboard_button_poll_type.rb +1 -1
- data/lib/telegram/bot/types/labeled_price.rb +2 -2
- data/lib/telegram/bot/types/location.rb +6 -6
- data/lib/telegram/bot/types/login_url.rb +4 -4
- data/lib/telegram/bot/types/mask_position.rb +4 -4
- data/lib/telegram/bot/types/menu_button_commands.rb +1 -1
- data/lib/telegram/bot/types/menu_button_default.rb +1 -1
- data/lib/telegram/bot/types/menu_button_web_app.rb +2 -2
- data/lib/telegram/bot/types/message.rb +63 -58
- data/lib/telegram/bot/types/message_auto_delete_timer_changed.rb +1 -1
- data/lib/telegram/bot/types/message_entity.rb +7 -7
- data/lib/telegram/bot/types/order_info.rb +4 -4
- data/lib/telegram/bot/types/passport_data.rb +1 -1
- data/lib/telegram/bot/types/passport_element_error_data_field.rb +5 -5
- data/lib/telegram/bot/types/passport_element_error_file.rb +4 -4
- data/lib/telegram/bot/types/passport_element_error_files.rb +4 -4
- data/lib/telegram/bot/types/passport_element_error_front_side.rb +4 -4
- data/lib/telegram/bot/types/passport_element_error_reverse_side.rb +4 -4
- data/lib/telegram/bot/types/passport_element_error_selfie.rb +4 -4
- data/lib/telegram/bot/types/passport_element_error_translation_file.rb +4 -4
- data/lib/telegram/bot/types/passport_element_error_translation_files.rb +4 -4
- data/lib/telegram/bot/types/passport_element_error_unspecified.rb +4 -4
- data/lib/telegram/bot/types/passport_file.rb +4 -4
- data/lib/telegram/bot/types/photo_size.rb +5 -5
- data/lib/telegram/bot/types/poll.rb +13 -13
- data/lib/telegram/bot/types/poll_answer.rb +2 -2
- data/lib/telegram/bot/types/poll_option.rb +2 -2
- data/lib/telegram/bot/types/pre_checkout_query.rb +6 -6
- data/lib/telegram/bot/types/proximity_alert_triggered.rb +1 -1
- data/lib/telegram/bot/types/reply_keyboard_markup.rb +5 -5
- data/lib/telegram/bot/types/reply_keyboard_remove.rb +2 -2
- data/lib/telegram/bot/types/sent_web_app_message.rb +1 -1
- data/lib/telegram/bot/types/shipping_address.rb +6 -6
- data/lib/telegram/bot/types/shipping_option.rb +3 -3
- data/lib/telegram/bot/types/shipping_query.rb +2 -2
- data/lib/telegram/bot/types/sticker.rb +14 -14
- data/lib/telegram/bot/types/sticker_set.rb +7 -8
- data/lib/telegram/bot/types/successful_payment.rb +7 -7
- data/lib/telegram/bot/types/update.rb +15 -15
- data/lib/telegram/bot/types/user.rb +11 -11
- data/lib/telegram/bot/types/user_profile_photos.rb +2 -2
- data/lib/telegram/bot/types/venue.rb +6 -6
- data/lib/telegram/bot/types/video.rb +9 -9
- data/lib/telegram/bot/types/video_chat_ended.rb +1 -1
- data/lib/telegram/bot/types/video_chat_participants_invited.rb +1 -1
- data/lib/telegram/bot/types/video_chat_scheduled.rb +1 -1
- data/lib/telegram/bot/types/video_note.rb +6 -6
- data/lib/telegram/bot/types/voice.rb +5 -5
- data/lib/telegram/bot/types/web_app_data.rb +2 -2
- data/lib/telegram/bot/types/web_app_info.rb +1 -1
- data/lib/telegram/bot/types/webhook_info.rb +9 -9
- data/lib/telegram/bot/types.rb +7 -124
- data/lib/telegram/bot/version.rb +1 -1
- data/lib/telegram/bot.rb +7 -9
- data/telegram-bot-ruby.gemspec +4 -2
- metadata +51 -13
- data/lib/telegram/bot/exceptions.rb +0 -4
@@ -4,19 +4,20 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultDocument < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :title, String
|
10
|
-
attribute :caption, String
|
11
|
-
attribute :parse_mode, String
|
12
|
-
attribute :
|
13
|
-
attribute :
|
14
|
-
attribute :
|
15
|
-
attribute :
|
16
|
-
attribute :
|
17
|
-
attribute :
|
18
|
-
attribute :
|
19
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('document')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :title, Types::String
|
10
|
+
attribute? :caption, Types::String
|
11
|
+
attribute? :parse_mode, Types::String
|
12
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
13
|
+
attribute :document_url, Types::String
|
14
|
+
attribute :mime_type, Types::String
|
15
|
+
attribute? :description, Types::String
|
16
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
17
|
+
attribute? :input_message_content, InputMessageContent
|
18
|
+
attribute? :thumb_url, Types::String
|
19
|
+
attribute? :thumb_width, Types::Integer
|
20
|
+
attribute? :thumb_height, Types::Integer
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
@@ -4,10 +4,10 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultGame < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :game_short_name, String
|
10
|
-
attribute :reply_markup, InlineKeyboardMarkup
|
7
|
+
attribute :type, Types::String.default('game')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :game_short_name, Types::String
|
10
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -4,18 +4,20 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultGif < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :gif_url, String
|
10
|
-
attribute :gif_width, Integer
|
11
|
-
attribute :gif_height, Integer
|
12
|
-
attribute :gif_duration, Integer
|
13
|
-
attribute :thumb_url, String
|
14
|
-
attribute :thumb_mime_type, String
|
15
|
-
attribute :title, String
|
16
|
-
attribute :caption, String
|
17
|
-
attribute :
|
18
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('gif')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :gif_url, Types::String
|
10
|
+
attribute? :gif_width, Types::Integer
|
11
|
+
attribute? :gif_height, Types::Integer
|
12
|
+
attribute? :gif_duration, Types::Integer
|
13
|
+
attribute :thumb_url, Types::String
|
14
|
+
attribute? :thumb_mime_type, Types::String
|
15
|
+
attribute? :title, Types::String
|
16
|
+
attribute? :caption, Types::String
|
17
|
+
attribute? :parse_mode, Types::String
|
18
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
19
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
20
|
+
attribute? :input_message_content, InputMessageContent
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
@@ -4,20 +4,20 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultLocation < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :latitude, Float
|
10
|
-
attribute :longitude, Float
|
11
|
-
attribute :title, String
|
12
|
-
attribute :horizontal_accuracy, Float
|
13
|
-
attribute :live_period, Integer
|
14
|
-
attribute :heading, Integer
|
15
|
-
attribute :proximity_alert_radius, Integer
|
16
|
-
attribute :reply_markup, InlineKeyboardMarkup
|
17
|
-
attribute :input_message_content, InputMessageContent
|
18
|
-
attribute :thumb_url, String
|
19
|
-
attribute :thumb_width, Integer
|
20
|
-
attribute :thumb_height, Integer
|
7
|
+
attribute :type, Types::String.default('location')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :latitude, Types::Float
|
10
|
+
attribute :longitude, Types::Float
|
11
|
+
attribute :title, Types::String
|
12
|
+
attribute? :horizontal_accuracy, Types::Float
|
13
|
+
attribute? :live_period, Types::Integer
|
14
|
+
attribute? :heading, Types::Integer
|
15
|
+
attribute? :proximity_alert_radius, Types::Integer
|
16
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
17
|
+
attribute? :input_message_content, InputMessageContent
|
18
|
+
attribute? :thumb_url, Types::String
|
19
|
+
attribute? :thumb_width, Types::Integer
|
20
|
+
attribute? :thumb_height, Types::Integer
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -4,19 +4,20 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultMpeg4Gif < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :mpeg4_url, String
|
10
|
-
attribute :mpeg4_width, Integer
|
11
|
-
attribute :mpeg4_height, Integer
|
12
|
-
attribute :mpeg4_duration, Integer
|
13
|
-
attribute :thumb_url, String
|
14
|
-
attribute :thumb_mime_type, String
|
15
|
-
attribute :title, String
|
16
|
-
attribute :caption, String
|
17
|
-
attribute :parse_mode, String
|
18
|
-
attribute :
|
19
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('mpeg4_gif')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :mpeg4_url, Types::String
|
10
|
+
attribute? :mpeg4_width, Types::Integer
|
11
|
+
attribute? :mpeg4_height, Types::Integer
|
12
|
+
attribute? :mpeg4_duration, Types::Integer
|
13
|
+
attribute :thumb_url, Types::String
|
14
|
+
attribute? :thumb_mime_type, Types::String
|
15
|
+
attribute? :title, Types::String
|
16
|
+
attribute? :caption, Types::String
|
17
|
+
attribute? :parse_mode, Types::String
|
18
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
19
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
20
|
+
attribute? :input_message_content, InputMessageContent
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
@@ -4,18 +4,19 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultPhoto < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :photo_url, String
|
10
|
-
attribute :thumb_url, String
|
11
|
-
attribute :photo_width, Integer
|
12
|
-
attribute :photo_height, Integer
|
13
|
-
attribute :title, String
|
14
|
-
attribute :description, String
|
15
|
-
attribute :caption, String
|
16
|
-
attribute :parse_mode, String
|
17
|
-
attribute :
|
18
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('photo')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :photo_url, Types::String
|
10
|
+
attribute :thumb_url, Types::String
|
11
|
+
attribute? :photo_width, Types::Integer
|
12
|
+
attribute? :photo_height, Types::Integer
|
13
|
+
attribute? :title, Types::String
|
14
|
+
attribute? :description, Types::String
|
15
|
+
attribute? :caption, Types::String
|
16
|
+
attribute? :parse_mode, Types::String
|
17
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
18
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
19
|
+
attribute? :input_message_content, InputMessageContent
|
19
20
|
end
|
20
21
|
end
|
21
22
|
end
|
@@ -4,21 +4,21 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultVenue < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :latitude, Float
|
10
|
-
attribute :longitude, Float
|
11
|
-
attribute :title, String
|
12
|
-
attribute :address, String
|
13
|
-
attribute :foursquare_id, String
|
14
|
-
attribute :foursquare_type, String
|
15
|
-
attribute :google_place_id, String
|
16
|
-
attribute :google_place_type, String
|
17
|
-
attribute :reply_markup, InlineKeyboardMarkup
|
18
|
-
attribute :input_message_content, InputMessageContent
|
19
|
-
attribute :thumb_url, String
|
20
|
-
attribute :thumb_width, Integer
|
21
|
-
attribute :thumb_height, Integer
|
7
|
+
attribute :type, Types::String.default('venue')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :latitude, Types::Float
|
10
|
+
attribute :longitude, Types::Float
|
11
|
+
attribute :title, Types::String
|
12
|
+
attribute :address, Types::String
|
13
|
+
attribute? :foursquare_id, Types::String
|
14
|
+
attribute? :foursquare_type, Types::String
|
15
|
+
attribute? :google_place_id, Types::String
|
16
|
+
attribute? :google_place_type, Types::String
|
17
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
18
|
+
attribute? :input_message_content, InputMessageContent
|
19
|
+
attribute? :thumb_url, Types::String
|
20
|
+
attribute? :thumb_width, Types::Integer
|
21
|
+
attribute? :thumb_height, Types::Integer
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -4,20 +4,21 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultVideo < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :video_url, String
|
10
|
-
attribute :mime_type, String
|
11
|
-
attribute :thumb_url, String
|
12
|
-
attribute :title, String
|
13
|
-
attribute :caption, String
|
14
|
-
attribute :parse_mode, String
|
15
|
-
attribute :
|
16
|
-
attribute :
|
17
|
-
attribute :
|
18
|
-
attribute :
|
19
|
-
attribute :
|
20
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('video')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :video_url, Types::String
|
10
|
+
attribute :mime_type, Types::String
|
11
|
+
attribute :thumb_url, Types::String
|
12
|
+
attribute :title, Types::String
|
13
|
+
attribute? :caption, Types::String
|
14
|
+
attribute? :parse_mode, Types::String
|
15
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
16
|
+
attribute? :video_width, Types::Integer
|
17
|
+
attribute? :video_height, Types::Integer
|
18
|
+
attribute? :video_duration, Types::Integer
|
19
|
+
attribute? :description, Types::String
|
20
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
21
|
+
attribute? :input_message_content, InputMessageContent
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
@@ -4,15 +4,16 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InlineQueryResultVoice < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :id, String
|
9
|
-
attribute :voice_url, String
|
10
|
-
attribute :title, String
|
11
|
-
attribute :caption, String
|
12
|
-
attribute :parse_mode, String
|
13
|
-
attribute :
|
14
|
-
attribute :
|
15
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('voice')
|
8
|
+
attribute :id, Types::String
|
9
|
+
attribute :voice_url, Types::String
|
10
|
+
attribute :title, Types::String
|
11
|
+
attribute? :caption, Types::String
|
12
|
+
attribute? :parse_mode, Types::String
|
13
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
14
|
+
attribute? :voice_duration, Types::Integer
|
15
|
+
attribute? :reply_markup, InlineKeyboardMarkup
|
16
|
+
attribute? :input_message_content, InputMessageContent
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
@@ -4,10 +4,10 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputContactMessageContent < InputMessageContent
|
7
|
-
attribute :phone_number, String
|
8
|
-
attribute :first_name, String
|
9
|
-
attribute :last_name, String
|
10
|
-
attribute :vcard, String
|
7
|
+
attribute :phone_number, Types::String
|
8
|
+
attribute :first_name, Types::String
|
9
|
+
attribute? :last_name, Types::String
|
10
|
+
attribute? :vcard, Types::String
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -4,26 +4,26 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputInvoiceMessageContent < InputMessageContent
|
7
|
-
attribute :title, String
|
8
|
-
attribute :description, String
|
9
|
-
attribute :payload, String
|
10
|
-
attribute :provider_token, String
|
11
|
-
attribute :currency, String
|
12
|
-
attribute :prices, Array
|
13
|
-
attribute :max_tip_amount, Integer
|
14
|
-
attribute :suggested_tip_amounts, Array
|
15
|
-
attribute :provider_data, String
|
16
|
-
attribute :photo_url, String
|
17
|
-
attribute :photo_size, Integer
|
18
|
-
attribute :photo_width, Integer
|
19
|
-
attribute :photo_height, Integer
|
20
|
-
attribute :need_name,
|
21
|
-
attribute :need_phone_number,
|
22
|
-
attribute :need_email,
|
23
|
-
attribute :need_shipping_address,
|
24
|
-
attribute :send_phone_number_to_provider,
|
25
|
-
attribute :send_email_to_provider,
|
26
|
-
attribute :is_flexible,
|
7
|
+
attribute :title, Types::String
|
8
|
+
attribute :description, Types::String
|
9
|
+
attribute :payload, Types::String
|
10
|
+
attribute :provider_token, Types::String
|
11
|
+
attribute :currency, Types::String
|
12
|
+
attribute :prices, Types::Array.of(LabeledPrice)
|
13
|
+
attribute? :max_tip_amount, Types::Integer
|
14
|
+
attribute? :suggested_tip_amounts, Types::Array.of(Types::Integer)
|
15
|
+
attribute? :provider_data, Types::String
|
16
|
+
attribute? :photo_url, Types::String
|
17
|
+
attribute? :photo_size, Types::Integer
|
18
|
+
attribute? :photo_width, Types::Integer
|
19
|
+
attribute? :photo_height, Types::Integer
|
20
|
+
attribute? :need_name, Types::Bool
|
21
|
+
attribute? :need_phone_number, Types::Bool
|
22
|
+
attribute? :need_email, Types::Bool
|
23
|
+
attribute? :need_shipping_address, Types::Bool
|
24
|
+
attribute? :send_phone_number_to_provider, Types::Bool
|
25
|
+
attribute? :send_email_to_provider, Types::Bool
|
26
|
+
attribute? :is_flexible, Types::Bool
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -4,12 +4,12 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputLocationMessageContent < InputMessageContent
|
7
|
-
attribute :latitude, Float
|
8
|
-
attribute :longitude, Float
|
9
|
-
attribute :horizontal_accuracy, Float
|
10
|
-
attribute :live_period, Integer
|
11
|
-
attribute :heading, Integer
|
12
|
-
attribute :proximity_alert_radius, Integer
|
7
|
+
attribute :latitude, Types::Float
|
8
|
+
attribute :longitude, Types::Float
|
9
|
+
attribute? :horizontal_accuracy, Types::Float
|
10
|
+
attribute? :live_period, Types::Integer
|
11
|
+
attribute? :heading, Types::Integer
|
12
|
+
attribute? :proximity_alert_radius, Types::Integer
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -4,14 +4,15 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputMediaAnimation < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :media, String
|
9
|
-
attribute :thumb, String
|
10
|
-
attribute :caption, String
|
11
|
-
attribute :parse_mode, String
|
12
|
-
attribute :
|
13
|
-
attribute :
|
14
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('animation')
|
8
|
+
attribute :media, Types::String
|
9
|
+
attribute? :thumb, Types::String
|
10
|
+
attribute? :caption, Types::String
|
11
|
+
attribute? :parse_mode, Types::String
|
12
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
13
|
+
attribute? :width, Types::Integer
|
14
|
+
attribute? :height, Types::Integer
|
15
|
+
attribute? :duration, Types::Integer
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
@@ -4,14 +4,15 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputMediaAudio < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :media, String
|
9
|
-
attribute :thumb, String
|
10
|
-
attribute :caption, String
|
11
|
-
attribute :parse_mode, String
|
12
|
-
attribute :
|
13
|
-
attribute :
|
14
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('audio')
|
8
|
+
attribute :media, Types::String
|
9
|
+
attribute? :thumb, Types::String
|
10
|
+
attribute? :caption, Types::String
|
11
|
+
attribute? :parse_mode, Types::String
|
12
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
13
|
+
attribute? :duration, Types::Integer
|
14
|
+
attribute? :performer, Types::String
|
15
|
+
attribute? :title, Types::String
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
@@ -4,13 +4,13 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputMediaDocument < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :media, String
|
9
|
-
attribute :thumb, String
|
10
|
-
attribute :caption, String
|
11
|
-
attribute :parse_mode, String
|
12
|
-
attribute :caption_entities, Array
|
13
|
-
attribute :disable_content_type_detection,
|
7
|
+
attribute :type, Types::String.default('document')
|
8
|
+
attribute :media, Types::String
|
9
|
+
attribute? :thumb, Types::String
|
10
|
+
attribute? :caption, Types::String
|
11
|
+
attribute? :parse_mode, Types::String
|
12
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
13
|
+
attribute? :disable_content_type_detection, Types::Bool
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -4,10 +4,11 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputMediaPhoto < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :media, String
|
9
|
-
attribute :caption, String
|
10
|
-
attribute :parse_mode, String
|
7
|
+
attribute :type, Types::String.default('photo')
|
8
|
+
attribute :media, Types::String
|
9
|
+
attribute? :caption, Types::String
|
10
|
+
attribute? :parse_mode, Types::String
|
11
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
@@ -4,14 +4,16 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputMediaVideo < Base
|
7
|
-
attribute :type, String
|
8
|
-
attribute :media, String
|
9
|
-
attribute :
|
10
|
-
attribute :
|
11
|
-
attribute :
|
12
|
-
attribute :
|
13
|
-
attribute :
|
14
|
-
attribute :
|
7
|
+
attribute :type, Types::String.default('video')
|
8
|
+
attribute :media, Types::String
|
9
|
+
attribute? :thumb, Types::String
|
10
|
+
attribute? :caption, Types::String
|
11
|
+
attribute? :parse_mode, Types::String
|
12
|
+
attribute? :caption_entities, Types::Array.of(MessageEntity)
|
13
|
+
attribute? :width, Types::Integer
|
14
|
+
attribute? :height, Types::Integer
|
15
|
+
attribute? :duration, Types::Integer
|
16
|
+
attribute? :supports_streaming, Types::Bool
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -4,9 +4,10 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputTextMessageContent < InputMessageContent
|
7
|
-
attribute :message_text, String
|
8
|
-
attribute :parse_mode, String
|
9
|
-
attribute :
|
7
|
+
attribute :message_text, Types::String
|
8
|
+
attribute? :parse_mode, Types::String
|
9
|
+
attribute? :entities, Types::Array.of(MessageEntity)
|
10
|
+
attribute? :disable_web_page_preview, Types::Bool
|
10
11
|
end
|
11
12
|
end
|
12
13
|
end
|
@@ -4,14 +4,14 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class InputVenueMessageContent < InputMessageContent
|
7
|
-
attribute :latitude, Float
|
8
|
-
attribute :longitude, Float
|
9
|
-
attribute :title, String
|
10
|
-
attribute :address, String
|
11
|
-
attribute :foursquare_id, String
|
12
|
-
attribute :foursquare_type, String
|
13
|
-
attribute :google_place_id, String
|
14
|
-
attribute :google_place_type, String
|
7
|
+
attribute :latitude, Types::Float
|
8
|
+
attribute :longitude, Types::Float
|
9
|
+
attribute :title, Types::String
|
10
|
+
attribute :address, Types::String
|
11
|
+
attribute? :foursquare_id, Types::String
|
12
|
+
attribute? :foursquare_type, Types::String
|
13
|
+
attribute? :google_place_id, Types::String
|
14
|
+
attribute? :google_place_type, Types::String
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -4,11 +4,11 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class Invoice < Base
|
7
|
-
attribute :title, String
|
8
|
-
attribute :description, String
|
9
|
-
attribute :start_parameter, String
|
10
|
-
attribute :currency, String
|
11
|
-
attribute :total_amount, Integer
|
7
|
+
attribute :title, Types::String
|
8
|
+
attribute :description, Types::String
|
9
|
+
attribute :start_parameter, Types::String
|
10
|
+
attribute :currency, Types::String
|
11
|
+
attribute :total_amount, Types::Integer
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -4,11 +4,11 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class KeyboardButton < Base
|
7
|
-
attribute :text, String
|
8
|
-
attribute :request_contact,
|
9
|
-
attribute :request_location,
|
10
|
-
attribute :request_poll, KeyboardButtonPollType
|
11
|
-
attribute :web_app, WebAppInfo
|
7
|
+
attribute :text, Types::String
|
8
|
+
attribute? :request_contact, Types::Bool
|
9
|
+
attribute? :request_location, Types::Bool
|
10
|
+
attribute? :request_poll, KeyboardButtonPollType
|
11
|
+
attribute? :web_app, WebAppInfo
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -4,12 +4,12 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class Location < Base
|
7
|
-
attribute :longitude, Float
|
8
|
-
attribute :latitude, Float
|
9
|
-
attribute :horizontal_accuracy, Float
|
10
|
-
attribute :live_period, Integer
|
11
|
-
attribute :heading, Integer
|
12
|
-
attribute :proximity_alert_radius, Integer
|
7
|
+
attribute :longitude, Types::Float
|
8
|
+
attribute :latitude, Types::Float
|
9
|
+
attribute? :horizontal_accuracy, Types::Float
|
10
|
+
attribute? :live_period, Types::Integer
|
11
|
+
attribute? :heading, Types::Integer
|
12
|
+
attribute? :proximity_alert_radius, Types::Integer
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -4,10 +4,10 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class LoginUrl < Base
|
7
|
-
attribute :url, String
|
8
|
-
attribute :forward_text, String
|
9
|
-
attribute :bot_username, String
|
10
|
-
attribute :request_write_access,
|
7
|
+
attribute :url, Types::String
|
8
|
+
attribute? :forward_text, Types::String
|
9
|
+
attribute? :bot_username, Types::String
|
10
|
+
attribute? :request_write_access, Types::Bool
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -4,10 +4,10 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
class MaskPosition < Base
|
7
|
-
attribute :point, String
|
8
|
-
attribute :x_shift, Float
|
9
|
-
attribute :y_shift, Float
|
10
|
-
attribute :
|
7
|
+
attribute :point, Types::String
|
8
|
+
attribute :x_shift, Types::Float
|
9
|
+
attribute :y_shift, Types::Float
|
10
|
+
attribute :scale, Types::Float
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|