slackhooks
Simple Slack Incoming Webhooks
Last updated 2 years ago by jlobos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install slackhooks 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

3 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
  • xo ^0.18.2
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |