Class: ChatbotHelper::Telegram::Game
Overview
The game resource which represents a Telegram bot API game
Instance Attribute Summary
Attributes inherited from BaseResource
#hash
Class Method Summary
collapse
#==, #initialize, required_objects, #to_s, valid_resource!, valid_resource?
Class Method Details
.optional_arrays ⇒ Object
26
27
28
29
30
31
|
# File 'lib/chatbot_helper/telegram/game.rb', line 26
def optional_arrays
[
{ name: 'text_entities',
type: ChatbotHelper::Telegram::MessageEntity }
]
end
|
.optional_fields ⇒ Object
10
11
12
|
# File 'lib/chatbot_helper/telegram/game.rb', line 10
def optional_fields
%w[text]
end
|
.optional_objects ⇒ Object
14
15
16
17
18
|
# File 'lib/chatbot_helper/telegram/game.rb', line 14
def optional_objects
[
{ name: 'animation', type: ChatbotHelper::Telegram::Animation }
]
end
|
.required_arrays ⇒ Object
20
21
22
23
24
|
# File 'lib/chatbot_helper/telegram/game.rb', line 20
def required_arrays
[
{ name: 'photo', type: ChatbotHelper::Telegram::PhotoSize }
]
end
|
.required_fields ⇒ Object
6
7
8
|
# File 'lib/chatbot_helper/telegram/game.rb', line 6
def required_fields
%w[title description]
end
|