2.2.1 • Published 5 years ago

slack-command-hackernews v2.2.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
5 years ago

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

OptionValue
Command/hackernews
Request URLhttps://website.com/hackernews
Short DescriptionQuery HackerNews
Usage Hint[new|top|best] [count]

example

CommandDescription
/hackernewsthe 5 newest stories
/hackernews new 5the 5 newest stories
/hackernews top 3the top 3 stories
/hackernews best 10the 10 best stories
/hackernews helphelp message
2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago