← Public packages
@kentcdodds/spotify
Spotify playback, playlist, search, library, and device helpers.
src/exports/list-playlists.ts
17 lines · 691 B · TypeScriptimport { listPlaylists } from '../lib/spotify-api.ts'
import type { ListPlaylistsParams } from '../lib/export-types.ts'
/**
* List the authenticated user's Spotify playlists.
* All params accept an optional `account` ('personal' | 'family', default 'personal').
* @returns Array of playlist summaries with id, name, trackCount, and url.
* @example
* import listPlaylists from 'kody:@kentcdodds/spotify/list-playlists'
const playlists = await listPlaylists({ limit: 10 })
// => [{ id: '...', name: '...', trackCount: 42, url: '...' }]
*/
async function spotifyListPlaylists(params: ListPlaylistsParams = {}) {
return await listPlaylists(params)
}
export default spotifyListPlaylists