0.0.6 • Published 8 years ago

vocabspree-sdk v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

vocabspree-sdk Build Status

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

NameTypeDescription
awsAccessKeyIdStringAWS access key id
awsSecretAccessKeyStringAWS 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.

NameTypeDescription
wordStringThe 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