Skip to content

Atnaize/cyclimse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cyclimse API

This project is a simple Node.js API that provides random quotes and quotes by character. It is built with TypeScript.

Table of Contents

Installation

Make sure you have Node.js and npm installed on your machine.

  1. Clone the repository:
git clone https://github.com/Atnaize/cyclimse.git
cd cyclimse
  1. Install dependencies:
npm install
  1. Build the TypeScript code:
npm run build
  1. Start the server:
npm start

The server will be running at http://localhost:3000.

Usage

You can now make requests to the API using tools like curl, Postman, or any HTTP client.

Endpoints

  • GET /v1/random: Get a random quote.
  • GET /v1/random/{number}: Get a specific number of random quotes.
  • GET /v1/character/{character}/{number?}: Get a specific number of quotes by a particular character. If the number parameter is not provided, it defaults to 1.

Data

Quotes

The project includes a quotes.json file that stores information about quotes from different characters. The structure of each entry in the JSON array is as follows:

[
    {
        "timestamp": "0:00:03",
        "character": "Première voix off",
        "quote": "Attention, ce flim n'est pas un flim sur le cyclimse. Merci de votre compréhension."
    },
    {
        "timestamp": "0:00:13",
        "character": "Deuxième voix off",
        "quote": "Entre l'Australia et la South América, dans l'océan South Pacific : l'atoll de Pom Pom Galli."
    },
    // ...
]

Available Characters

The characters.json file follows a simple JSON array format with character names:

[
    "Bob",
    "Callaghan",
    // ...
]

Contributing

Feel free to contribute to this project by opening issues or submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.