feat(frontend): show recent listens

This commit is contained in:
Julian Tölle 2020-05-02 21:46:41 +02:00
parent 32dcd84964
commit 49bff95ea5
12 changed files with 217 additions and 16 deletions

View file

@ -0,0 +1,32 @@
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;
}

View file

@ -0,0 +1,4 @@
export interface PaginationOptions {
limit: number;
page: number;
}

View file

@ -0,0 +1,33 @@
export interface Pagination<PaginationObject> {
/**
* a list of items to be returned
*/
items: PaginationObject[];
/**
* associated meta information (e.g., counts)
*/
meta: PaginationMeta;
}
export interface PaginationMeta {
/**
* the amount of items on this specific page
*/
itemCount: number;
/**
* the total amount of items
*/
totalItems: number;
/**
* the amount of items that were requested per page
*/
itemsPerPage: number;
/**
* the total amount of pages in this paginator
*/
totalPages: number;
/**
* the current page this paginator "points" to
*/
currentPage: number;
}

View file

@ -0,0 +1,5 @@
export interface User {
id: string;
displayName: string;
photo?: string;
}