Skip to content

LakhindarPal/my-fun-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FunAPI

FunAPI is a RESTful API built with FastAPI that provides random compliments, fortunes, fun facts, pizza ideas, life truths, and thoughts.

Features

  • Compliments: Brighten up your day with random compliments.
  • Fortunes: Ponder upon random fortunes for insight and inspiration.
  • Fun Facts: Discover random useless yet entertaining facts.
  • Pizza Ideas: Explore unique pizza combinations for your next culinary adventure.
  • Life Truths: Reflect on deep insights into life's mysteries and truths.
  • Thoughts: Receive random thoughts to inspire, entertain, or provoke contemplation.

Usage

Base URL

The base URL for accessing the API is: https://my-fun-api.onrender.com

Endpoints

Get Random Compliment

GET /compliment

Returns a random compliment.

Get Random Fortune

GET /fortune

Returns a random fortune.

Get Random Fun Fact

GET /funfact

Returns a random fun fact.

Get Random Pizza Idea

GET /pizzaidea

Returns a random pizza idea.

Get Random Life Truth

GET /lifetruth

Returns a random life truth.

Get Random Thought

GET /thought

Returns a random thought.

Example

To get a random compliment, you can send a GET request to:

https://my-fun-api.onrender.com/compliment

Example Response:

{
  "success": True,
  "data": {
    "compliment": "You have a great sense of humor!"
  }
}

Documentation

For detailed documentation, please visit FunAPI Documentation

Scalar Swagger UI Redoc

Installation

Deploy to Render

Locally

  1. Clone the repository:
git clone https://github.com/LakhindarPal/my-fun-api.git
  1. Install dependencies:
cd funapi
pip install -r requirements.txt
  1. Run the FastAPI server:
uvicorn main:app --reload

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.