Documentation
GET
/api/quotes
Parameters
None
Sample Query
/api/quotes
Sample Response
[
{
"id": "1",
"quote": "Happiness depends upon ourselves.",
"author": "Aristotle",
"category": "positivity",
"language": "english",
"date_added": "2023-11-20",
"popularity": 9.2
},
{
"id": "2",
"quote": "Act as if what you do makes a difference. It does.",
"author": "William James",
"category": "motivation",
"language": "english",
"date_added": "2024-02-01",
"popularity": 8.7
},
{
"id": "3",
"quote": "The only way to do great work is to love what you do.",
"author": "Steve Jobs",
"category": "motivation",
"language": "english",
"date_added": "2023-10-05",
"popularity": 9.5
}
]
GET
/api/random
Parameters
None
Sample Query
/api/random
Sample Response
{
"id": "1",
"quote": "Happiness depends upon ourselves.",
"author": "Aristotle",
"category": "positivity",
"language": "english",
"date_added": "2023-11-20",
"popularity": 9.2
}
GET
/api/{id}
Parameters
TYPE: Integer
Sample Query
/api/2
Sample Response
{
"id": "2",
"quote": "Act as if what you do makes a difference. It does.",
"author": "William James",
"category": "motivation",
"language": "english",
"date_added": "2024-02-01",
"popularity": 8.7
}
GET
/api/category/{category}
Parameters
TYPE: String
enum: ['motivation', 'affirmation', 'fitness', 'relationship', 'positivity']
Sample Query
/api/category/motivation
Sample Response
[
{
"id": "3",
"quote": "The only way to do great work is to love what you do.",
"author": "Steve Jobs",
"category": "motivation",
"language": "english",
"date_added": "2023-10-05",
"popularity": 9.5
},
{
"id": "4",
"quote": "Believe you can and you're halfway there.",
"author": "Theodore Roosevelt",
"category": "motivation",
"language": "english",
"date_added": "2022-09-18",
"popularity": 9.0
}
]
GET
/api/author/{author}
Parameters
TYPE: String
Sample Query
/api/author/Winston%20Churchill
Sample Response
[
{
"id": "5",
"quote": "Success is not final, failure is not fatal: it is the courage to continue that counts.",
"author": "Winston Churchill",
"category": "affirmation",
"language": "english",
"date_added": "2023-06-21",
"popularity": 8.8
},
{
"id": "6",
"quote": "Do what you can, with what you have, where you are.",
"author": "Winston Churchill",
"category": "positivity",
"language": "english",
"date_added": "2021-12-30",
"popularity": 9.3
}
]
GET
/api/popularity-range?minPopularity={minPopularity}&maxPopularity={maxPopularity}
Parameters
TYPE: Float (0.0 - 10.0)
Sample Query
/api/popularity-range?minPopularity=9.0&maxPopularity=9.6
Sample Response
[
{
"id": "7",
"quote": "Quality is not an act, it is a habit.",
"author": "Aristotle",
"category": "fitness",
"language": "english",
"date_added": "2023-04-12",
"popularity": 9.6
},
{
"id": "8",
"quote": "With the new day comes new strength and new thoughts.",
"author": "Eleanor Roosevelt",
"category": "affirmation",
"language": "english",
"date_added": "2022-07-15",
"popularity": 9.1
}
]
GET
/api/language/{language}
Parameters
TYPE: String
enum: ['english', 'sanskrit']
Sample Query
/api/language/sanskrit
Sample Response
[
{
"id": "9",
"quote": "स्वयमेव मृगेंद्रता।",
"author": "Chanakya",
"category": "motivation",
"language": "sanskrit",
"date_added": "2022-03-27",
"popularity": 8.9
},
{
"id": "10",
"quote": "धर्मो रक्षति रक्षितः।",
"author": "Manusmriti",
"category": "affirmation",
"language": "sanskrit",
"date_added": "2021-11-03",
"popularity": 8.7
}
]
GET
/api/date-range?startDate={startDate}&endDate={endDate}
Parameters
TYPE: Date (YYYY-MM-DD)
Sample Query
/api/date-range?startDate=2022-05-14&endDate=2023-08-09
Sample Response
[
{
"id": "11",
"quote": "A journey of a thousand miles begins with a single step.",
"author": "Lao Tzu",
"category": "motivation",
"language": "english",
"date_added": "2022-05-14",
"popularity": 9.0
},
{
"id": "12",
"quote": "The best way to predict the future is to create it.",
"author": "Peter Drucker",
"category": "inspiration",
"language": "english",
"date_added": "2023-08-09",
"popularity": 9.4
}
]