my-lotr-sdk
v1.0.3
Published
my lotr sdk
Downloads
2
Readme
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.
- Run
npm start
Open Postman. If you don't have Postman installed, you can download it from https://www.postman.com/downloads/.
Create a new request in Postman by clicking the "+" button in the top left corner.
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