Turns the rows the playlist and follow services read from playlists into
the Playlist the API sends.
f
isPlaylistRow(obj: unknown): obj is PlaylistRow
Checks whether a row node:sqlite returned is a PlaylistRow.
f
playlistRowToApi(row: PlaylistRow): Playlist
Converts row to the Playlist the playlist routes send.
I
PlaylistRow
Returned by the playlist and follow services' SELECTs on playlists,
which join the owner's name as owner_username. A query may add the
dump_count and last_dump_at columns (VISIBLE_DUMP_FIGURES), which
playlistRowToApi carries over when present.
- created_at: string
- description: string | null
- id: string
- image_mime: string | null
- is_public: number
- owner_username: string
-
slug: string
Unique among its owner's playlists, and set on every row since 0021.
- title: string
- updated_at: string | null
- user_id: string
Usage
import * as mod from "api/model/playlist.ts";