Skip to content

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

Package listing

@kody/spotify

src/exports/add-to-queue.ts

13 lines · 525 B · TypeScript
import { addToQueue } from '../lib/spotify-api.ts'
import type { AddToQueueParams } from '../lib/export-types.ts'

/**
 * Add a track or episode URI to the end of the Spotify queue.
 * Prefer `deviceName` when targeting a device. Supports `dryRun: true`.
 * @example
 * import addToQueue from 'kody:@kody/spotify/add-to-queue'
 * await addToQueue({ uri: 'spotify:track:4cOdK2wGLETKBW3PvgPWqT', dryRun: true })
 */
export default async function spotifyAddToQueue(params: AddToQueueParams) {
	return await addToQueue(params)
}