# tarik-catic-sdk

> SDK for an existing LOTR API

Latest version **1.0.0** (published 2022-07-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install tarik-catic-sdk
pnpm add tarik-catic-sdk
yarn add tarik-catic-sdk
bun add tarik-catic-sdk
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-07-17 |
| First published | 2022-07-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.4 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | tcatic |
| Maintainers | tcatic |

## Links

- npm: https://www.npmjs.com/package/tarik-catic-sdk
- npm.io page: https://npm.io/package/tarik-catic-sdk

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.27.2

## Recent versions

- 1.0.0 (latest) — 2022-07-17

## README

## Lord of The Rings SDK

This module implements the Lord of The Rings API that can be found under https://the-one-api.dev/v2. The module can be imported and used in your code as:
```javascript
import { LotrSdk } from 'tcatic-sdk';
// Create a LotrSdk instance with your bearer token from `the-one-api`
const lotrSdk = new LotrSdk('your-api-key');

// Get all books
const books = await lotrSdk.books.get();

// Get one specific book
const book = await lotrSdk.books.get({
    id: '5cf5805fb53e011a64671582'
});

/* All options that can be set are
{
    id?: string;
    action?: 'quote' | 'chapter';
    limit?: number;
    page?: number;
    offset?: number;
    filter?: FilterOptions;
    sort?: SortOptions;
}
*/
```

The module supports five different endpoints: `/book`, `/character`, `/chapter`, `/movie`, `/quote`. All modules can be accessed in the same way: 
```javascript
lotrSdk.{books | characters | chapters | movies | quotes }.get();
```

## Test the application
To test the application, just run `npm run test` from the root. For now, tests have only been added for the `/book` endpoint and should be expanded.

---
_Source: https://npm.io/package/tarik-catic-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
