feat: routes
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Subsonic-compatible API layer mounted at /rest."""
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.api.rest.annotation import router as annotation_router
|
||||
from app.api.rest.browsing import router as browsing_router
|
||||
from app.api.rest.media import router as media_router
|
||||
from app.api.rest.playlists import router as playlists_router
|
||||
from app.api.rest.search import router as search_router
|
||||
from app.api.rest.system import router as system_router
|
||||
|
||||
subsonic_router = APIRouter(tags=["subsonic"])
|
||||
subsonic_router.include_router(system_router)
|
||||
subsonic_router.include_router(browsing_router)
|
||||
subsonic_router.include_router(search_router)
|
||||
subsonic_router.include_router(playlists_router)
|
||||
subsonic_router.include_router(media_router)
|
||||
subsonic_router.include_router(annotation_router)
|
||||
|
||||
__all__ = ["subsonic_router"]
|
||||
@@ -0,0 +1,23 @@
|
||||
"""Subsonic annotation endpoints: star, rating, scrobble."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/star")
|
||||
async def star() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/unstar")
|
||||
async def unstar() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/setRating")
|
||||
async def set_rating() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/scrobble")
|
||||
async def scrobble() -> Any: ...
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Subsonic browsing endpoints."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/getMusicFolders")
|
||||
async def get_music_folders() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getIndexes")
|
||||
async def get_indexes() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getMusicDirectory")
|
||||
async def get_music_directory() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getArtists")
|
||||
async def get_artists() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getArtist")
|
||||
async def get_artist() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getAlbum")
|
||||
async def get_album() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getAlbumList")
|
||||
async def get_album_list() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getAlbumList2")
|
||||
async def get_album_list2() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getSong")
|
||||
async def get_song() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getGenres")
|
||||
async def get_genres() -> Any: ...
|
||||
@@ -0,0 +1,19 @@
|
||||
"""Subsonic media endpoints: stream, download, cover art."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/stream")
|
||||
async def stream() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/download")
|
||||
async def download() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getCoverArt")
|
||||
async def get_cover_art() -> Any: ...
|
||||
@@ -0,0 +1,27 @@
|
||||
"""Subsonic playlist endpoints."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/getPlaylists")
|
||||
async def get_playlists() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getPlaylist")
|
||||
async def get_playlist() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/createPlaylist")
|
||||
async def create_playlist() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/updatePlaylist")
|
||||
async def update_playlist() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/deletePlaylist")
|
||||
async def delete_playlist() -> Any: ...
|
||||
@@ -0,0 +1,11 @@
|
||||
"""Subsonic search endpoints."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/search3")
|
||||
async def search3() -> Any: ...
|
||||
@@ -0,0 +1,15 @@
|
||||
"""Subsonic system endpoints: ping and license."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/ping")
|
||||
async def ping() -> Any: ...
|
||||
|
||||
|
||||
@router.get("/getLicense")
|
||||
async def get_license() -> Any: ...
|
||||
Reference in New Issue
Block a user