Open pchaganti opened 7 years ago
+1 getting the same thing
@pchaganti @tommybstitch
This works for me.
require 'hipchat'
require 'securerandom'
client = HipChat::Client.new(my_token)
card = {
style: 'application',
title: 'Example Title',
id: SecureRandom.uuid,
url: 'my_url',
description: {
format: :html,
value: 'This is a test'
},
attributes: [
{
label: 'Total Records',
value: { label: '1082404', style: 'lozenge-success' }
},
{
label: 'Total Runtime',
value: { label: '0.39 seconds', style: 'lozenge' }
},
]
}
room = client['Test']
room.send('test_sender', 'test_message', message_format: :html, card: card)
This list of required fields are here: https://www.hipchat.com/docs/apiv2/method/send_room_notification
Example API payloads are here: https://developer.atlassian.com/server/hipchat/messages/
Hope this helps!
Unable to get this to work. The error message is rather cryptic about what is missing. Anyone have any pointers?