alexander_sequera-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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)
})

Package Sidebar

Install

npm i alexander_sequera-sdk

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

11.6 kB

Total Files

24

Last publish

Collaborators

  • asequera3