A simple, serverless API that serves mood categorized quotes. The quotes are available in JSON format and are stored in a .json
file. This API is deployed on Vercel and can be accessed from the endpoint below.
- Anger
- Courage
- Failure
- Health
- Jealousy
- Love
- Patience
- Relationship
- Respect
- Sad
- Smile
- Strength
- Success
- Faith
- Inspirational
- Thankful
- Truth
- Wisdom
- Motivational
- Life
- Morning
- Uplifting
- Stressed
- Anxious
- Calm
- gratitude
You can access the quotes by making a GET
request to:
https://quote-api-ashen.vercel.app/api/quotes
-
GET Request:
Call the API with a standard GET request to fetch the list of quotes.Example:
curl https://quote-api-ashen.vercel.app/api/quotes
The response will be a JSON of object of arrays of quotes.
-
Response Format: The API will return a JSON response containing objects of arrays of quotes.
Example response:
{ "moods": { "anger": [ "Anger is one letter short of danger.", "The best way to deal with anger is to not let it control you.", "Anger is a wind which blows out the lamp of the mind.", "He who angers you conquers you.", "Don’t let anger consume you.", "Anger is a temporary madness.", ], "courage": [ "Courage is not the absence of fear, but the triumph over it.", "Fear is a reaction. Courage is a decision.", "Courage is grace under pressure.", "The only courage that matters is the kind that gets you from one moment to the next.", "Courage is not the absence of fear, but the willingness to face it.", "It takes courage to grow up and become who you really are.", "Courage is being scared to death, but saddling up anyway.", ] } }
- Fork this repository.
- Add or edit quotes in the
quotes.json
file. - Create a pull request.
To run the API locally:
-
Clone the repo:
git clone https://github.com/Charmingdc/QuoteApi.git cd QuoteApi
-
Install dependencies:
npm install
-
Run the local server:
npm run dev
-
Access the API at:
http://localhost:3000/api/quotes
This project is open source and available under the MIT License.
- Facebook: Charmingdc
- X: Charmingdc 🎯
- TikTok: Charmingdc