likes
backend.api.tracks.likes
Section titled “backend.api.tracks.likes”Track like/unlike endpoints.
Functions
Section titled “Functions”list_liked_tracks source
Section titled “list_liked_tracks source”list_liked_tracks(db: Annotated[AsyncSession, Depends(get_db)], auth_session: AuthSession = Depends(require_auth)) -> LikedTracksResponseList tracks liked by authenticated user (queried from local index).
like_track source
Section titled “like_track source”like_track(track_id: int, db: Annotated[AsyncSession, Depends(get_db)], auth_session: AuthSession = Depends(require_auth)) -> LikedResponseLike a track - stores in database immediately, creates ATProto record in background.
The like is visible immediately in the UI. The ATProto record is created asynchronously via a background task, keeping the API response fast.
unlike_track source
Section titled “unlike_track source”unlike_track(track_id: int, db: Annotated[AsyncSession, Depends(get_db)], auth_session: AuthSession = Depends(require_auth)) -> LikedResponseUnlike a track - removes from database immediately, deletes ATProto record in background.
The unlike is reflected immediately in the UI. The ATProto record deletion happens asynchronously via a background task.
get_track_likes source
Section titled “get_track_likes source”get_track_likes(track_id: int, db: Annotated[AsyncSession, Depends(get_db)]) -> TrackLikersResponsePublic endpoint returning users who liked a track.
Returns a list of user display info (handle, display name, avatar, liked_at timestamp). This endpoint is public—no authentication required to see who liked a track.
Classes
Section titled “Classes”LikedTracksResponse source
Section titled “LikedTracksResponse source”response for listing liked tracks.
LikerInfo source
Section titled “LikerInfo source”user who liked a track.
TrackLikersResponse source
Section titled “TrackLikersResponse source”response for getting users who liked a track.