1.0.2 • Published 1 year ago
alexander_sequera-sdk v1.0.2
The Lord of the Rings API SDK for TypeScript
Introduction
This library is built with TypeScript. This SDK provides a convenient way to access movie endpoints using The One API.
Access Token
Before using this SDK, you'll need to get an access token from Sign Up
npm i alexander_sequera-sdk
Client
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");
Examples
Once you have your client set up you can access the movies
endpoints.
Listing movies
const movies = client.movieService.getList();
movies.then(movies => {
console.log(movies)
})
Getting a movie
const movie = client.movieService.getById("5cd95395de30eff6ebccde5c")
movie.then(movie => {
console.log(movie)
})
Getting a movie quotes
const quotes = client.movieService.getQuoteById("5cd95395de30eff6ebccde5c")
quotes.then(quote => {
console.log(quote)
})