slack-command-hackernews
v2.2.1
Published
HackerNews /slash Command for Slack
Downloads
10
Readme
slack-command-hackernews
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