Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "datamuse", | ||
"version": "0.0.4", | ||
"description": "node module for the Datamuse API", | ||
"version": "0.0.5", | ||
"description": "node module for the Datamuse API v1", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -9,13 +9,40 @@ ## Install | ||
The Datamuse API is a word-finding query engine for developers. | ||
The official website illustrates the kinds of queries you can make: [Datamuse API](http://www.datamuse.com/api/). | ||
This module helps you to make queries and supports promises. | ||
## Usage | ||
Straight forward approach by providing a query. | ||
```js | ||
const datamuse = require('datamuse'); | ||
datamuse.request('words?ml=ringing in the ears') | ||
.then((json) => { | ||
console.log(json); | ||
//do it! | ||
}); | ||
``` | ||
Use words as shortcut. | ||
```js | ||
datamuse.words({ | ||
ml: 'ringing in the ears' | ||
}) | ||
.then(console.log) | ||
.catch(console.log); | ||
.then((json) => { | ||
console.log(json); | ||
//do it! | ||
}); | ||
``` | ||
Use sug as shortcut. | ||
```js | ||
datamuse.sug({ | ||
s: 'rawand' | ||
}) | ||
.then((json) => { | ||
console.log(json); | ||
//do it! | ||
}); | ||
``` | ||
@@ -22,0 +49,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2509
52