Update code in endpoints/gospel.get.py
This commit is contained in:
parent
88f554823d
commit
608b658be6
@ -0,0 +1,49 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user