1.0.2 • Published 3 years ago

@pipe01/the-one-sdk v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Lord of the Rings SDK

This SDK wraps the public The One API and provides an easy way to query all of the available data.

By Felipe Martínez Tabaco.

Installing

$ npm i @pipe01/the-one-sdk

Usage

You will first need to create an account on the The One API website and get your API key, with this you can use all of the SDK's methods:

import { createApi } from "@pipe01/the-one-sdk"

const api = createApi("MY-TOKEN");

const books = await api.books().get();

const gandalf = await api.characters().with("name", "==", "Gandalf").get();

Tests

To run the tests you must clone this repository, then run pnpm i or npm i to install all required dependencies.

You can now run pnpm test or npm run test to run all tests. Note that you must provide an API key through the "TOKEN" environment variable.

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago