@alexortizrosado/lord-of-the-rings-sdk
TypeScript icon, indicating that this package has built-in type declarations

2022.0.8 • Public • Published

Typescript SDK for The Lord of the Rings API

Access Token

Before using the SDK, you'll need to get an access token from https://the-one-api.dev/sign-up

Installation

npm i @alexortizrosado/lord-of-the-rings-sdk

Usage

To get a catalog of books:

import { LotrApi } from "@alexortizrosado/lord-of-the-rings-sdk";

const client = new LotrApi("your-access-token");

const books = await client.Book.catalog({
  limit: 3,
});

To get a list of quotes from a character:

import { LotrApi } from "@alexortizrosado/lord-of-the-rings-sdk";

const client = new LotrApi("your-access-token");

const books = await client.Quote.getQuotesByCharacter(
  "5cf5805fb53e011a64671582",
  {
    limit: 5,
  }
);

Readme

Keywords

none

Package Sidebar

Install

npm i @alexortizrosado/lord-of-the-rings-sdk

Weekly Downloads

0

Version

2022.0.8

License

MIT

Unpacked Size

45.2 kB

Total Files

69

Last publish

Collaborators

  • alexortizrosado