# charly-sdk

> Thanks for your visiting our SDK.

Latest version **0.1.4** (published 2022-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install charly-sdk
pnpm add charly-sdk
yarn add charly-sdk
bun add charly-sdk
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2022-12-02 |
| First published | 2022-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 204.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Excellent Coding |
| Maintainers | excellent-coding |

## Links

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

## Recent versions

- 0.1.4 (latest) — 2022-12-02
- 0.1.3 — 2022-12-01
- 0.1.2 — 2022-12-01
- 0.1.1 — 2022-12-01
- 0.1.0 — 2022-12-01

## README

# Charly-SDK(The Lord of the Rings SDK) User Guide

Thanks for your visiting our SDK.

Do you love The Lord of the Rings? Great, how about making it easy for developers to consume information about the trilogy?

This is a SDK for an existing Lord of the Rings API.

You can find the public [Lord of the Rings API](https://the-one-api.dev) and this is a [Documenatation](https://the-one-api.dev/documentation) for that

## Installation

To run SDK, use:

```bash
npm install charly-sdk # or yarn add charly-sdk
```

## Usage

```bash
import sdk from 'charly-sdk';
const client = new sdk('YOUR_ACCESS_TOKEN');
...
   const books = await client.books();
   const book = await client.book('book_id');
...
```

You can get your access token after login to api server. This is a [link](https://the-one-api.dev/login).

### Services

- Books
- Chapters
- Movies
- Quotes
- Characters

### Pagination, Sorting and Filtering

```bash
client.books({
    page: 1,
    limit: 10, 
    sort: { by: 'name', direction: 'asc' },
    filters: [
        client.filter('name')
            .matches('The Return Of The King')
    ]
});
```

## Available functions

- `books()`

- `book(book_id)`

- `bookChapters(book_id)`

- `movies()`

- `movie(movie_id)`

- `movieQuotes(movie_id)`

- `characters()`

- `character(character_id)`

- `characterQuotes(character_id)`

- `quotes()`

- `quote(quote_id)`

- `chapters()`

- `chapter(chapter_id)`

- `filter(field)`

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