Sha256: 8d4cc64384dcf9aacac139deb2c4f139ad1dfada01f747ad53d1d4cf33c0f79c

Contents?: true

Size: 993 Bytes

Versions: 1

Compression:

Stored size: 993 Bytes

Contents

module Moceansdk
  module Modules
    module Command
      module McObject

        class TgSendPhoto < AbstractMc
          def action
            'send-telegram'
          end

          def required_key
            ['from','to','content']
          end

          def from(from, contact_type = 'bot_username')
            @params[:'from'] = {}
            @params[:'from'][:'id'] = from
            @params[:'from'][:'type'] = contact_type
            return self
          end

          def to(to, contact_type = "chat_id")
            @params[:'to'] = {}
            @params[:'to'][:'id'] = to
            @params[:'to'][:'type'] = contact_type
            return self
          end

          def content(url,text)
            @params[:'content'] = {}
            @params[:'content'][:'rich_media_url'] = url
            @params[:'content'][:'text'] = text
            @params[:'content'][:'type'] = 'photo'
            return self
          end
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moceansdk-1.1.1 lib/moceansdk/modules/command/mc_object/tg_send_photo.rb