class Moceansdk::Modules::Command::McObject::TgSendPhoto

Public Instance Methods

action() click to toggle source
# File lib/moceansdk/modules/command/mc_object/tg_send_photo.rb, line 7
def action
  'send-telegram'
end
content(url,text) click to toggle source
# File lib/moceansdk/modules/command/mc_object/tg_send_photo.rb, line 29
def content(url,text)
  @params[:'content'] = {}
  @params[:'content'][:'rich_media_url'] = url
  @params[:'content'][:'text'] = text
  @params[:'content'][:'type'] = 'photo'
  return self
end
from(from, contact_type = 'bot_username') click to toggle source
# File lib/moceansdk/modules/command/mc_object/tg_send_photo.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() click to toggle source
# File lib/moceansdk/modules/command/mc_object/tg_send_photo.rb, line 11
def required_key
  ['from','to','content']
end
to(to, contact_type = "chat_id") click to toggle source
# File lib/moceansdk/modules/command/mc_object/tg_send_photo.rb, line 22
def to(to, contact_type = "chat_id")
  @params[:'to'] = {}
  @params[:'to'][:'id'] = to
  @params[:'to'][:'type'] = contact_type
  return self
end