docstrings / formatting
This commit is contained in:
@@ -12,6 +12,7 @@ class YT(FastAPI):
|
||||
"""
|
||||
|
||||
def __init__(self, app: FastAPI, util, constants) -> None:
|
||||
"""Initialize YT endpoints."""
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
@@ -31,7 +32,15 @@ class YT(FastAPI):
|
||||
)
|
||||
|
||||
async def yt_video_search_handler(self, data: ValidYTSearchRequest) -> JSONResponse:
|
||||
"""Search for YT Video by Title (closest match returned)"""
|
||||
"""
|
||||
Search for YouTube video by title.
|
||||
|
||||
Parameters:
|
||||
- **data** (ValidYTSearchRequest): Request containing title.
|
||||
|
||||
Returns:
|
||||
- **JSONResponse**: Contains video ID or an error message.
|
||||
"""
|
||||
|
||||
title: str = data.t
|
||||
yts_res: Optional[list[dict]] = await self.ytsearch.search(title)
|
||||
|
Reference in New Issue
Block a user