Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thomasmost/polymnia

a strictly typed API wrapper for datamuse
https://github.com/thomasmost/polymnia

Last synced: about 1 month ago
JSON representation

a strictly typed API wrapper for datamuse

Awesome Lists containing this project

README

        

Polymnia
---

Polymnia is a strictly typed wrapper for the datamuse API

Usage
---

```
npm install polymnia

import { suggest, words } from 'polymnia';
```

Currently supports many of the common query filters for the Words API as described here: http://www.datamuse.com/api/

Queries can be constructed using the typed Polymnia query config:

```
type WordsApiParams = {
leftContext?: string;
rightContext?: string;
maxResults?: number;
meansLike?: string;
metadata?: Partial>;
oftenDescribedAs?: string;
oftenDescribes?: string;
rawQuery?: string;
rhymesWith?: string;
soundsLike?: string;
startsWith?: string;
endsWith?: string;
topics?: string[];
wildCount?: number;
};
```

...or by passing in a `rawQuery`.