Documentation
Cinema Quotes API
Thank you for using this api.
- Version: 1.0.0
- Author: shadowoff09
- Created: 2 February, 2023
If you have any questions that are beyond the scope of this help file, Please feel free to create an topic via Github Discussions.
Installation from Source 🔨
Follow the steps below to setup your api:
- Open your terminal and navigate to the directory where you want to clone the repository.
- Clone the repository using the git clone command.
- Navigate to the cloned repository directory.
- Install the project dependencies using npm. This assumes that you have Node.js and npm installed on your system.
- Start the server using the npm run dev command for development proposes.
- Or start the server using the npm run start command for production proposes.
- The server should now be running and listening for requests on port 3000. To access the API, open your web browser and go to http://localhost:3001.
$ cd /path/to/your/directory
$ git clone https://github.com/shadowoff09/cinema-quotes.git
$ cd cinema-quotes
$ npm install
$ npm run dev
$ npm run start
Installation using Docker
Follow the steps below to setup your api:
Using Docker Hub 🐳
You will need Docker installed on your machine.
After Docker is installed you should run this command
$ docker run -d -p 3001:3001 shadowoff09/cinema-quotes:latest
Or
$ docker run -d \
-p 3001:3001 \
--name cinema-quotes \
--restart=always \
shadowoff09/cinema-quotes:latest
The server should now be running and listening for requests on port 3001. To access the API, open your web browser and go to http://localhost:3001.
Deploying using GitHub (GHCR) 🐙
You will need Docker installed on your machine.
After Docker is installed you should run this command
$ docker run -p 3001:3001 ghcr.io/shadowoff09/cinema-quotes:latest
Or
$ docker run -d \
-p 3001:3001 \
--name cinema-quotes \
--restart=always \
ghcr.io/shadowoff09/cinema-quotes:latest
The server should now be running and listening for requests on port 3001. To access the API, open your web browser and go to http://localhost:3001.
Usage
To use this api you have at the moment 7 endpoints for this list of movies/series:
- Stranger Things
- Lucifer
- Better Call Saul
- Breaking Bad
- Death Note
- The Last of Us
- One Piece
Endpoints
Here you can find all the endpoints for this api.
If the endpoints dont respond, you should try to remove the https://
Stranger Things Endpoint
To use this endpoint you can use the following:
To get only one quote:
https://cinema-quotes.vercel.app/api/quotes/strangerthings
To get a custom number of quotes (eg: 5 quotes):
https://cinema-quotes.vercel.app/api/quotes/strangerthings/5
Lucifer Endpoint
To use this endpoint you can use the following:
To get only one quote:
https://cinema-quotes.vercel.app/api/quotes/lucifer
To get a custom number of quotes (eg: 5 quotes):
https://cinema-quotes.vercel.app/api/quotes/lucifer/5
Better Call Saul Endpoint
To use this endpoint you can use the following:
To get only one quote:
https://cinema-quotes.vercel.app/api/quotes/bettercallsaul
To get a custom number of quotes (eg: 5 quotes):
https://cinema-quotes.vercel.app/api/quotes/bettercallsaul/5
Breaking Bad Endpoint
To use this endpoint you can use the following:
To get only one quote:
https://cinema-quotes.vercel.app/api/quotes/breakingbad
To get a custom number of quotes (eg: 5 quotes):
https://cinema-quotes.vercel.app/api/quotes/breakingbad/5
Death Note Endpoint
To use this endpoint you can use the following:
To get only one quote:
https://cinema-quotes.vercel.app/api/quotes/deathnote
To get a custom number of quotes (eg: 5 quotes):
https://cinema-quotes.vercel.app/api/quotes/deathnote/5
The Last of Us Endpoint
To use this endpoint you can use the following:
To get only one quote:
https://cinema-quotes.vercel.app/api/quotes/thelastofus
To get a custom number of quotes (eg: 5 quotes):
https://cinema-quotes.vercel.app/api/quotes/thelastofus/5
One Piece Endpoint
To use this endpoint you can use the following:
To get only one quote:
https://cinema-quotes.vercel.app/api/quotes/onepiece
To get a custom number of quotes (eg: 5 quotes):
https://cinema-quotes.vercel.app/api/quotes/onepiece/5
Contribuiting
If you want to contribute to this project you can do it by forking the project and making a pull request.