[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Latest commit

 

History

History
42 lines (31 loc) · 1.1 KB

readme.md

File metadata and controls

42 lines (31 loc) · 1.1 KB

slackhooks

Build Status XO code style

Send data into Slack in real-time by Incoming Webhooks.

Install

npm install --save slackhooks

Usage

const slack = require('slackhooks')

// id or full url
const me = 'T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'
const backend = 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'

slack('Hey today is birthday of Camila :tada:', me)
// or if is need response
slack('Hey today is birthday of Camila :tada:', me).then(res => {
  console.log(res)
})

// Advanced message formatting (Attachments, Message buttons)
// https://api.slack.com/docs/messages/builder
slack({
  text: 'Status: Deploy done :ok_hand: Your build exited with 0.',
  username: 'docker',
  icon_emoji: ':whale:',
  link_names: 1,
  channel: '#backend'
}, backend)

License

MIT © Jesús Lobos