0.0.6 • Published 9 years ago
vocabspree-sdk v0.0.6
vocabspree-sdk 
Node SDK for Vocabspree
Install
$ npm install --save vocabspree-sdkUsage
import VocabspreeApi from 'vocabspree-sdk';
let vocabspree = new VocabspreeApi({
awsAccessKeyId: "...",
awsSecretAccessKey: "...",
});
vocabspree.getDefinition('cat')
.then(def => {
console.log(def)
})
.catch(err => {
console.log(err)
})API
Vocabspree(options)
Initialized instance of VocabspreeApi
Constructor Options
| Name | Type | Description |
|---|---|---|
| awsAccessKeyId | String | AWS access key id |
| awsSecretAccessKey | String | AWS secret acess key |
Returns: instance of VocabspreeApi
import VocabspreeApi from 'vocabspree-sdk';
let vocabspree = new VocabspreeApi({
awsAccessKeyId: "...",
awsSecretAccessKey: "...",
});getDefinition(word)
Gets definition and other helpful things for a word.
| Name | Type | Description |
|---|---|---|
| word | String | The word you want the defintion for |
Returns: Object with definitions and other helpful things for a word
import VocabspreeApi from 'vocabspree-sdk';
let vocabspree = new VocabspreeApi({
awsAccessKeyId: "...",
awsSecretAccessKey: "...",
});
vocabspree.getDefinition('cat')
.then(def => {
console.log(def)
})
.catch(err => {
console.log(err)
})Test
$ npm testBuild
$ npm run buildLicense
MIT © Joe Gesualdo