This library is built with TypeScript. This SDK provides a convenient way to access movie endpoints using The One API.
Before using this SDK, you'll need to get an access token from Sign Up
npm i alexander_sequera-sdk
First you would need to have the Access token
to be able to authenticate in The One API.
Then you can set up the LotrApiClient
import { LotrApiClient } from "alexander_sequera-sdk";
const client = new LotrApiClient("YOUR_ACCESS_TOKEN");
Once you have your client set up you can access the movies
endpoints.
const movies = client.movieService.getList();
movies.then(movies => {
console.log(movies)
})
const movie = client.movieService.getById("5cd95395de30eff6ebccde5c")
movie.then(movie => {
console.log(movie)
})
const quotes = client.movieService.getQuoteById("5cd95395de30eff6ebccde5c")
quotes.then(quote => {
console.log(quote)
})