vocabspree-sdk
Node SDK for Vocabspree
Install
$ npm install --save vocabspree-sdk
Usage
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 test
Build
$ npm run build
License
MIT © Joe Gesualdo