telegram-bot-types 0.4.1 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +11 -1
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +22 -0
  5. data/Gemfile +2 -0
  6. data/Rakefile +2 -0
  7. data/bin/console +1 -0
  8. data/bin/install_git_hooks +2 -1
  9. data/lib/telegram/bot/types.rb +19 -70
  10. data/lib/telegram/bot/types/animation.rb +6 -0
  11. data/lib/telegram/bot/types/audio.rb +5 -0
  12. data/lib/telegram/bot/types/base.rb +6 -0
  13. data/lib/telegram/bot/types/callback_game.rb +2 -0
  14. data/lib/telegram/bot/types/callback_query.rb +2 -0
  15. data/lib/telegram/bot/types/chat.rb +10 -0
  16. data/lib/telegram/bot/types/chat_invite_link.rb +16 -0
  17. data/lib/telegram/bot/types/chat_location.rb +12 -0
  18. data/lib/telegram/bot/types/chat_member.rb +22 -0
  19. data/lib/telegram/bot/types/chat_member_updated.rb +16 -0
  20. data/lib/telegram/bot/types/chat_permissions.rb +18 -0
  21. data/lib/telegram/bot/types/chat_photo.rb +14 -0
  22. data/lib/telegram/bot/types/chosen_inline_result.rb +2 -0
  23. data/lib/telegram/bot/types/contact.rb +3 -0
  24. data/lib/telegram/bot/types/dice.rb +12 -0
  25. data/lib/telegram/bot/types/document.rb +3 -0
  26. data/lib/telegram/bot/types/encrypted_credentials.rb +13 -0
  27. data/lib/telegram/bot/types/encrypted_passport_element.rb +20 -0
  28. data/lib/telegram/bot/types/file.rb +3 -0
  29. data/lib/telegram/bot/types/force_reply.rb +2 -0
  30. data/lib/telegram/bot/types/game.rb +2 -0
  31. data/lib/telegram/bot/types/game_high_score.rb +2 -0
  32. data/lib/telegram/bot/types/inline_keyboard_button.rb +3 -0
  33. data/lib/telegram/bot/types/inline_keyboard_markup.rb +2 -0
  34. data/lib/telegram/bot/types/inline_query.rb +2 -0
  35. data/lib/telegram/bot/types/inline_query_result_article.rb +2 -0
  36. data/lib/telegram/bot/types/inline_query_result_audio.rb +3 -0
  37. data/lib/telegram/bot/types/inline_query_result_cached_audio.rb +3 -0
  38. data/lib/telegram/bot/types/inline_query_result_cached_document.rb +3 -0
  39. data/lib/telegram/bot/types/inline_query_result_cached_gif.rb +3 -0
  40. data/lib/telegram/bot/types/inline_query_result_cached_mpeg4_gif.rb +3 -0
  41. data/lib/telegram/bot/types/inline_query_result_cached_photo.rb +3 -0
  42. data/lib/telegram/bot/types/inline_query_result_cached_sticker.rb +2 -0
  43. data/lib/telegram/bot/types/inline_query_result_cached_video.rb +3 -0
  44. data/lib/telegram/bot/types/inline_query_result_cached_voice.rb +3 -0
  45. data/lib/telegram/bot/types/inline_query_result_contact.rb +3 -0
  46. data/lib/telegram/bot/types/inline_query_result_document.rb +3 -0
  47. data/lib/telegram/bot/types/inline_query_result_game.rb +2 -0
  48. data/lib/telegram/bot/types/inline_query_result_gif.rb +3 -0
  49. data/lib/telegram/bot/types/inline_query_result_location.rb +6 -0
  50. data/lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb +4 -0
  51. data/lib/telegram/bot/types/inline_query_result_photo.rb +3 -0
  52. data/lib/telegram/bot/types/inline_query_result_venue.rb +5 -0
  53. data/lib/telegram/bot/types/inline_query_result_video.rb +3 -0
  54. data/lib/telegram/bot/types/inline_query_result_voice.rb +3 -0
  55. data/lib/telegram/bot/types/input_contact_message_content.rb +3 -0
  56. data/lib/telegram/bot/types/input_location_message_content.rb +6 -0
  57. data/lib/telegram/bot/types/input_media_animation.rb +18 -0
  58. data/lib/telegram/bot/types/input_media_audio.rb +18 -0
  59. data/lib/telegram/bot/types/input_media_document.rb +17 -0
  60. data/lib/telegram/bot/types/input_media_photo.rb +14 -0
  61. data/lib/telegram/bot/types/input_media_video.rb +18 -0
  62. data/lib/telegram/bot/types/input_message_content.rb +2 -0
  63. data/lib/telegram/bot/types/input_text_message_content.rb +2 -0
  64. data/lib/telegram/bot/types/input_venue_message_content.rb +5 -0
  65. data/lib/telegram/bot/types/invoice.rb +2 -0
  66. data/lib/telegram/bot/types/keyboard_button.rb +3 -0
  67. data/lib/telegram/bot/types/keyboard_button_poll_type.rb +11 -0
  68. data/lib/telegram/bot/types/labeled_price.rb +2 -0
  69. data/lib/telegram/bot/types/location.rb +6 -0
  70. data/lib/telegram/bot/types/login_url.rb +14 -0
  71. data/lib/telegram/bot/types/mask_position.rb +14 -0
  72. data/lib/telegram/bot/types/message.rb +20 -0
  73. data/lib/telegram/bot/types/message_auto_delete_timer_changed.rb +11 -0
  74. data/lib/telegram/bot/types/message_entity.rb +3 -0
  75. data/lib/telegram/bot/types/order_info.rb +2 -0
  76. data/lib/telegram/bot/types/passport_data.rb +12 -0
  77. data/lib/telegram/bot/types/passport_element_error_data_field.rb +15 -0
  78. data/lib/telegram/bot/types/passport_element_error_file.rb +14 -0
  79. data/lib/telegram/bot/types/passport_element_error_files.rb +14 -0
  80. data/lib/telegram/bot/types/passport_element_error_front_side.rb +14 -0
  81. data/lib/telegram/bot/types/passport_element_error_reverse_side.rb +14 -0
  82. data/lib/telegram/bot/types/passport_element_error_selfie.rb +14 -0
  83. data/lib/telegram/bot/types/passport_element_error_translation_file.rb +14 -0
  84. data/lib/telegram/bot/types/passport_element_error_translation_files.rb +14 -0
  85. data/lib/telegram/bot/types/passport_element_error_unspecified.rb +14 -0
  86. data/lib/telegram/bot/types/passport_file.rb +14 -0
  87. data/lib/telegram/bot/types/photo_size.rb +3 -0
  88. data/lib/telegram/bot/types/poll.rb +23 -0
  89. data/lib/telegram/bot/types/poll_answer.rb +13 -0
  90. data/lib/telegram/bot/types/poll_option.rb +12 -0
  91. data/lib/telegram/bot/types/pre_checkout_query.rb +2 -0
  92. data/lib/telegram/bot/types/proximity_alert_triggered.rb +13 -0
  93. data/lib/telegram/bot/types/reply_keyboard_markup.rb +2 -0
  94. data/lib/telegram/bot/types/reply_keyboard_remove.rb +2 -0
  95. data/lib/telegram/bot/types/response.rb +94 -0
  96. data/lib/telegram/bot/types/shipping_address.rb +2 -0
  97. data/lib/telegram/bot/types/shipping_option.rb +2 -0
  98. data/lib/telegram/bot/types/shipping_query.rb +2 -0
  99. data/lib/telegram/bot/types/sticker.rb +6 -0
  100. data/lib/telegram/bot/types/sticker_set.rb +16 -0
  101. data/lib/telegram/bot/types/successful_payment.rb +2 -0
  102. data/lib/telegram/bot/types/update.rb +6 -0
  103. data/lib/telegram/bot/types/user.rb +6 -0
  104. data/lib/telegram/bot/types/user_profile_photos.rb +2 -0
  105. data/lib/telegram/bot/types/venue.rb +5 -0
  106. data/lib/telegram/bot/types/version.rb +3 -1
  107. data/lib/telegram/bot/types/video.rb +4 -0
  108. data/lib/telegram/bot/types/video_note.rb +3 -0
  109. data/lib/telegram/bot/types/voice.rb +3 -0
  110. data/lib/telegram/bot/types/voice_chat_ended.rb +11 -0
  111. data/lib/telegram/bot/types/voice_chat_participants_invited.rb +11 -0
  112. data/lib/telegram/bot/types/voice_chat_started.rb +10 -0
  113. data/lib/telegram/bot/types/webhook_info.rb +19 -0
  114. data/telegram-bot-types.gemspec +5 -4
  115. metadata +50 -26
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class EncryptedCredentials < Base
7
+ attribute :data, String
8
+ attribute :hash, String
9
+ attribute :secret, String
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class EncryptedPassportElement < Base
7
+ attribute :type, String
8
+ attribute :data, String
9
+ attribute :phone_number, String
10
+ attribute :email, String
11
+ attribute :files, [PassportFile]
12
+ attribute :front_side, PassportFile
13
+ attribute :reverse_side, PassportFile
14
+ attribute :selfie, PassportFile
15
+ attribute :translation, [PassportFile]
16
+ attribute :hash, String
17
+ end
18
+ end
19
+ end
20
+ end
@@ -1,8 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
6
  class File < Base
