From 3de4584bc5aafe23e66b1ac2ed515ced0d23c8e0 Mon Sep 17 00:00:00 2001 From: maciejpedzich Date: Sat, 2 Jul 2022 15:18:33 +0200 Subject: [PATCH] Create interfaces for calendar entry and playlist --- models/calendar-entry.ts | 5 +++++ models/owner.ts | 4 ++++ models/playlist.ts | 13 +++++++++++++ models/track.ts | 13 +++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 models/calendar-entry.ts create mode 100644 models/owner.ts create mode 100644 models/playlist.ts create mode 100644 models/track.ts diff --git a/models/calendar-entry.ts b/models/calendar-entry.ts new file mode 100644 index 0000000..f8cca15 --- /dev/null +++ b/models/calendar-entry.ts @@ -0,0 +1,5 @@ +export interface CalendarEntry { + snapshotId: string; + commitSha: string; + dateCaptured: string; +} diff --git a/models/owner.ts b/models/owner.ts new file mode 100644 index 0000000..223d086 --- /dev/null +++ b/models/owner.ts @@ -0,0 +1,4 @@ +export interface Owner { + name: string; + url: string; +} diff --git a/models/playlist.ts b/models/playlist.ts new file mode 100644 index 0000000..e2508c8 --- /dev/null +++ b/models/playlist.ts @@ -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; +} diff --git a/models/track.ts b/models/track.ts new file mode 100644 index 0000000..f3b317e --- /dev/null +++ b/models/track.ts @@ -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; +}