1.0.1 • Published 1 year ago

finley-decker-sdk v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

The Lord of the Rings SDK

An SDK for The One API (only movies for now): https://the-one-api.dev/v2

Installation

npm i finley-decker-sdk

Authorization

To access the movie endpoints, you will need an API key.

Sign up using the following link to receive one: https://the-one-api.dev/sign-up

Quick Start

Shows all available methods:

const LordOfTheRingsSDK = require("finley-decker-sdk");

const apiKey = "<YOUR_API_KEY_HERE>";

const sdk = new LordOfTheRingsSDK(apiKey);
const movie = sdk.getMovieInstance();

movie.getMovies()
  .then((movies) => {
    console.log(movies);
  })
  .catch((error) => {
    console.error(error);
  });

const movieID = "5cd95395de30eff6ebccde5c";

movie.getMovieById(movieID)
  .then((movie) => {
    console.log(movie);
  })
  .catch((error) => {
    console.error(error);
  });

movie.getMovieQuotesById(movieID)
  .then((quotes) => {
    console.log(quotes);
  })
  .catch((error) => {
    console.error(error);
  });

Testing

  1. Clone repo
  2. Install dependencies
  3. Use the npm run test command in the terminal

Future Features

Implement the following classes:

  • Book
  • Character
  • Quote
  • Chapter
1.0.1

1 year ago

1.0.0

1 year ago