5
7
  attribute :file_id, String
8
+ attribute :file_unique_id, String
6
9
  attribute :file_size, Integer
7
10
  attribute :file_path, String
8
11
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,9 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
6
  class InlineKeyboardButton < Base
5
7
  attribute :text, String
6
8
  attribute :url, String
9
+ attribute :login_url, LoginUrl
7
10
  attribute :callback_data, String
8
11
  attribute :switch_inline_query, String
9
12
  attribute :switch_inline_query_current_chat, String
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -7,6 +9,7 @@ module Telegram
7
9
  attribute :audio_url, String
8
10
  attribute :title, String
9
11
  attribute :caption, String
12
+ attribute :parse_mode, String
10
13
  attribute :performer, String
11
14
  attribute :audio_duration, Integer
12
15
  attribute :reply_markup, InlineKeyboardMarkup
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -6,6 +8,7 @@ module Telegram
6
8
  attribute :id, String
7
9
  attribute :audio_file_id, String
8
10
  attribute :caption, String
11
+ attribute :parse_mode, String
9
12
  attribute :reply_markup, InlineKeyboardMarkup
10
13
  attribute :input_message_content, InputMessageContent
11
14
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -8,6 +10,7 @@ module Telegram
8
10
  attribute :document_file_id, String
9
11
  attribute :description, String
