jams
backend.api.jams
Section titled “backend.api.jams”jam api endpoints for shared listening rooms.
Functions
Section titled “Functions”create_jam source
Section titled “create_jam source”create_jam(body: CreateJamRequest, session: Session = Depends(require_auth)) -> JamResponsecreate a new jam.
get_active_jam source
Section titled “get_active_jam source”get_active_jam(session: Session = Depends(require_auth)) -> JamResponse | Noneget the user’s current active jam.
get_jam_preview source
Section titled “get_jam_preview source”get_jam_preview(code: str) -> JamPreviewResponsepublic preview info for a jam (no auth required).
get_jam(code: str, session: Session = Depends(require_auth)) -> JamResponseget jam details by code.
join_jam(code: str, session: Session = Depends(require_auth)) -> JamResponsejoin a jam.
leave_jam source
Section titled “leave_jam source”leave_jam(code: str, session: Session = Depends(require_auth)) -> dict[str, bool]leave a jam.
end_jam(code: str, session: Session = Depends(require_auth)) -> dict[str, bool]end a jam (host only).
jam_command source
Section titled “jam_command source”jam_command(code: str, body: CommandRequest, session: Session = Depends(require_auth)) -> dict[str, Any]send a playback command to the jam.
jam_websocket source
Section titled “jam_websocket source”jam_websocket(ws: WebSocket, code: str, session_id: Annotated[str | None, Cookie()] = None) -> NoneWebSocket endpoint for real-time jam sync.