Class: Moceansdk::Modules::Command::McObject::TgSendVideo
- Inherits:
-
AbstractMc
- Object
- AbstractMc
- Moceansdk::Modules::Command::McObject::TgSendVideo
show all
- Defined in:
- lib/moceansdk/modules/command/mc_object/tg_send_video.rb
Instance Method Summary
collapse
Methods inherited from AbstractMc
#get_request_data, #initialize
Instance Method Details
#action ⇒ Object
7
8
9
|
# File 'lib/moceansdk/modules/command/mc_object/tg_send_video.rb', line 7
def action
'send-telegram'
end
|
#content(url, text) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/moceansdk/modules/command/mc_object/tg_send_video.rb', line 29
def content(url,text)
@params[:'content'] = {}
@params[:'content'][:'rich_media_url'] = url
@params[:'content'][:'text'] = text
@params[:'content'][:'type'] = 'video'
return self
end
|
#from(from, contact_type = 'bot_username') ⇒ Object
15
16
17
18
19
20
|
# File 'lib/moceansdk/modules/command/mc_object/tg_send_video.rb', line 15
def from(from, contact_type = 'bot_username')
@params[:'from'] = {}
@params[:'from'][:'id'] = from
@params[:'from'][:'type'] = contact_type
return self
end
|
#required_key ⇒ Object
11
12
13
|
# File 'lib/moceansdk/modules/command/mc_object/tg_send_video.rb', line 11
def required_key
['from','to','content']
end
|
#to(to, contact_type = "chat_id") ⇒ Object
22
23
24
25
26
27
|
# File 'lib/moceansdk/modules/command/mc_object/tg_send_video.rb', line 22
def to(to, contact_type = "chat_id")
@params[:'to'] = {}
@params[:'to'][:'id'] = to
@params[:'to'][:'type'] = contact_type
return self
end
|