https://github.com/thomasmost/polymnia
a strictly typed API wrapper for datamuse
https://github.com/thomasmost/polymnia
Last synced: 9 months ago
JSON representation
a strictly typed API wrapper for datamuse
- Host: GitHub
- URL: https://github.com/thomasmost/polymnia
- Owner: thomasmost
- Created: 2020-07-03T20:47:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T10:34:07.000Z (over 3 years ago)
- Last Synced: 2025-08-02T09:27:36.409Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.27 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
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`.