diff --git a/endpoints/liverpool.get.py b/endpoints/liverpool.get.py index e69de29..4f891a8 100644 --- a/endpoints/liverpool.get.py +++ b/endpoints/liverpool.get.py @@ -0,0 +1,46 @@ +from fastapi import APIRouter +import random + +musicians = [ + { + "name": "Sinach", + "hits": ["Way Maker", "I Know Who I Am", "Great Are You Lord"], + "years_active": "2002-present" + }, + { + "name": "Nathaniel Bassey", + "hits": ["Imela", "Onise Iyanu", "Olowogbogboro"], + "years_active": "2008-present" + }, + { + "name": "Mercy Chinwo", + "hits": ["Excess Love", "Chinedum", "Onyedikagi"], + "years_active": "2012-present" + }, + { + "name": "Frank Edwards", + "hits": ["Mma Mma", "You Too Dey Bless Me", "If God Be For Me"], + "years_active": "2008-present" + }, + { + "name": "Tim Godfrey", + "hits": ["Nara", "Agidigba", "Na You Be God"], + "years_active": "2006-present" + } +] + +router = APIRouter() + +@router.get("/liverpool") +async def get_random_musician(): + """Returns a random Nigerian gospel musician""" + musician = random.choice(musicians) + return { + "method": "GET", + "_verb": "get", + "musician": musician, + "features": { + "total_musicians": len(musicians), + "random_selection": True + } + } \ No newline at end of file