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

1.0.3 • Public • Published

Lord of the Rings SDK

This SDK provides a simple interface to access movie information from the Lord of the Rings API.

Installation

Install the package using npm:

npm install my-lotr-sdk

Usage

You can test these endpoints using a tool like Postman, curl, or another REST client.

  1. Run
npm start
  1. Open Postman. If you don't have Postman installed, you can download it from https://www.postman.com/downloads/.

  2. Create a new request in Postman by clicking the "+" button in the top left corner.

  3. For each endpoint, set the appropriate HTTP method, enter the URL, and click "Send" to make the request:

To get all movies:

Set the HTTP method to "GET". Enter the URL: http://localhost:3000/api/movies Click "Send". The response should contain a JSON array with all the movies.

To get a movie by id:

Set the HTTP method to "GET". Enter the URL: http://localhost:3000/api/movies/{id} (replace {id} with the desired movie id, e.g., 1, 2, or 3). Click "Send". The response should contain a JSON object with the movie details.

To verify a movie quote:

Set the HTTP method to "GET". Enter the URL: http://localhost:3000/api/movies/{id}/Quote (replace {id} with the desired movie id, e.g., 1, 2, or 3) and add a movie quote. Click "Send". The response should be contain a JSON object with the movie quote.

Test

Test the package using npm:

npm test

Readme

Keywords

none

Package Sidebar

Install

npm i my-lotr-sdk

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

23.7 kB

Total Files

10

Last publish

Collaborators

  • jflao