Update code in endpoints/gospel.get.py

This commit is contained in:
Backend IM Bot 2025-03-25 05:41:03 +00:00
parent 608b658be6
commit ce3b9c4d3e

View File

@ -1,49 +1,28 @@
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"
}
]
gospel_entries = [] # In-memory storage
router = APIRouter()
@router.get("/gospel")
async def get_nathaniel_bassey_songs():
"""Get Nathaniel Bassey's most popular songs"""
async def get_gospel():
"""Demo gospel endpoint"""
return {
"message": "Retrieved Nathaniel Bassey songs successfully",
"artist": "Nathaniel Bassey",
"songs": songs,
"message": "Gospel entries retrieved",
"entries": [
{
"id": "g1",
"title": "Matthew",
"chapters": 28
},
{
"id": "g2",
"title": "Mark",
"chapters": 16
}
],
"features": {
"total_songs": len(songs),
"latest_year": 2020
"rate_limit": 100,
"expires_in": 3600
}
}