Update app.py
Browse files
app.py
CHANGED
@@ -234,7 +234,7 @@ class AlbumRequest(BaseModel):
|
|
234 |
|
235 |
|
236 |
# Fetch album data
|
237 |
-
@app.post("/
|
238 |
def fetch_album(request: AlbumRequest):
|
239 |
album_id = request.album_id
|
240 |
try:
|
@@ -266,7 +266,7 @@ class PlaylistRequest(BaseModel):
|
|
266 |
|
267 |
|
268 |
# Fetch playlist data
|
269 |
-
@app.post("/
|
270 |
def fetch_playlist(request: PlaylistRequest):
|
271 |
playlist_id = request.playlist_id
|
272 |
try:
|
@@ -294,7 +294,7 @@ def fetch_playlist(request: PlaylistRequest):
|
|
294 |
|
295 |
|
296 |
# Search tracks using Deezer API
|
297 |
-
@app.get("/
|
298 |
def search_tracks(query: str, limit: Optional[int] = 10):
|
299 |
try:
|
300 |
response = requests.get(f"{DEEZER_API_URL}/search", params={"q": query, "limit": limit})
|
|
|
234 |
|
235 |
|
236 |
# Fetch album data
|
237 |
+
@app.post("/z_album")
|
238 |
def fetch_album(request: AlbumRequest):
|
239 |
album_id = request.album_id
|
240 |
try:
|
|
|
266 |
|
267 |
|
268 |
# Fetch playlist data
|
269 |
+
@app.post("/z_playlist")
|
270 |
def fetch_playlist(request: PlaylistRequest):
|
271 |
playlist_id = request.playlist_id
|
272 |
try:
|
|
|
294 |
|
295 |
|
296 |
# Search tracks using Deezer API
|
297 |
+
@app.get("/z_search")
|
298 |
def search_tracks(query: str, limit: Optional[int] = 10):
|
299 |
try:
|
300 |
response = requests.get(f"{DEEZER_API_URL}/search", params={"q": query, "limit": limit})
|