1.1.2 • Published 1 year ago

liblab-js-sdk v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Lord of the Rings Project

This is a Lord of the Ring Project.

The focus is to build an SDk that consumes an API, making it easy for developers to use API just by download SDK and the API's covered are:

/movie
/movie/{id}
/movie/{id}/quote

Install

npm i liblab-js-sdk

Usage

const {MoviesSDK} = require('liblab-js-sdk');


const baseUrl ='YOUR_BASE_URL'

const apiKey = "YOUR_API_KEY";

const movieSDK = new MoviesSDK(baseUrl, apiKey);


movieSDK.getMovies().then((movies) => {
        console.log(movies);
        // Perform whatever operation with the data

      })
      .catch((error) => {
        console.error(error);
        // send error response to user
      });


const id ="MOVIE_ID"; 

movieSDK.getMovieById(id).then((movies) => {
        console.log(movies);
        // Perform whatever operation with the data
      })
      .catch((error) => {
        console.error(error);
        // send error response to user
      });
    
movieSDK.getAMovieQuote(id).then((movies) => {
        console.log(movies);
         // Perform whatever operation with the data
      })
      .catch((error) => {
        console.error(error);
        // send error response to user
      });

Test

npm run test

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago