1.0.1 • Published 1 year ago
finley-decker-sdk v1.0.1
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
- Clone repo
- Install dependencies
- Use the
npm run test
command in the terminal
Future Features
Implement the following classes:
- Book
- Character
- Quote
- Chapter