1.1.0 • Published 5 years ago

dnd5e-client v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

DnD5e TypeScript APi (client edition)

This repo offers typings and function endpoints to the DnD 5e API. It is based on the dnd5e package and is designed to be used with the dnd5e-server package.

installation

Yarn

yarn add dnd5e-client

NPM

npm install dnd5e-client

use

After installing you can import normally:

import * as DnD from "dnd5e-client";

// -- or --

import {AbilityScore} from "dnd5e-client";

note: this package requires that you have setup the Express middleware from the dnd5e-server package. It is not stand-alone.

accessing the endpoints

Once you have the middleware setup, and your server running, you can find all endpoints under ClientEndpoints

import * as DnD from "dnd5e-client";

DnD.ClientEndpoints.skills()
	.then(console.log);

Every endpoint in ClientEndpoints returns a promise that resolves to a JSON object (typed). For more information on individual endpoints, see the JSDocs, or the DnD 5e API docs.

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago