This node application runs using node v0.12.7 or newer.
- Clone repo to your webserver
- Copy config.templ.js to config.js
- Set values in config.js
- Determine what API you want to use
1. api - Set to 'untappd' if using the Untappd API or 'breweryDb' if using Brewery DB API
2. Untappd
- untappd.clientId - Get from https://untappd.com/api/docs/v4
- untappd.clientSecret - Ditto 3. Brewery DB
- brewerydb.key - Get from http://brewerydb.com
- slackToken - Get from slack https://api.slack.com/web
- searchLimit - Change the max number of search results that should be returned
- urlPrefix - (Optional) If you want to run the service under a sub URL (ex. http://foo.com/bar) add the prefix to this config option (ex. '/bar' if using http://foo.com/bar)
- Run
npm install
- Start sever
node app
- Go to
https://[company name].slack.com/services/new/slash-commands
- Setup command endpoint it to your webserver
http://[domain name]:[port]/[urlPrefix]
/beer help
example command:
/beer help
example response:
Help:
/[command] search Yuengling
/[command] display 16649
/[command] search SweetWater 420
/[command] help
/beer search [name of beer]
example command:
/beer search Yuengling
example response:
Yuengling Bock Beer id:3kZwor
Yuengling Premium Beer id:2DdatF
Yuengling Light Beer id:eXMP2g
Yuengling Black id:3iNytk
Yuengling Porter id:BGTAQw
/beer display [beer id | beer name]
example command:
/beer display 3kZwor
or
/beer display Yuengling Bock
/beer otw
example command:
/beer otw