# @allroundexperts/tlor-sdk

> SDK that communicates with the OneAPI to get the movies related to the Lord of the rings.

Latest version **1.0.0** (published 2023-04-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install @allroundexperts/tlor-sdk
pnpm add @allroundexperts/tlor-sdk
yarn add @allroundexperts/tlor-sdk
bun add @allroundexperts/tlor-sdk
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-04-16 |
| First published | 2023-04-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 17.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sibtain Ali |
| Maintainers | allroundexperts |
| Keywords | The lord of the rings, TLOR, SDK, OneAPI |

## Links

- npm: https://www.npmjs.com/package/@allroundexperts/tlor-sdk
- npm.io page: https://npm.io/package/@allroundexperts/tlor-sdk

## Dependencies (3)

- [tsyringe](https://npm.io/package/tsyringe.md) ^4.7.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13

## Recent versions

- 1.0.0 (latest) — 2023-04-16

## README

# Installation

```bash
npm install @allroundexperts/tlor-sdk
```

# API
This SDK uses the API documented [here](https://the-one-api.dev/documentation)

# Usage

```js
import TLOR from '@allroundexperts/tlor-sdk';

const tlor = new TLOR('your-api-key');

const movie = await tlor.movie.getOne();
```

## Resources

### Movie

**Get All Movies**
```js
await sdk.movie.getAll();
```

**Get One Movie**
```js
await sdk.movie.getOne(id);
```

### Pagination

```js
sdk.movie.getAll({
    limit: 20, 
    offset: 10,
    page: 1,
});
```

### Sorting

```js
sdk.movie.getAll({
    sortBy: 'name',
    sortDirection: 'ASC',
});
```

### Filter

Filter tokens available:
```js
EQUAL
NOT_EQUAL
INCLUDE
NOT_INCLUDE
EXISTS
NOT_EXISTS
LIKE
GREATER_THAN
LESS_THAN
GREATER_THAN_EQUAL_TO
LESS_THAN_EQUAL_TO
```

```js
import {FilterToken} from "resource/IResosurce";
sdk.movie.getAll({
    filter: {[
        {key: 'name', op: FilterToken.EQUAL, value: 'Test'},
        {key: 'academyAwardWins', op: FilterToken.GREATER_THAN, value: 10}
    ]}
});
```

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