An assortment of useful service wrappers with uniform initialization and simplified client calls.
The aim of this library is to provide some useful services with a standard initialization pattern for all services. Furthermore the key calls for using those APIs have been greatly simplified using defaults for most parameters.
Install via npm:
npm install servicekit --save
Use services by importing and initializing them with a config. All services follow the same initialization pattern.
var ta = require('servicekit/tone-analyzer')(config);
ta.tone('That sounds great', function(err, result){
if(err) {
// handle it
}
});
The following services are presently in the kit:
- Conversation (https://www.ibm.com/watson/developercloud/conversation.html)
- Wit (http://wit.ai)
- Bing Spell Check (https://www.microsoft.com/cognitive-services/en-us/bing-spell-check-api/documentation)
- Tone Analyzer (https://www.ibm.com/watson/developercloud/doc/tone-analyzer/)
- Recast.ai (https://recast.ai)
First, you'll need to pull down the code from GitHub:
git clone https://github.com/wallali/servicekit.git
Second, you'll need to install the project dependencies as well as the dev dependencies. To do this, simply run the following from the directory you created in step 1:
npm install
With your local environment configured, running tests is as simple as:
npm test
servicekit
uses the debug module to output debug messages to the console. To output all debug messages, run your node app with the DEBUG
environment variable:
DEBUG=servicekit:* node your-app.js
This will output debugging messages from servicekit
.