npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

slack-command-hackernews

2.2.1 • Public • Published

slack-command-hackernews

npm-version travis-ci coveralls-status

HackerNews /slash Command for Slack

middleware

var express = require('express')
var hackernews = require('slack-command-hackernews')
var auth = {token: 'hook token'}
 
express()
  .use(hackernews(auth))
  .listen(3000)

api

var express = require('express')
var parser = require('body-parser')
var hackernews = require('slack-command-hackernews')
var auth = {token: 'hook token'}
 
express()
  .use(parser.urlencoded({extended: true}))
  .use((req, res) => {
    var input = req.body
    res.json(hackernews.respond({auth, input}))
    hackernews.query({auth, input}).catch(console.error)
  })
  .listen(3000)

command

Option Value
Command /hackernews
Request URL https://website.com/hackernews
Short Description Query HackerNews
Usage Hint [new|top|best] [count]

example

Command Description
/hackernews the 5 newest stories
/hackernews new 5 the 5 newest stories
/hackernews top 3 the top 3 stories
/hackernews best 10 the 10 best stories
/hackernews help help message

install

npm i slack-command-hackernews

Downloadsweekly downloads

0

version

2.2.1

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability