API-choufli-7all is an open-source REST API, built 100% in PHP using the Mabs micro framework. It serves random quotes from the famous Tunisian TV series "شوفلي حل". Currently, the API offers a single endpoint, with plans to expand it by adding more quotes from various characters.
- /random: Returns a random quote from the collection of "شوفلي حل" quotes.
-
Clone the repository:
git clone https://github.com/mabslabs/api-choufli-7all.git cd api-choufli-7all
-
Install dependencies :
composer install
-
Import quotes
php quotes/importQuotes.php
- Make sure you have created and correctly configured your database before importing quotes.
-
Run the API in dev environment:
php -S localhost:8000
To fetch a random quote, simply call the /random
endpoint:
curl http://localhost:8000/random
You will receive a random quote in JSON format:
{
"quote": "الدنيا هانية، يا سبوعي، الدنيا لعب وفلوس",
"actor":"فوشيكا"
}
We welcome contributions to enrich the database of quotes. The quotes are stored as plain text files in the quotes/raw/
directory, with each file representing a character from the show. If you know quotes from "شوفلي حلّ", you can add them to the appropriate text file.
- Fork the repository.
- Add quotes to the text files located in
quotes/raw/
. Each file corresponds to a character's name (e.g.,quotes/raw/sboui.txt
). Ensure you add one quote per line. - Submit a Merge Request (MR) with your contributions.
To add quotes for the character "Sboui", edit the file quotes/raw/sboui.txt
and add quotes like this:
First quote
Second quote
Third quote
Once done, submit a Merge Request, and your contribution will be reviewed.
This project is licensed under the AGPL-3.0-or-later license. This means that anyone who uses or modifies the code, even as part of a web service, must make their source code available under the same license.
For more details, refer to the LICENSE file or visit the GNU AGPL website.