Skip to content

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

Package listing

@kody/spotify

src/exports/follow-playlist.ts

13 lines · 500 B · TypeScript
import { followPlaylist } from '../lib/spotify-api.ts'
import type { FollowPlaylistParams } from '../lib/export-types.ts'

/**
 * Save (follow) a Spotify playlist to the user's library.
 * Supports `dryRun: true`.
 * @example
 * import followPlaylist from 'kody:@kody/spotify/follow-playlist'
 * await followPlaylist({ playlistId: '37i9dQZF1DX0XUsuxWHRQd', dryRun: true })
 */
export default async function spotifyFollowPlaylist(params: FollowPlaylistParams) {
	return await followPlaylist(params)
}