10
12
  attribute :caption, String
13
+ attribute :parse_mode, String
11
14
  attribute :reply_markup, InlineKeyboardMarkup
12
15
  attribute :input_message_content, InputMessageContent
13
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -7,6 +9,7 @@ module Telegram
7
9
  attribute :gif_file_id, String
8
10
  attribute :title, String
9
11
  attribute :caption, String
12
+ attribute :parse_mode, String
10
13
  attribute :reply_markup, InlineKeyboardMarkup
11
14
  attribute :input_message_content, InputMessageContent
12
15
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -7,6 +9,7 @@ module Telegram
7
9
  attribute :mpeg4_file_id, String
8
10
  attribute :title, String
9
11
  attribute :caption, String
12
+ attribute :parse_mode, String
10
13
  attribute :reply_markup, InlineKeyboardMarkup
11
14
  attribute :input_message_content, InputMessageContent
12
15
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -8,6 +10,7 @@ module Telegram
8
10
  attribute :title, String
9
11
  attribute :description, String
10
12
  attribute :caption, String
13
+ attribute :parse_mode, String
11
14
  attribute :reply_markup, InlineKeyboardMarkup
12
15
  attribute :input_message_content, InputMessageContent
13
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -8,6 +10,7 @@ module Telegram
8
10
  attribute :title, String
9
11
  attribute :description, String
10
12
  attribute :caption, String
13
+ attribute :parse_mode, String
11
14
  attribute :reply_markup, InlineKeyboardMarkup
12
15
  attribute :input_message_content, InputMessageContent
13
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -7,6 +9,7 @@ module Telegram
7
9
  attribute :voice_file_id, String
8
10
  attribute :title, String
9
11
  attribute :caption, String
12
+ attribute :parse_mode, String
10
13
  attribute :reply_markup, InlineKeyboardMarkup
11
14
  attribute :input_message_content, InputMessageContent
12
15
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -7,6 +9,7 @@ module Telegram
7
9
  attribute :phone_number, String
8
10
  attribute :first_name, String
9
11
  attribute :last_name, String
12
+ attribute :vcard, String
10
13
  attribute :reply_markup, InlineKeyboardMarkup
11
14
  attribute :input_message_content, InputMessageContent
12
15
  attribute :thumb_url, String
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -6,6 +8,7 @@ module Telegram
6
8
  attribute :id, String
