ehsan-lord-of-the-ring
v1.0.0
Published
Gives user methods to access movies and quotes of those movies in The Lord of the Rings franchise
Downloads
2
Readme
The Lord of the Rings SDK
This SDK is a thin wrapper around the Lord of the Rings API, making it easier for other developers to access the movie data from the API.
Installation
You can install this SDK using npm:
cd my-project
npm install ehsan-lord-of-the-ring
Usage
You can use this SDK in your JavaScript application by importing it and creating an instance: javascript
const LordOfTheRingsAPI = require("ehsan-lord-of-the-ring");
const api = new LordOfTheRingsAPI();
API
The SDK provides the following methods:
getMovies()
: Returns a list of all Lord of the Rings movies.
getMovieById(id)
: Returns a Lord of the Rings movie by its ID.
getQuotesForMovie(id)
: Returns a list of quotes for a Lord of the Rings movie by its ID.
Each method returns a Promise that resolves with the data from the API. If an error occurs, the Promise will be rejected with an error.
Testing
You can run the test suite for this SDK by executing the following command in your terminal: bash
npm test