Skip to content
← Public packages

@kody/spotify

Read a Spotify profile, search the catalog, and manage library, playlists, devices, and playback.

FollowFork

Files

create-playlist.ts

13 lines · 540 B · TypeScript
import { createPlaylist } from '../lib/spotify-api.ts'
import type { CreatePlaylistParams } from '../lib/export-types.ts'

/**
 * Create a new Spotify playlist on the authenticated account.
 * Supports `dryRun: true` to preview without creating.
 * @example
 * import createPlaylist from 'kody:@kody/spotify/create-playlist'
 * const preview = await createPlaylist({ name: 'Focus', public: false, dryRun: true })
 */
export default async function spotifyCreatePlaylist(params: CreatePlaylistParams) {
	return await createPlaylist(params)
}