0.1.4 • Published 3 years ago

@zettabit/rpglogs-api-sdk v0.1.4

Weekly downloads
-
License
AGPL-3.0
Repository
github
Last release
3 years ago

RPGLogs API SDK

Install the API SDK in your project:

npm install --save @zettabit/rpglogs-api-sdk

Import the SDK builder function:

import { buildWarcraftLogsSdk } from "@zettabit/rpglogs-api-sdk";

Build an SDK by providing an access token:

const sdk = buildWarcraftLogsSdk(accessToken);

Use methods on the SDK to call the RPGLogs API:

const response = await sdk.guildData({
  name: 'Some Guild',
  serverSlug: 'Kazzak',
  serverRegion: 'EU',
});

const guild = response?.guildData?.guild;

Easy!

Check out the sample application to see how to handle different error scenarios, as well as an example of getting an access token through the client credentials flow.

There is also formal documentation for this library.

Developing in this repository:

# Install dependencies
yarn install

# Now you can run various yarn commands:
yarn cli
yarn lint
yarn test
yarn build-all
yarn ts-node <filename>
yarn esbuild-browser
...
0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago