mirror of
https://github.com/maciejpedzich/spotifyplaylistarchive.com.git
synced 2024-09-20 02:26:20 +02:00
Create snapshot, track, and user models
This commit is contained in:
parent
4844c85b59
commit
ef2641c897
13
src/models/playlist-snapshot.ts
Normal file
13
src/models/playlist-snapshot.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import type { User } from './user';
|
||||
import type { Track } from './track';
|
||||
|
||||
export interface PlaylistSnapshot {
|
||||
description: string;
|
||||
num_followers: number;
|
||||
original_name: string;
|
||||
owner: User;
|
||||
snapshot_id: string;
|
||||
tracks: Track[];
|
||||
unique_name: string;
|
||||
url: string;
|
||||
}
|
18
src/models/track.ts
Normal file
18
src/models/track.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import type { User } from './user';
|
||||
|
||||
export interface Track {
|
||||
added_at: string;
|
||||
album: {
|
||||
name: string;
|
||||
url: string;
|
||||
};
|
||||
artists: User[];
|
||||
duration_ms: number;
|
||||
name: string;
|
||||
url: string;
|
||||
date_added: string;
|
||||
date_added_asterisk: boolean;
|
||||
date_removed: string | null;
|
||||
position?: string;
|
||||
retention?: number;
|
||||
}
|
4
src/models/user.ts
Normal file
4
src/models/user.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface User {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
Loading…
Reference in New Issue
Block a user