Method: TelegramAPI#sendDocument
- Defined in:
- lib/telegramAPI.rb
#sendDocument(to, path, options = {}) ⇒ Message
Send a general document (file, image, audio)
99 100 101 |
# File 'lib/telegramAPI.rb', line 99 def sendDocument to, path, ={} Message.new JSON.parse(RestClient.post(@@core+@token+"/sendDocument", {:document=>File.new(path,'rb'), :chat_id=>to.to_s}.merge(parse_hash())).body)["result"] end |