telegram-bot-types 0.3.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/telegram/bot/types.rb +16 -1
- data/lib/telegram/bot/types/animation.rb +13 -0
- data/lib/telegram/bot/types/callback_game.rb +8 -0
- data/lib/telegram/bot/types/callback_query.rb +2 -0
- data/lib/telegram/bot/types/chat.rb +1 -0
- data/lib/telegram/bot/types/chat_member.rb +10 -0
- data/lib/telegram/bot/types/game.rb +14 -0
- data/lib/telegram/bot/types/game_high_score.rb +11 -0
- data/lib/telegram/bot/types/inline_keyboard_button.rb +3 -0
- data/lib/telegram/bot/types/inline_query_result_audio.rb +1 -0
- data/lib/telegram/bot/types/inline_query_result_cached_audio.rb +1 -0
- data/lib/telegram/bot/types/inline_query_result_cached_voice.rb +1 -0
- data/lib/telegram/bot/types/inline_query_result_game.rb +12 -0
- data/lib/telegram/bot/types/inline_query_result_gif.rb +1 -0
- data/lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb +1 -0
- data/lib/telegram/bot/types/inline_query_result_voice.rb +1 -0
- data/lib/telegram/bot/types/invoice.rb +13 -0
- data/lib/telegram/bot/types/labeled_price.rb +10 -0
- data/lib/telegram/bot/types/message.rb +6 -1
- data/lib/telegram/bot/types/order_info.rb +12 -0
- data/lib/telegram/bot/types/pre_checkout_query.rb +15 -0
- data/lib/telegram/bot/types/{reply_keyboard_hide.rb → reply_keyboard_remove.rb} +2 -2
- data/lib/telegram/bot/types/shipping_address.rb +14 -0
- data/lib/telegram/bot/types/shipping_option.rb +11 -0
- data/lib/telegram/bot/types/shipping_query.rb +12 -0
- data/lib/telegram/bot/types/successful_payment.rb +15 -0
- data/lib/telegram/bot/types/update.rb +2 -0
- data/lib/telegram/bot/types/user.rb +1 -0
- data/lib/telegram/bot/types/user_profile_photos.rb +1 -1
- data/lib/telegram/bot/types/version.rb +1 -1
- data/lib/telegram/bot/types/video_note.rb +13 -0
- data/telegram-bot-types.gemspec +0 -1
- metadata +19 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85255981f3fa947c7001592ffa42a38cd96e9916
|
4
|
+
data.tar.gz: bd72458c724896c5ea7a58c0b3d22b552861cc27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c49b3b44ab2731764e7d7b4d5f6ad3a9f261d512a87089e5a2822bb7721308398295617fcf458fa35bbb5eaa9e0d08c011074771ddf084da633e9e7728248d9
|
7
|
+
data.tar.gz: 79e3ef124f2e3ab0fe3cfe8e5aee74a2f4d94597f3f60a1bb5f4a5d409a988bc8ae7dca28d03415155ce6e508984c0bfb8695a5c6e004bc45ffb66e968788ced
|
data/lib/telegram/bot/types.rb
CHANGED
@@ -4,15 +4,20 @@ module Telegram
|
|
4
4
|
module Bot
|
5
5
|
module Types
|
6
6
|
%w(
|
7
|
+
animation
|
7
8
|
audio
|
8
9
|
base
|
10
|
+
callback_game
|
9
11
|
callback_query
|
10
12
|
chat
|
13
|
+
chat_member
|
11
14
|
chosen_inline_result
|
12
15
|
contact
|
13
16
|
document
|
14
17
|
file
|
15
18
|
force_reply
|
19
|
+
game
|
20
|
+
game_high_score
|
16
21
|
inline_keyboard_button
|
17
22
|
inline_keyboard_markup
|
18
23
|
inline_query
|
@@ -28,6 +33,7 @@ module Telegram
|
|
28
33
|
inline_query_result_cached_voice
|
29
34
|
inline_query_result_contact
|
30
35
|
inline_query_result_document
|
36
|
+
inline_query_result_game
|
31
37
|
inline_query_result_gif
|
32
38
|
inline_query_result_location
|
33
39
|
inline_query_result_mpeg4_gif
|
@@ -40,20 +46,29 @@ module Telegram
|
|
40
46
|
input_message_content
|
41
47
|
input_text_message_content
|
42
48
|
input_venue_message_content
|
49
|
+
invoice
|
43
50
|
keyboard_button
|
51
|
+
labeled_price
|
44
52
|
location
|
45
53
|
message
|
46
54
|
message_entity
|
55
|
+
order_info
|
47
56
|
photo_size
|
48
|
-
|
57
|
+
pre_checkout_query
|
49
58
|
reply_keyboard_markup
|
59
|
+
reply_keyboard_remove
|
60
|
+
shipping_address
|
61
|
+
shipping_option
|
62
|
+
shipping_query
|
50
63
|
sticker
|
64
|
+
successful_payment
|
51
65
|
update
|
52
66
|
user
|
53
67
|
user_profile_photos
|
54
68
|
venue
|
55
69
|
version
|
56
70
|
video
|
71
|
+
video_note
|
57
72
|
voice
|
58
73
|
).each do |type|
|
59
74
|
autoload type.camelize, "telegram/bot/types/#{type}"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Telegram
|
2
|
+
module Bot
|
3
|
+
module Types
|
4
|
+
class Game < Base
|
5
|
+
attribute :title, String
|
6
|
+
attribute :description, String
|
7
|
+
attribute :photo, [PhotoSize]
|
8
|
+
attribute :text, String
|
9
|
+
attribute :text_entities, [MessageEntity]
|
10
|
+
attribute :animation, Animation
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Telegram
|
2
|
+
module Bot
|
3
|
+
module Types
|
4
|
+
class InlineQueryResultGame < Base
|
5
|
+
attribute :type, String, default: 'game'
|
6
|
+
attribute :id, String
|
7
|
+
attribute :game_short_name, String
|
8
|
+
attribute :reply_markup, InlineKeyboardMarkup
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -6,6 +6,7 @@ module Telegram
|
|
6
6
|
attribute :id, String
|
7
7
|
attribute :voice_url, String
|
8
8
|
attribute :title, String
|
9
|
+
attribute :caption, String
|
9
10
|
attribute :voice_duration, Integer
|
10
11
|
attribute :reply_markup, InlineKeyboardMarkup
|
11
12
|
attribute :input_message_content, InputMessageContent
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Telegram
|
2
|
+
module Bot
|
3
|
+
module Types
|
4
|
+
class Invoice < Base
|
5
|
+
attribute :title, String
|
6
|
+
attribute :description, String
|
7
|
+
attribute :start_parameter, String
|
8
|
+
attribute :currency, String
|
9
|
+
attribute :total_amount, Integer
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -8,6 +8,7 @@ module Telegram
|
|
8
8
|
attribute :chat, Chat
|
9
9
|
attribute :forward_from, User
|
10
10
|
attribute :forward_from_chat, Chat
|
11
|
+
attribute :forward_from_message_id, Integer
|
11
12
|
attribute :forward_date, Integer
|
12
13
|
attribute :reply_to_message, Message
|
13
14
|
attribute :edit_date, Integer
|
@@ -15,15 +16,17 @@ module Telegram
|
|
15
16
|
attribute :entities, [MessageEntity]
|
16
17
|
attribute :audio, Audio
|
17
18
|
attribute :document, Document
|
19
|
+
attribute :game, Game
|
18
20
|
attribute :photo, [PhotoSize]
|
19
21
|
attribute :sticker, Sticker
|
20
22
|
attribute :video, Video
|
21
23
|
attribute :voice, Voice
|
24
|
+
attribute :video_note, VideoNote
|
22
25
|
attribute :caption, String
|
23
26
|
attribute :contact, Contact
|
24
27
|
attribute :location, Location
|
25
28
|
attribute :venue, Venue
|
26
|
-
attribute :
|
29
|
+
attribute :new_chat_members, [User]
|
27
30
|
attribute :left_chat_member, User
|
28
31
|
attribute :new_chat_title, String
|
29
32
|
attribute :new_chat_photo, [PhotoSize]
|
@@ -34,6 +37,8 @@ module Telegram
|
|
34
37
|
attribute :migrate_to_chat_id, Integer
|
35
38
|
attribute :migrate_from_chat_id, Integer
|
36
39
|
attribute :pinned_message, Message
|
40
|
+
attribute :invoice, Invoice
|
41
|
+
attribute :successful_payment, SuccessfulPayment
|
37
42
|
|
38
43
|
alias_method :to_s, :text
|
39
44
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Telegram
|
2
|
+
module Bot
|
3
|
+
module Types
|
4
|
+
class PreCheckoutQuery < Base
|
5
|
+
attribute :id, String
|
6
|
+
attribute :from, User
|
7
|
+
attribute :currency, String
|
8
|
+
attribute :total_amount, Integer
|
9
|
+
attribute :invoice_payload, String
|
10
|
+
attribute :shipping_option_id, String
|
11
|
+
attribute :order_info, OrderInfo
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Telegram
|
2
|
+
module Bot
|
3
|
+
module Types
|
4
|
+
class ShippingAddress < Base
|
5
|
+
attribute :country_code, String
|
6
|
+
attribute :state, String
|
7
|
+
attribute :city, String
|
8
|
+
attribute :street_line1, String
|
9
|
+
attribute :street_line2, String
|
10
|
+
attribute :post_code, String
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Telegram
|
2
|
+
module Bot
|
3
|
+
module Types
|
4
|
+
class SuccessfulPayment < Base
|
5
|
+
attribute :currency, String
|
6
|
+
attribute :total_amount, Integer
|
7
|
+
attribute :invoice_payload, String
|
8
|
+
attribute :shipping_option_id, String
|
9
|
+
attribute :order_info, OrderInfo
|
10
|
+
attribute :telegram_payment_charge_id, String
|
11
|
+
attribute :provider_payment_charge_id, String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -10,6 +10,8 @@ module Telegram
|
|
10
10
|
attribute :inline_query, InlineQuery
|
11
11
|
attribute :chosen_inline_result, ChosenInlineResult
|
12
12
|
attribute :callback_query, CallbackQuery
|
13
|
+
attribute :shipping_query, ShippingQuery
|
14
|
+
attribute :pre_checkout_query, PreCheckoutQuery
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
data/telegram-bot-types.gemspec
CHANGED
@@ -25,7 +25,6 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.3'
|
27
27
|
spec.add_development_dependency 'rspec-its', '~> 1.1'
|
28
|
-
spec.add_development_dependency 'activesupport', '~> 4.0'
|
29
28
|
|
30
29
|
spec.add_development_dependency 'pry', '~> 0.10'
|
31
30
|
spec.add_development_dependency 'rubocop', '~> 0.37.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telegram-bot-types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Tipugin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: virtus
|
@@ -95,20 +95,6 @@ dependencies:
|
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '1.1'
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: activesupport
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - "~>"
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '4.0'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "~>"
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '4.0'
|
112
98
|
- !ruby/object:Gem::Dependency
|
113
99
|
name: pry
|
114
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,15 +144,20 @@ files:
|
|
158
144
|
- bin/install_git_hooks
|
159
145
|
- bin/setup
|
160
146
|
- lib/telegram/bot/types.rb
|
147
|
+
- lib/telegram/bot/types/animation.rb
|
161
148
|
- lib/telegram/bot/types/audio.rb
|
162
149
|
- lib/telegram/bot/types/base.rb
|
150
|
+
- lib/telegram/bot/types/callback_game.rb
|
163
151
|
- lib/telegram/bot/types/callback_query.rb
|
164
152
|
- lib/telegram/bot/types/chat.rb
|
153
|
+
- lib/telegram/bot/types/chat_member.rb
|
165
154
|
- lib/telegram/bot/types/chosen_inline_result.rb
|
166
155
|
- lib/telegram/bot/types/contact.rb
|
167
156
|
- lib/telegram/bot/types/document.rb
|
168
157
|
- lib/telegram/bot/types/file.rb
|
169
158
|
- lib/telegram/bot/types/force_reply.rb
|
159
|
+
- lib/telegram/bot/types/game.rb
|
160
|
+
- lib/telegram/bot/types/game_high_score.rb
|
170
161
|
- lib/telegram/bot/types/inline_keyboard_button.rb
|
171
162
|
- lib/telegram/bot/types/inline_keyboard_markup.rb
|
172
163
|
- lib/telegram/bot/types/inline_query.rb
|
@@ -182,6 +173,7 @@ files:
|
|
182
173
|
- lib/telegram/bot/types/inline_query_result_cached_voice.rb
|
183
174
|
- lib/telegram/bot/types/inline_query_result_contact.rb
|
184
175
|
- lib/telegram/bot/types/inline_query_result_document.rb
|
176
|
+
- lib/telegram/bot/types/inline_query_result_game.rb
|
185
177
|
- lib/telegram/bot/types/inline_query_result_gif.rb
|
186
178
|
- lib/telegram/bot/types/inline_query_result_location.rb
|
187
179
|
- lib/telegram/bot/types/inline_query_result_mpeg4_gif.rb
|
@@ -194,20 +186,29 @@ files:
|
|
194
186
|
- lib/telegram/bot/types/input_message_content.rb
|
195
187
|
- lib/telegram/bot/types/input_text_message_content.rb
|
196
188
|
- lib/telegram/bot/types/input_venue_message_content.rb
|
189
|
+
- lib/telegram/bot/types/invoice.rb
|
197
190
|
- lib/telegram/bot/types/keyboard_button.rb
|
191
|
+
- lib/telegram/bot/types/labeled_price.rb
|
198
192
|
- lib/telegram/bot/types/location.rb
|
199
193
|
- lib/telegram/bot/types/message.rb
|
200
194
|
- lib/telegram/bot/types/message_entity.rb
|
195
|
+
- lib/telegram/bot/types/order_info.rb
|
201
196
|
- lib/telegram/bot/types/photo_size.rb
|
202
|
-
- lib/telegram/bot/types/
|
197
|
+
- lib/telegram/bot/types/pre_checkout_query.rb
|
203
198
|
- lib/telegram/bot/types/reply_keyboard_markup.rb
|
199
|
+
- lib/telegram/bot/types/reply_keyboard_remove.rb
|
200
|
+
- lib/telegram/bot/types/shipping_address.rb
|
201
|
+
- lib/telegram/bot/types/shipping_option.rb
|
202
|
+
- lib/telegram/bot/types/shipping_query.rb
|
204
203
|
- lib/telegram/bot/types/sticker.rb
|
204
|
+
- lib/telegram/bot/types/successful_payment.rb
|
205
205
|
- lib/telegram/bot/types/update.rb
|
206
206
|
- lib/telegram/bot/types/user.rb
|
207
207
|
- lib/telegram/bot/types/user_profile_photos.rb
|
208
208
|
- lib/telegram/bot/types/venue.rb
|
209
209
|
- lib/telegram/bot/types/version.rb
|
210
210
|
- lib/telegram/bot/types/video.rb
|
211
|
+
- lib/telegram/bot/types/video_note.rb
|
211
212
|
- lib/telegram/bot/types/voice.rb
|
212
213
|
- telegram-bot-types.gemspec
|
213
214
|
homepage: https://github.com/telegram-bot-rb/telegram-bot-types
|
@@ -230,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
231
|
version: '0'
|
231
232
|
requirements: []
|
232
233
|
rubyforge_project:
|
233
|
-
rubygems_version: 2.
|
234
|
+
rubygems_version: 2.6.8
|
234
235
|
signing_key:
|
235
236
|
specification_version: 4
|
236
237
|
summary: Virtus types for Telegram Bot API
|