@carloscarniato/lotr-sdk
v1.0.2
Published
A simple Javascript SDK for the [One API](https://the-one-api.dev/) Movie entity.
Downloads
1
Readme
A simple Javascript SDK for the One API Movie entity.
Installation
npm i @carloscarniato/lotr-sdk
Authentication
To use the LOTR SDK, you need to provide an apiKey
. This key is available for free on the One API website.
Usage
import LOTR from '@carloscarniato/lotr-sdk';
const sdk = new LOTR('<API_KEY>');
sdk.getMovies()
.then((movies) => {
// handle data
})
.catch((err) => {
// handle error
});
Methods
sdk.getMovies()
sdk.getMovieById()
sdk.getQuotesByMovieId()
Test
npm run test