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-repeat.ts

13 lines · 435 B · TypeScript
import { setRepeat } from '../lib/spotify-api.ts'
import type { SetRepeatParams } from '../lib/export-types.ts'

/**
 * Set Spotify repeat mode to off, track, or context.
 * Supports `dryRun: true`.
 * @example
 * import setRepeat from 'kody:@kody/spotify/set-repeat'
 * await setRepeat({ state: 'context', dryRun: true })
 */
export default async function spotifySetRepeat(params: SetRepeatParams) {
	return await setRepeat(params)
}