Skip to content

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

Package listing

@kody/spotify

src/exports/set-shuffle.ts

13 lines · 452 B · TypeScript
import { setShuffle } from '../lib/spotify-api.ts'
import type { SetShuffleParams } from '../lib/export-types.ts'

/**
 * Enable or disable shuffle on the active or named Spotify device.
 * Supports `dryRun: true`.
 * @example
 * import setShuffle from 'kody:@kody/spotify/set-shuffle'
 * await setShuffle({ state: true, dryRun: true })
 */
export default async function spotifySetShuffle(params: SetShuffleParams) {
	return await setShuffle(params)
}