Create interfaces for calendar entry and playlist

This commit is contained in:
Maciej Pędzich 2022-07-02 15:18:33 +02:00
parent 552efcae1b
commit 3de4584bc5
4 changed files with 35 additions and 0 deletions

5
models/calendar-entry.ts Normal file
View File

@ -0,0 +1,5 @@
export interface CalendarEntry {
snapshotId: string;
commitSha: string;
dateCaptured: string;
}

4
models/owner.ts Normal file
View File

@ -0,0 +1,4 @@
export interface Owner {
name: string;
url: string;
}

13
models/playlist.ts Normal file
View File

@ -0,0 +1,13 @@
import { Owner } from './owner';
import { Track } from './track';
export interface Playlist {
description: string;
num_followers: number;
original_name: string;
owner: Owner;
snapshot_id: string;
tracks: Track[];
unique_name: string;
url: string;
}

13
models/track.ts Normal file
View File

@ -0,0 +1,13 @@
import { Owner } from './owner';
export interface Track {
added_at: string;
album: {
name: string;
url: string;
};
artists: Owner[];
duration_ms: number;
name: string;
url: string;
}