Skip to content

A lightweight Flask-based REST API that returns quotes based on user-selected moods. Includes mood filtering, JSON-backed data storage, and public deployment on Render.

Notifications You must be signed in to change notification settings

Anjali-Mittal/quote_generator.api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ Quote Generator API

A lightweight Flask-based REST API that returns inspirational, emotional, and motivational quotes β€” with mood-based filtering. Built to demonstrate backend development fundamentals including API routing, JSON data handling, and cloud deployment via Render.


πŸš€ Features

  • 🎯 Get a random quote
  • 🎭 Filter quotes by mood using query parameters (/quote?mood=happy)
  • 🧠 Quotes stored in a structured quotes.json file (author, text, mood)
  • ☁️ πŸ”— Deployed on Render
  • πŸ”§ Easily extendable (add support for author filtering, mood listing, etc.)

πŸ“¦ Endpoints

Method Route Description
GET / Health check message
GET /quote Get a random quote
GET /quote?mood=mood Get a quote filtered by mood (e.g. sad)
GET /quotes Get all quotes
POST /add-quote Add a new quote via JSON (see format below)

πŸ§ͺ Example /add-quote Request

POST /add-quote
Content-Type: application/json

{
  "text": "The only limit to our realization of tomorrow is our doubts of today.",
  "author": "Franklin D. Roosevelt",
  "mood": "motivational"
}

About

A lightweight Flask-based REST API that returns quotes based on user-selected moods. Includes mood filtering, JSON-backed data storage, and public deployment on Render.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages