hubot-getsatisfaction v0.1.1
hubot-getsatisfaction
Hubot Get Satisfaction handler script to query topics by company.
See src/getsatisfaction.coffee
for full documentation.
This Hubot script supports JSON and Markdown views. which can be set using an environment variable or using adapter-based defaults.
Installation
In hubot project repo, run:
npm install hubot-getsatisfaction --save
Then add hubot-getsatisfaction to your external-scripts.json
:
["hubot-getsatisfaction"]
You can also add hubot-getsatisfaction
to your package.json
file and then run npm install
.
Configuration
Variable | Required | Description |
---|---|---|
HUBOT_GETSATISFACTION_COMPANY | Yes | API Company Name URL Slug, e.g. ringcentraldev |
HUBOT_GETSATISFACTION_VIEW | No | Enumerated value json ,markdown . Use markdown for Glip and json for Slack. |
Usage
Commands
Both keywords getsat
and gs
are used.
hubot getsat search (topics) (filter) <QUERY> - returns a list of matching topics.
hubot getsat (all) ideas - returns the total count of all ideas.
hubot getsat company - returns the total count of all ideas.
hubot getsat company <COMPANY_NAME> - sets company_name.
hubot getsat help
For more information on using filters, see the next section.
Search Topics
To search topics you can use the following topic filters which must be placed ahead of your query. For example hubot getsat search topics sort:votes style:idea glip
.
Filter | Values | Notes |
---|---|---|
sort | votes, newest, active, replies, unanswered | votes is an alias for most_me_toos |
style | question, problem, praise, idea, update | |
status | none, pending, active, complete, rejected, open, closed | open and closed are meta values. open = none or pending or active , closed = complete or rejected |
More information on filters is available here: https://education.getsatisfaction.com/reference-guide/api/api-resources/.
Example Usage
Create a Hubot instance, add hubot-getsatisfaction
to external-scripts.json
and start.
The following example uses the hubot-glip
adapter.
$ mkdir myhubot
$ cd myhubot
$ yo hubot
$ vi external-scripts.json
$ HUBOT_GLIP_SERVER=https://platform.ringcentral.com \
HUBOT_GLIP_APP_KEY=MyGlipAppKey \
HUBOT_GLIP_APP_SECRET=MyGlipAppSecret \
HUBOT_GLIP_USERNAME=16505550123
HUBOT_GLIP_EXTENSION=102
HUBOT_GLIP_PASSWORD=MyUserPassword
HUBOT_GETSATISFACTION_COMPANY=ringcentral \
HUBOT_GETSATISFACTION_VIEW=markdown \
./bin/hubot -n hubot -a glip
Links
Project Repo
Ready-to-Deploy version with Heroku One-Button Deployment
Hubot
Get Satisfaction API
- API Reference: https://education.getsatisfaction.com/reference-guide/api/
- API Specs: https://github.com/grokify/api-specs/tree/master/specs/getsatisfaction
Contributing
- Fork it ( http://github.com/grokify/hubot-getsatisfaction/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
Hubot Get Satisfaction script is available under the MIT license. See LICENSE.md for details.
Hubot Get Satisfaction script © 2016 by John Wang