Documentation

Cinema Quotes API

Thank you for using this api.


  • 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:

  1. Open your terminal and navigate to the directory where you want to clone the repository.
  2. $ cd /path/to/your/directory
  3. Clone the repository using the git clone command.
  4. $ git clone https://github.com/shadowoff09/cinema-quotes.git 
  5. Navigate to the cloned repository directory.
  6. $ cd cinema-quotes
  7. Install the project dependencies using npm. This assumes that you have Node.js and npm installed on your system.
  8. $ npm install
  9. Start the server using the npm run dev command for development proposes.
  10. $ npm run dev
  11. Or start the server using the npm run start command for production proposes.
  12. $ npm run start
  13. 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.

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.shadowthings.xyz/api/quotes/strangerthings

To get a custom number of quotes (eg: 5 quotes):

https://cinema.shadowthings.xyz/api/quotes/strangerthings/5

Lucifer Endpoint

To use this endpoint you can use the following:

To get only one quote:

https://cinema.shadowthings.xyz/api/quotes/lucifer

To get a custom number of quotes (eg: 5 quotes):

https://cinema.shadowthings.xyz/api/quotes/lucifer/5

Better Call Saul Endpoint

To use this endpoint you can use the following:

To get only one quote:

https://cinema.shadowthings.xyz/api/quotes/bettercallsaul

To get a custom number of quotes (eg: 5 quotes):

https://cinema.shadowthings.xyz/api/quotes/bettercallsaul/5

Breaking Bad Endpoint

To use this endpoint you can use the following:

To get only one quote:

https://cinema.shadowthings.xyz/api/quotes/breakingbad

To get a custom number of quotes (eg: 5 quotes):

https://cinema.shadowthings.xyz/api/quotes/breakingbad/5

Death Note Endpoint

To use this endpoint you can use the following:

To get only one quote:

https://cinema.shadowthings.xyz/api/quotes/deathnote

To get a custom number of quotes (eg: 5 quotes):

https://cinema.shadowthings.xyz/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.shadowthings.xyz/api/quotes/thelastofus

To get a custom number of quotes (eg: 5 quotes):

https://cinema.shadowthings.xyz/api/quotes/thelastofus/5

One Piece Endpoint

To use this endpoint you can use the following:

To get only one quote:

https://cinema.shadowthings.xyz/api/quotes/onepiece

To get a custom number of quotes (eg: 5 quotes):

https://cinema.shadowthings.xyz/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.