-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4632c43
commit cd0e869
Showing
19 changed files
with
182 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ArtistSimple } from './artist'; | ||
import { Object } from '..'; | ||
import { TopObject } from '../top'; | ||
|
||
export interface AlbumSimple extends Object { | ||
name: string; | ||
image: string; | ||
} | ||
|
||
export interface Album extends AlbumSimple { | ||
label: string; | ||
spotifyPopularity: number; | ||
totalTracks: number; | ||
releaseDate: Date; | ||
genres: string[]; | ||
artists: ArtistSimple[]; | ||
externalIds: Record<string, unknown> & { spotify?: string[]; appleMusic?: string[] }; | ||
type: 'single' | 'complication' | 'album'; | ||
} | ||
|
||
export interface TopAlbum extends TopObject { | ||
album: Album; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Object } from '..'; | ||
import { TopObject } from '../top'; | ||
|
||
export interface ArtistSimple extends Object { | ||
name: string; | ||
} | ||
|
||
export interface Artist extends ArtistSimple { | ||
followers: number; | ||
image?: string; | ||
spotifyPopularity: number; | ||
externalIds: Record<string, unknown> & { spotify?: string[]; appleMusic?: string[] }; | ||
genres: string[]; | ||
} | ||
|
||
export interface TopArtist extends TopObject { | ||
artist: Artist; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Object } from '..'; | ||
import { ArtistSimple } from './artist'; | ||
import { TopObject } from '../top'; | ||
|
||
export interface GenreSimple extends Object { | ||
tag: string; | ||
} | ||
|
||
export interface Genre extends GenreSimple { | ||
artists: ArtistSimple[]; | ||
related: GenreSimple[]; | ||
sub: GenreSimple[]; | ||
} | ||
|
||
export interface TopGenre extends TopObject { | ||
genre: GenreSimple; | ||
artistCount?: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './album'; | ||
export * from './artist'; | ||
export * from './genre'; | ||
export * from './track'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { AlbumSimple } from './album'; | ||
import { ArtistSimple } from './artist'; | ||
import { Object } from '..'; | ||
import { TopObject } from '../top'; | ||
|
||
export interface Track extends Object { | ||
name: string; | ||
explicit: boolean; | ||
durationMs: number; | ||
spotifyPopularity: number; | ||
spotifyPreview?: string; | ||
externalIds: Record<string, unknown> & { spotify?: string[]; appleMusic?: string[] }; | ||
albums: AlbumSimple[]; | ||
artists: ArtistSimple[]; | ||
} | ||
export interface RecentlyPlayedTrack { | ||
endTime: Date; | ||
platform: 'spotify' | 'appleMusic'; | ||
track: Track; | ||
} | ||
|
||
export interface CurrentlyPlayingTrack { | ||
date: Date; | ||
isPlaying: boolean; | ||
progressMs: number; | ||
deviceName?: string; | ||
track: Track; | ||
platform: 'spotify' | 'appleMusic'; | ||
} | ||
|
||
export interface TopTrack extends TopObject { | ||
track: Track; | ||
} |
3 changes: 1 addition & 2 deletions
3
src/interfaces/statsfm/album.ts → src/interfaces/statsfm/v2/album.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/interfaces/statsfm/artist.ts → src/interfaces/statsfm/v2/artist.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/interfaces/statsfm/genre.ts → src/interfaces/statsfm/v2/genre.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './album'; | ||
export * from './artist'; | ||
export * from './genre'; | ||
export * from './track'; |
3 changes: 1 addition & 2 deletions
3
src/interfaces/statsfm/track.ts → src/interfaces/statsfm/v2/track.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.