I want to send text files through hipchat using the ruby hipchat-rb gem. There doesn't seem to be a way to do this described in the readme of this gem. Is it possible to do this?
Asked
Active
Viewed 81 times
1
-
1https://github.com/hipchat/hipchat-rb/blob/e65b02d966ebce30d0601a3235fa6e6e9cef3216/lib/hipchat/user.rb#L43 – Anthony Dec 21 '16 at 20:48
-
got it that worked. – Alex Cohen Dec 21 '16 at 21:26
1 Answers
1
the working solution:
#!/usr/bin/env ruby
require 'hipchat'
client = HipChat::Client.new('HIPCHAT_TOKEN', :api_version => 'v2', :server_url => 'HIPCHAT_URL')
client.user('some_username').send_file('message', File.open('some-file.txt') )

Alex Cohen
- 5,596
- 16
- 54
- 104