Skip to content

Commit

Permalink
🎶 /lyrics Endpoint Added
Browse files Browse the repository at this point in the history
  • Loading branch information
0x64 committed Apr 11, 2024
1 parent 0500dac commit 1ca577d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ async def doc():
<!doctype html>
<html>
<head>
<title>API Reference</title>
<title>HiFi API Reference</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
<!-- Add your own OpenAPI/Swagger spec file URL here: -->
<!-- Note: this includes our proxy, you can remove the following line if you do not need it -->
<!-- data-proxy-url="https://api.scalar.com/request-proxy" -->
Expand Down Expand Up @@ -203,7 +205,6 @@ async def doc():
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
</body>
</html>
Expand Down Expand Up @@ -398,7 +399,7 @@ async def get_song(q: str, quality: str):


@app.api_route("/search/", methods=["GET"])
async def search_track(
async def search(
s: Union[str, None] = Query(default=None),
a: Union[str, None] = Query(default=None),
al: Union[str, None] = Query(default=None),
Expand Down Expand Up @@ -503,7 +504,7 @@ async def search_track(


@app.api_route("/album/", methods=["GET"])
async def search_album(id: int):
async def get_album(id: int):
try:
tokz = await refresh()
tidal_token = tokz
Expand Down Expand Up @@ -552,7 +553,7 @@ async def search_album(id: int):


@app.api_route("/playlist/", methods=["GET"])
async def search_playlist(id: str):
async def get_playlist(id: str):
try:
tokz = await refresh()
tidal_token = tokz
Expand Down Expand Up @@ -601,7 +602,7 @@ async def search_playlist(id: str):


@app.api_route("/artist/", methods=["GET"])
async def search_artist(id: int):
async def get_artist(id: int):
try:
tokz = await refresh()
tidal_token = tokz
Expand Down Expand Up @@ -666,7 +667,7 @@ async def search_artist(id: int):


@app.api_route("/cover/", methods=["GET"])
async def search_cover(id: Union[int, None] = None, q: Union[str, None] = None):
async def get_cover(id: Union[int, None] = None, q: Union[str, None] = None):
try:
tokz = await refresh()
tidal_token = tokz
Expand Down

1 comment on commit 1ca577d

@vercel
Copy link

@vercel vercel bot commented on 1ca577d Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.