Created
February 25, 2022 16:01
-
-
Save Yidaotus/c152e32bc9d55193e81ccf854e3bcf3d to your computer and use it in GitHub Desktop.
Currently Playing Types
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
export interface SpotifyImage { | |
height: number; | |
width: number; | |
url: string; | |
} | |
export interface SpotifyAlbum { | |
images: Array<SpotifyImage>; | |
name: string; | |
} | |
export interface SpotifyTrackItem { | |
name: string; | |
durationMs: number; | |
uri: string; | |
album: SpotifyAlbum; | |
artists: Array<{ name: string }>; | |
} | |
export interface SpotifyPlayer { | |
progressMs: number; | |
isPlaying: boolean | undefined; | |
item: SpotifyTrackItem; | |
} | |
export interface CurrentlyPlayingError { | |
message: string; | |
path: Array<string>; | |
} | |
export interface CurrentlyPlayingData { | |
me: { | |
spotify: { | |
player: SpotifyPlayer; | |
}; | |
}; | |
} | |
export interface CurrentlyPlayingAPI { | |
success: boolean; | |
CurrentlyPlayingErrors?: Array<CurrentlyPlayingError>; | |
CurrentlyPlayingData: CurrentlyPlayingData; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment