https://github.com/ansteh/datamuse
node module for the Datamuse API
https://github.com/ansteh/datamuse
datamuse-api nodejs
Last synced: 4 months ago
JSON representation
node module for the Datamuse API
- Host: GitHub
- URL: https://github.com/ansteh/datamuse
- Owner: ansteh
- License: mit
- Created: 2016-03-08T16:58:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-13T08:05:28.000Z (almost 10 years ago)
- Last Synced: 2025-09-29T11:55:45.810Z (9 months ago)
- Topics: datamuse-api, nodejs
- Language: JavaScript
- Size: 7.81 KB
- Stars: 39
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/ansteh/datamuse)
## Install
Using npm:
```js
npm install datamuse
```
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((json) => {
console.log(json);
//do it!
});
```
Use sug as shortcut.
```js
datamuse.sug({
s: 'rawand'
})
.then((json) => {
console.log(json);
//do it!
});
```
## License
MIT © [Andre Stehle](https://github.com/ansteh)