UNPKG

hall-integrations

Version:

Node.js wrapper for Hall Custom Integration API. Send custom messages to your rooms on Hall.

21 lines (17 loc) 532 B
var HallIntegrationClient = require('../'), hall, request; hall = new HallIntegrationClient(process.env.HALL_ROOM_TOKEN); request = hall.send('My Integration', 'Hi there!', 'http://icons.iconarchive.com/icons/toma4025/tea/256/tea-plant-leaf-icon.png'); request.then( // Success handler function (result) { console.log('Integration sent -', result.statusCode); process.exit(0); }, // Error handler function (error) { console.log('Error sending integration - ', error); process.exit(1); } );