# askfrodo

> Please modify this readme file to specify how to install, use and test the SDK.

Latest version **1.0.6** (published 2023-06-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install askfrodo
pnpm add askfrodo
yarn add askfrodo
bun add askfrodo
```

## 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.6 |
| Published | 2023-06-15 |
| First published | 2023-06-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | 2nji |

## Links

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

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.1.4

## Recent versions

- 1.0.6 (latest) — 2023-06-15
- 1.0.5 — 2023-06-15
- 1.0.4 — 2023-06-15
- 1.0.3 — 2023-06-15
- 1.0.2 — 2023-06-15
- 1.0.1 — 2023-06-15
- 1.0.0 — 2023-06-15

## README

# Lord of the Rings SDK

## Description

This is an SDK for [The One API to rule them all](https://the-one-api.dev/) it has been built to the specification in the documentation [here](https://the-one-api.dev/documentation)

### Usage

To install

```sh

  npm install askfrodo

  yarn add askfrodo
```

You will need to sign up and get an Access Token [here](https://the-one-api.dev/sign-up). Then initialize the library

```sh

  import { AskFrodo } from 'askfrodo'

  const askFrodo = new AskFrodo({
    accessToken: "ACCESS_TOKEN"
  });

```

Listed are the features of the SDK

1. Get All Movies

```javascript
  askFrodo.functions.getMovie({
    pagination?: {
      page?: number;
      limit?: number;
      offset?: number;
    };
    filtering?: {
      budgetInMillions? : {
        sign: "gt" | "lt" | "gte" | "lte" | "eq";
        value: number;
      };
      runtimeInMinutes? : {
        sign: "gt" | "lt" | "gte" | "lte" | "eq";
        value: number;
      };
      academyAwardWins? : {
        sign: "gt" | "lt" | "gte" | "lte" | "eq";
        value: number;
      };
    }
  }).then((movie) => {
    console.log(movie.data.docs);
  })
```

2. Get Single Movie by Id

```javascript
  askFrodo.functions.getMovieById({ id: string }).then((movie) => {
    console.log(movie.data.docs);
  })
```

3. Get All Quote in a Single Movie

```javascript
  askFrodo.functions.getMovieQuote({
    id: string;
    pagination?: {
      page?: number;
      limit?: number;
      offset?: number;
    }
  }).then((movie) => {
    console.log(movie.data.docs);
  })
```

4. Get All Quotes

```javascript
  askFrodo.functions.getQuote({
    sorting?: {
      value?: string;
      order?: "asc" | "desc";
    };
    pagination?: {
      page?: number;
      limit?: number;
      offset?: number;
    }
  }).then((movie) => {
    console.log(movie.data.docs);
  })
```

5. Get Single Quote by Id

```javascript
  askFrodo.functions.getQuoteById({
    id: string;
  }).then((movie) => {
    console.log(movie.data.docs);
  })
```

### Testing

```sh
npm test

yarn test
```

### Build

```sh
npm run build

yarn build
```

### Publish

```sh
npm publish

yarn publish
```

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