mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat: add top-artists report
This commit is contained in:
parent
6a6ba493f6
commit
6fc10c40ca
18 changed files with 345 additions and 30 deletions
7
frontend/src/api/entities/album.ts
Normal file
7
frontend/src/api/entities/album.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { SpotifyInfo } from "./spotify-info";
|
||||
|
||||
export interface Album {
|
||||
id: string;
|
||||
name: string;
|
||||
spotify?: SpotifyInfo;
|
||||
}
|
||||
7
frontend/src/api/entities/artist.ts
Normal file
7
frontend/src/api/entities/artist.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { SpotifyInfo } from "./spotify-info";
|
||||
|
||||
export interface Artist {
|
||||
id: string;
|
||||
name: string;
|
||||
spotify?: SpotifyInfo;
|
||||
}
|
||||
|
|
@ -1,32 +1,7 @@
|
|||
import { Track } from "./track";
|
||||
|
||||
export interface Listen {
|
||||
id: string;
|
||||
playedAt: string;
|
||||
track: Track;
|
||||
}
|
||||
|
||||
interface Track {
|
||||
id: string;
|
||||
name: string;
|
||||
album: Album;
|
||||
artists: Artist[];
|
||||
spotify?: SpotifyInfo;
|
||||
}
|
||||
|
||||
interface Album {
|
||||
id: string;
|
||||
name: string;
|
||||
spotify?: SpotifyInfo;
|
||||
}
|
||||
|
||||
interface Artist {
|
||||
id: string;
|
||||
name: string;
|
||||
spotify?: SpotifyInfo;
|
||||
}
|
||||
|
||||
interface SpotifyInfo {
|
||||
id: string;
|
||||
uri: string;
|
||||
type: string;
|
||||
href: string;
|
||||
}
|
||||
|
|
|
|||
6
frontend/src/api/entities/spotify-info.ts
Normal file
6
frontend/src/api/entities/spotify-info.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export interface SpotifyInfo {
|
||||
id: string;
|
||||
uri: string;
|
||||
type: string;
|
||||
href: string;
|
||||
}
|
||||
9
frontend/src/api/entities/time-preset.enum.ts
Normal file
9
frontend/src/api/entities/time-preset.enum.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export enum TimePreset {
|
||||
LAST_7_DAYS = "last_7_days",
|
||||
LAST_30_DAYS = "last_30_days",
|
||||
LAST_90_DAYS = "last_90_days",
|
||||
LAST_180_DAYS = "last_180_days",
|
||||
LAST_365_DAYS = "last_365_days",
|
||||
ALL_TIME = "all_time",
|
||||
CUSTOM = "custom",
|
||||
}
|
||||
6
frontend/src/api/entities/top-artists-item.ts
Normal file
6
frontend/src/api/entities/top-artists-item.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { Artist } from "./artist";
|
||||
|
||||
export interface TopArtistsItem {
|
||||
artist: Artist;
|
||||
count: number;
|
||||
}
|
||||
7
frontend/src/api/entities/top-artists-options.ts
Normal file
7
frontend/src/api/entities/top-artists-options.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { TimePreset } from "./time-preset.enum";
|
||||
|
||||
export interface TopArtistsOptions {
|
||||
timePreset: TimePreset;
|
||||
customTimeStart: Date;
|
||||
customTimeEnd: Date;
|
||||
}
|
||||
11
frontend/src/api/entities/track.ts
Normal file
11
frontend/src/api/entities/track.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { Album } from "./album";
|
||||
import { Artist } from "./artist";
|
||||
import { SpotifyInfo } from "./spotify-info";
|
||||
|
||||
export interface Track {
|
||||
id: string;
|
||||
name: string;
|
||||
album: Album;
|
||||
artists: Artist[];
|
||||
spotify?: SpotifyInfo;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue