Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/spotify

src/exports/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)
}