telegram-bot-ruby 0.18.0 → 0.19.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -3
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -0
- data/Rakefile +3 -1
- data/examples/bot.rb +2 -0
- data/lib/telegram/bot/api.rb +10 -4
- data/lib/telegram/bot/client.rb +4 -3
- data/lib/telegram/bot/configuration.rb +5 -1
- data/lib/telegram/bot/exceptions/base.rb +2 -0
- data/lib/telegram/bot/exceptions/response_error.rb +3 -0
- data/lib/telegram/bot/exceptions.rb +2 -0
- data/lib/telegram/bot/null_logger.rb +3 -1
- data/lib/telegram/bot/types/animation.rb +2 -0
- data/lib/telegram/bot/types/audio.rb +2 -0
- data/lib/telegram/bot/types/base.rb +2 -0
- data/lib/telegram/bot/types/bot_command.rb +2 -0
- data/lib/telegram/bot/types/bot_command_scope_all_chat_administrators.rb +2 -0
- data/lib/telegram/bot/types/bot_command_scope_all_group_chats.rb +2 -0
- data/lib/telegram/bot/types/bot_command_scope_all_private_chats.rb +2 -0
- data/lib/telegram/bot/types/bot_command_scope_chat.rb +2 -0
- data/lib/telegram/bot/types/bot_command_scope_chat_administrators.rb +2 -0
- data/lib/telegram/bot/types/bot_command_scope_chat_member.rb +2 -0
- data/lib/telegram/bot/types/bot_command_scope_default.rb +2 -0
- data/lib/telegram/bot/types/callback_game.rb +2 -0
- data/lib/telegram/bot/types/callback_query.rb +2 -0
- data/lib/telegram/bot/types/chat.rb +2 -0
- data/lib/telegram/bot/types/chat_administrator_rights.rb +21 -0
- data/lib/telegram/bot/types/chat_invite_link.rb +2 -0
- data/lib/telegram/bot/types/chat_join_request.rb +2 -0
- data/lib/telegram/bot/types/chat_location.rb +2 -0
- data/lib/telegram/bot/types/chat_member.rb +3 -1
- data/lib/telegram/bot/types/chat_member_updated.rb +2 -0
- data/lib/telegram/bot/types/chat_permissions.rb +2 -0
- data/lib/telegram/bot/types/chat_photo.rb +2 -0
- data/lib/telegram/bot/types/chosen_inline_result.rb +2 -0
- data/lib/telegram/bot/types/compactable.rb +4 -2
- data/lib/telegram/bot/types/contact.rb +2 -0
- data/lib/telegram/bot/types/dice.rb +2 -0
- data/lib/telegram/bot/types/document.rb +2 -0
- data/lib/telegram/bot/types/encrypted_credentials.rb +2 -0
- data/lib/telegram/bot/types/encrypted_passport_element.rb +2 -0
- data/lib/telegram/bot/types/file.rb +2 -0
- data/lib/telegram/bot/types/force_reply.rb +2 -0
- data/lib/telegram/bot/types/game.rb +2 -0
- data/lib/telegram/bot/types/game_high_score.rb +2 -0
- data/lib/telegram/bot/types/inline_keyboard_button.rb +4 -1
- data/lib/telegram/bot/types/inline_keyboard_markup.rb +2 -0
- data/lib/telegram/bot/types/inline_query.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_article.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_audio.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_audio.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_document.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_gif.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_mpeg4_gif.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_photo.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_sticker.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_video.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_cached_voice.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_contact.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_document.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_game.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_gif.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_location.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_photo.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_venue.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_video.rb +2 -0
- data/lib/telegram/bot/types/inline_query_result_voice.rb +2 -0
- data/lib/telegram/bot/types/input_contact_message_content.rb +2 -0
- data/lib/telegram/bot/types/input_invoice_message_content.rb +2 -0
- data/lib/telegram/bot/types/input_location_message_content.rb +2 -0
- data/lib/telegram/bot/types/input_media_animation.rb +2 -0
- data/lib/telegram/bot/types/input_media_audio.rb +2 -0
- data/lib/telegram/bot/types/input_media_document.rb +2 -0
- data/lib/telegram/bot/types/input_media_photo.rb +2 -0
- data/lib/telegram/bot/types/input_media_video.rb +2 -0
- data/lib/telegram/bot/types/input_message_content.rb +2 -0
- data/lib/telegram/bot/types/input_text_message_content.rb +2 -0
- data/lib/telegram/bot/types/input_venue_message_content.rb +2 -0
- data/lib/telegram/bot/types/invoice.rb +2 -0
- data/lib/telegram/bot/types/keyboard_button.rb +3 -0
- data/lib/telegram/bot/types/keyboard_button_poll_type.rb +2 -0
- data/lib/telegram/bot/types/labeled_price.rb +2 -0
- data/lib/telegram/bot/types/location.rb +2 -0
- data/lib/telegram/bot/types/login_url.rb +2 -0
- data/lib/telegram/bot/types/mask_position.rb +2 -0
- data/lib/telegram/bot/types/menu_button_commands.rb +11 -0
- data/lib/telegram/bot/types/menu_button_default.rb +11 -0
- data/lib/telegram/bot/types/menu_button_web_app.rb +13 -0
- data/lib/telegram/bot/types/message.rb +7 -4
- data/lib/telegram/bot/types/message_auto_delete_timer_changed.rb +2 -0
- data/lib/telegram/bot/types/message_entity.rb +2 -0
- data/lib/telegram/bot/types/order_info.rb +2 -0
- data/lib/telegram/bot/types/passport_data.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_data_field.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_file.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_files.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_front_side.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_reverse_side.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_selfie.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_translation_file.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_translation_files.rb +2 -0
- data/lib/telegram/bot/types/passport_element_error_unspecified.rb +2 -0
- data/lib/telegram/bot/types/passport_file.rb +2 -0
- data/lib/telegram/bot/types/pattern_matching.rb +2 -0
- data/lib/telegram/bot/types/photo_size.rb +2 -0
- data/lib/telegram/bot/types/poll.rb +2 -0
- data/lib/telegram/bot/types/poll_answer.rb +2 -0
- data/lib/telegram/bot/types/poll_option.rb +2 -0
- data/lib/telegram/bot/types/pre_checkout_query.rb +2 -0
- data/lib/telegram/bot/types/proximity_alert_triggered.rb +2 -0
- data/lib/telegram/bot/types/reply_keyboard_markup.rb +2 -0
- data/lib/telegram/bot/types/reply_keyboard_remove.rb +2 -0
- data/lib/telegram/bot/types/sent_web_app_message.rb +11 -0
- data/lib/telegram/bot/types/shipping_address.rb +2 -0
- data/lib/telegram/bot/types/shipping_option.rb +2 -0
- data/lib/telegram/bot/types/shipping_query.rb +2 -0
- data/lib/telegram/bot/types/sticker.rb +2 -0
- data/lib/telegram/bot/types/sticker_set.rb +2 -0
- data/lib/telegram/bot/types/successful_payment.rb +2 -0
- data/lib/telegram/bot/types/update.rb +2 -0
- data/lib/telegram/bot/types/user.rb +2 -0
- data/lib/telegram/bot/types/user_profile_photos.rb +2 -0
- data/lib/telegram/bot/types/venue.rb +2 -0
- data/lib/telegram/bot/types/video.rb +2 -0
- data/lib/telegram/bot/types/{voice_chat_ended.rb → video_chat_ended.rb} +3 -1
- data/lib/telegram/bot/types/{voice_chat_participants_invited.rb → video_chat_participants_invited.rb} +3 -1
- data/lib/telegram/bot/types/{voice_chat_scheduled.rb → video_chat_scheduled.rb} +3 -1
- data/lib/telegram/bot/types/{voice_chat_started.rb → video_chat_started.rb} +3 -1
- data/lib/telegram/bot/types/video_note.rb +2 -0
- data/lib/telegram/bot/types/voice.rb +2 -0
- data/lib/telegram/bot/types/web_app_data.rb +12 -0
- data/lib/telegram/bot/types/web_app_info.rb +11 -0
- data/lib/telegram/bot/types/webhook_info.rb +3 -1
- data/lib/telegram/bot/types.rb +13 -4
- data/lib/telegram/bot/version.rb +3 -1
- data/lib/telegram/bot.rb +2 -0
- data/telegram-bot-ruby.gemspec +8 -5
- metadata +43 -22
@@ -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 :request_contact, Boolean
|
7
9
|
attribute :request_location, Boolean
|
8
10
|
attribute :request_poll, KeyboardButtonPollType
|
11
|
+
attribute :web_app, WebAppInfo
|
9
12
|
end
|
10
13
|
end
|
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
|
@@ -55,10 +57,11 @@ module Telegram
|
|
55
57
|
attribute :connected_website, String
|
56
58
|
attribute :passport_data, PassportData
|
57
59
|
attribute :proximity_alert_triggered, ProximityAlertTriggered
|
58
|
-
attribute :
|
59
|
-
attribute :
|
60
|
-
attribute :
|
61
|
-
attribute :
|
60
|
+
attribute :video_chat_scheduled, VideoChatScheduled
|
61
|
+
attribute :video_chat_started, VideoChatStarted
|
62
|
+
attribute :video_chat_ended, VideoChatEnded
|
63
|
+
attribute :video_chat_participants_invited, VideoChatParticipantsInvited
|
64
|
+
attribute :web_app_data, WebAppData
|
62
65
|
attribute :reply_markup, InlineKeyboardMarkup
|
63
66
|
|
64
67
|
alias to_s text
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Telegram
|
2
4
|
module Bot
|
3
5
|
module Types
|
@@ -8,7 +10,7 @@ module Telegram
|
|
8
10
|
attribute :ip_address, String
|
9
11
|
attribute :last_error_date, Integer
|
10
12
|
attribute :last_error_message, String
|
11
|
-
attribute :
|
13
|
+
attribute :last_synchronization_error_date, Integer
|
12
14
|
attribute :max_connections, Integer
|
13
15
|
attribute :allowed_updates, Array[String]
|
14
16
|
end
|
data/lib/telegram/bot/types.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'telegram/bot/types/compactable'
|
2
4
|
require 'telegram/bot/types/pattern_matching'
|
3
5
|
require 'telegram/bot/types/base'
|
@@ -52,6 +54,7 @@ require 'telegram/bot/types/input_location_message_content'
|
|
52
54
|
require 'telegram/bot/types/input_text_message_content'
|
53
55
|
require 'telegram/bot/types/input_venue_message_content'
|
54
56
|
require 'telegram/bot/types/login_url'
|
57
|
+
require 'telegram/bot/types/web_app_info'
|
55
58
|
require 'telegram/bot/types/inline_keyboard_button'
|
56
59
|
require 'telegram/bot/types/inline_keyboard_markup'
|
57
60
|
require 'telegram/bot/types/inline_query'
|
@@ -77,11 +80,12 @@ require 'telegram/bot/types/inline_query_result_video'
|
|
77
80
|
require 'telegram/bot/types/inline_query_result_voice'
|
78
81
|
require 'telegram/bot/types/chosen_inline_result'
|
79
82
|
require 'telegram/bot/types/proximity_alert_triggered'
|
80
|
-
require 'telegram/bot/types/
|
81
|
-
require 'telegram/bot/types/
|
82
|
-
require 'telegram/bot/types/
|
83
|
-
require 'telegram/bot/types/
|
83
|
+
require 'telegram/bot/types/video_chat_scheduled'
|
84
|
+
require 'telegram/bot/types/video_chat_started'
|
85
|
+
require 'telegram/bot/types/video_chat_ended'
|
86
|
+
require 'telegram/bot/types/video_chat_participants_invited'
|
84
87
|
require 'telegram/bot/types/message_auto_delete_timer_changed'
|
88
|
+
require 'telegram/bot/types/web_app_data'
|
85
89
|
require 'telegram/bot/types/message'
|
86
90
|
require 'telegram/bot/types/callback_query'
|
87
91
|
require 'telegram/bot/types/shipping_query'
|
@@ -113,5 +117,10 @@ require 'telegram/bot/types/bot_command_scope_chat_administrators'
|
|
113
117
|
require 'telegram/bot/types/bot_command_scope_chat_member'
|
114
118
|
require 'telegram/bot/types/bot_command_scope_chat'
|
115
119
|
require 'telegram/bot/types/bot_command_scope_default'
|
120
|
+
require 'telegram/bot/types/sent_web_app_message'
|
121
|
+
require 'telegram/bot/types/menu_button_commands'
|
122
|
+
require 'telegram/bot/types/menu_button_web_app'
|
123
|
+
require 'telegram/bot/types/menu_button_default'
|
124
|
+
require 'telegram/bot/types/chat_administrator_rights'
|
116
125
|
|
117
126
|
Virtus.finalize
|
data/lib/telegram/bot/version.rb
CHANGED
data/lib/telegram/bot.rb
CHANGED
data/telegram-bot-ruby.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
|
4
6
|
require 'telegram/bot/version'
|
@@ -17,13 +19,14 @@ Gem::Specification.new do |spec|
|
|
17
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
20
|
spec.require_paths = ['lib']
|
19
21
|
|
22
|
+
spec.add_dependency 'dry-inflector'
|
20
23
|
spec.add_dependency 'faraday', '~> 1.0'
|
21
24
|
spec.add_dependency 'virtus', '~> 2.0'
|
22
|
-
spec.add_dependency 'dry-inflector'
|
23
25
|
|
24
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
25
26
|
spec.add_development_dependency 'pry'
|
26
|
-
spec.add_development_dependency '
|
27
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
27
28
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
28
|
-
spec.add_development_dependency 'rubocop
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 1.27'
|
30
|
+
spec.add_development_dependency 'rubocop-rake'
|
31
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
|
29
32
|
end
|