diff --git a/endpoints/wahtsup.get.py b/endpoints/wahtsup.get.py index e69de29..445e930 100644 --- a/endpoints/wahtsup.get.py +++ b/endpoints/wahtsup.get.py @@ -0,0 +1,24 @@ +from fastapi import APIRouter +import random + +african_countries = [ + "Nigeria", "Egypt", "South Africa", "Kenya", "Ethiopia", + "Ghana", "Morocco", "Tanzania", "Uganda", "Algeria", + "Sudan", "Angola", "Mali", "Senegal", "Rwanda" +] + +router = APIRouter() + +@router.get("/wahtsup") +async def get_random_countries(): + """Return random African countries""" + selected = random.sample(african_countries, k=3) + + return { + "message": "Random African countries retrieved", + "countries": selected, + "features": { + "total_available": len(african_countries), + "sample_size": 3 + } + } \ No newline at end of file