Skip to content

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

Package listing

@kody/spotify

src/exports/get-recently-played.ts

12 lines · 483 B · TypeScript
import { getRecentlyPlayed } from '../lib/spotify-api.ts'
import type { GetRecentlyPlayedParams } from '../lib/export-types.ts'

/**
 * Read recently played Spotify tracks for the authenticated user.
 * @example
 * import getRecentlyPlayed from 'kody:@kody/spotify/get-recently-played'
 * const items = await getRecentlyPlayed({ limit: 10 })
 */
export default async function spotifyGetRecentlyPlayed(params: GetRecentlyPlayedParams = {}) {
	return await getRecentlyPlayed(params)
}