diff --git a/src/types/spotify-web-api.d.ts b/src/types/spotify-web-api.d.ts index 4e33947..9029126 100644 --- a/src/types/spotify-web-api.d.ts +++ b/src/types/spotify-web-api.d.ts @@ -160,3 +160,111 @@ export type GetRecommendationsResponse = { is_local: boolean }[] }; + +export class GetRecentlyPlayedTracks { + data = new RecentlyPlayedTracks(); +} + +export class RecentlyPlayedTracks { + limit = "50"; + after = ""; +} + +export type GetRecentlyPlayedTracksResponse = { + href: string, + limit: number, + next: string, + cursors: { + after: string, + before: string + }, + total: number, + items: + { + track: + { + album: { + album_type: string, + total_tracks: number, + available_markets: string[], + external_urls: { + spotify: string + }, + href: string, + id: string, + images: + { + url: string, + height: number, + width: number, + }[], + name: string, + release_date: string, + release_date_precision: string, + restrictions: { + reason: string, + }, + type: string, + uri: string, + artists: + { + external_urls: { + spotify: string + }, + href: string, + id: string, + name: string, + type: string, + uri: string + }[] + }, + artists: + { + external_urls: { + spotify: string + }, + href: string, + id: string, + name: string, + type: string, + uri: string + }[], + available_markets: + string[], + disc_number: number, + duration_ms: number, + explicit: boolean, + external_ids: { + isrc: string, + ean: string, + upc: string + }, + external_urls: { + spotify: string + }, + href: string, + id: string, + is_playable: boolean, + linked_from: {}, + restrictions: { + reason: string + }, + name: string, + popularity: number, + preview_url: string, + track_number: number, + type: string, + uri: string, + is_local: boolean + }, + played_at: string, + context: { + type: string, + href: string, + external_urls: { + spotify: string + }, + uri: string + } + }[] +} \ No newline at end of file