1.0.0 • Published 11 months ago

llotr-sdk v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Lord of the Rings SDK

codecov ci cd

Getting Started

This repo contains a simple sdk for the Lord Of The Rings Api.

It is integrated with Github Actions.

Required Technologies

This application makes use of the following technologies:

Installation

1. Installation Steps

These instructions assumes that you have a working installation of git and nodejs. See the instructions for installation:

Provision the necessary services needed for running the sdk locally:

  1. Run npm install llotr-sdk
  2. Setup your environment variables for ACCESS_TOKEN & API_URL in a .env file at the root of your project.
  3. The sdk can be used in the following format:

    const { 
         getMovies, 
         getMovie, 
         getMovieQuotes,
         getQuote,
         getQuotes 
     } = require('llotr-sdk');
    
    // Fetch a movie item given an id
    const movie = getMovie(id);
    
    // Fetch movie items
    const movies = getMovies();
    
    // Fetch movie quote items given an id
    const movieQuotes = getMovieQuotes(id);
    
    // Fetch a quote item given an id
    const quote = getQuote(id);
    
    // Fetch a quotes
    const quotes = getQuotes();
1.0.0

11 months ago