49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
from fastapi import APIRouter, HTTPException
|
|
|
|
songs = [
|
|
{
|
|
"title": "Imela",
|
|
"year": 2012,
|
|
"album": "Supernatural",
|
|
"duration": "5:23"
|
|
},
|
|
{
|
|
"title": "Oluwatogbemiga",
|
|
"year": 2015,
|
|
"album": "No Other Name",
|
|
"duration": "6:12"
|
|
},
|
|
{
|
|
"title": "Onise Iyanu",
|
|
"year": 2016,
|
|
"album": "This God is Too Good",
|
|
"duration": "4:56"
|
|
},
|
|
{
|
|
"title": "Hallelujah Eh",
|
|
"year": 2018,
|
|
"album": "The Son of God",
|
|
"duration": "5:34"
|
|
},
|
|
{
|
|
"title": "Someone's at the Door",
|
|
"year": 2020,
|
|
"album": "Revival",
|
|
"duration": "6:45"
|
|
}
|
|
]
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/gospel")
|
|
async def get_nathaniel_bassey_songs():
|
|
"""Get Nathaniel Bassey's most popular songs"""
|
|
return {
|
|
"message": "Retrieved Nathaniel Bassey songs successfully",
|
|
"artist": "Nathaniel Bassey",
|
|
"songs": songs,
|
|
"features": {
|
|
"total_songs": len(songs),
|
|
"latest_year": 2020
|
|
}
|
|
} |