7
9
  attribute :title, String
8
10
  attribute :caption, String
11
+ attribute :parse_mode, String
9
12
  attribute :document_url, String
10
13
  attribute :mime_type, String
11
14
  attribute :description, String
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -9,6 +11,7 @@ module Telegram
9
11
  attribute :gif_height, Integer
10
12
  attribute :gif_duration, Integer
11
13
  attribute :thumb_url, String
14
+ attribute :thumb_mime_type, String
12
15
  attribute :title, String
13
16
  attribute :caption, String
14
17
  attribute :reply_markup, InlineKeyboardMarkup
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -7,6 +9,10 @@ module Telegram
7
9
  attribute :latitude, Float
8
10
  attribute :longitude, Float
9
11
  attribute :title, String
12
+ attribute :horizontal_accuracy, Float
13
+ attribute :live_period, Integer
14
+ attribute :heading, Integer
15
+ attribute :proximity_alert_radius, Integer
10
16
  attribute :reply_markup, InlineKeyboardMarkup
11
17
  attribute :input_message_content, InputMessageContent
12
18
  attribute :thumb_url, String
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -9,8 +11,10 @@ module Telegram
9
11
  attribute :mpeg4_height, Integer
10
12
  attribute :mpeg4_duration, Integer
11
13
  attribute :thumb_url, String
14
+ attribute :thumb_mime_type, String
12
15
  attribute :title, String
13
16
  attribute :caption, String
17
+ attribute :parse_mode, String
14
18
  attribute :reply_markup, InlineKeyboardMarkup
15
19
  attribute :input_message_content, InputMessageContent
16
20
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -11,6 +13,7 @@ module Telegram
11
13
  attribute :title, String
12
14
  attribute :description, String
13
15
  attribute :caption, String
16
+ attribute :parse_mode, String
14
17
  attribute :reply_markup, InlineKeyboardMarkup
15
18
  attribute :input_message_content, InputMessageContent
16
19
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -9,6 +11,9 @@ module Telegram
9
11
  attribute :title, String
10
12
  attribute :address, String
11
13
  attribute :foursquare_id, String
14
+ attribute :foursquare_type, String
15
+ attribute :google_place_id, String
16
+ attribute :google_place_type, String
12
17
  attribute :reply_markup, InlineKeyboardMarkup
13
18
  attribute :input_message_content, InputMessageContent
14
19
  attribute :thumb_url, String
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -9,6 +11,7 @@ module Telegram
9
11
  attribute :thumb_url, String
10
12
  attribute :title, String
11
13
  attribute :caption, String
14
+ attribute :parse_mode, String
12
15
  attribute :video_width, Integer
13
16
  attribute :video_height, Integer
14
17
  attribute :video_duration, Integer
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -7,6 +9,7 @@ module Telegram
7
9
  attribute :voice_url, String
8
10
  attribute :title, String
9
11
  attribute :caption, String
12
+ attribute :parse_mode, String
10
13
  attribute :voice_duration, Integer
11
14
  attribute :reply_markup, InlineKeyboardMarkup
12
15
  attribute :input_message_content, InputMessageContent
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
@@ -5,6 +7,7 @@ module Telegram
5
7
  attribute :phone_number, String
6
8
  attribute :first_name, String
7
9
  attribute :last_name, String
10
+ attribute :vcard, String
8
11
  end
9
12
  end
10
13
  end
@@ -1,9 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Telegram
2
4
  module Bot
3
5
  module Types
4
6
  class InputLocationMessageContent < InputMessageContent
5
7
  attribute :latitude, Float
6
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
13
  end
8
14
  end
9
15
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class InputMediaAnimation < Base
7
+ attribute :type, String, default: 'animation'
8
+ attribute :media, String
9
+ attribute :thumb, String
10
+ attribute :caption, String
11
+ attribute :parse_mode, String
12
+ attribute :width, Integer
13
+ attribute :height, Integer
14
+ attribute :duration, Integer
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telegram
4
+ module Bot
5
+ module Types
6
+ class InputMediaAudio < Base
7
+ attribute :type, String, default: 'audio'
8
+ attribute :media, String
9
+ attribute :thumb, String
10
+ attribute :caption, String
11
+ attribute :parse_mode, String
12
+ attribute :duration, Integer
13
+ attribute :performer, String
14
+ attribute :title, String
15
+ end
16
+ end
17
+ end
18
+ end