cody-music
Version:
mac osx spotify and itunes music player controller, spotify audio features, itunes and spotify genre, and playlist control
173 lines (172 loc) • 3.93 kB
TypeScript
export declare enum PlayerType {
MacItunesDesktop = "MacItunesDesktop",
MacSpotifyDesktop = "MacSpotifyDesktop",
WindowsSpotifyDesktop = "WidowsSpotifyDesktop",
WebSpotify = "WebSpotify",
NotAssigned = "NotAssigned"
}
export declare enum PlayerName {
SpotifyDesktop = "spotify",
SpotifyWeb = "spotify-web",
ItunesDesktop = "itunes"
}
export declare enum TrackStatus {
Playing = "playing",
Paused = "paused",
Advertisement = "advertisement",
NotAssigned = "notassigned",
GrantError = "granterror"
}
export declare enum CodyResponseType {
Success = "success",
Failed = "failed"
}
export declare class CodyResponse {
status: number;
state: CodyResponseType;
statusText: string;
message: string;
data: any;
error: any;
retrySeconds: number;
}
export declare class Track {
artist: string;
artist_names: string[];
album: any;
genre: string;
disc_number: number;
duration: number;
duration_ms: number;
played_count: number;
track_number: number;
popularity: number;
id: string;
uri: string;
name: string;
explicit: boolean;
href: string;
type: string;
artists: Artist[];
playerType: PlayerType;
loved: boolean;
volume: number;
state: TrackStatus;
error: string;
progress_ms: number;
features: SpotifyAudioFeature;
httpStatus: number;
actions: any;
played_at: string;
played_at_utc_seconds: number;
context_uri: string;
context_type: string;
}
export declare class Artist {
followers: any;
genres: string[];
id: string;
uri: string;
name: string;
images: any[];
popularity: number;
}
export declare class Album {
album_type: string;
artists: any[];
href: string;
id: string;
name: string;
uri: string;
images: any[];
}
export declare class PaginationItem {
items: any[];
limit: number;
next: string;
previous: string;
total: number;
offset: number;
constructor();
}
export declare class PlayerDevice {
id: string;
is_active: string;
is_restricted: boolean;
name: string;
type: string;
volume_percent: number;
}
export declare class PlayerContext {
timestamp: number;
device: PlayerDevice;
progress_ms: string;
is_playing: boolean;
currently_playing_type: string;
actions: any;
item: any;
shuffle_state: boolean;
repeat_state: string;
context: any;
}
export declare class SpotifyAudioFeature {
danceability: number;
energy: number;
key: number;
loudness: number;
mode: number;
speechiness: number;
acousticness: number;
instrumentalness: number;
liveness: number;
valence: number;
tempo: number;
id: string;
uri: string;
track_href: string;
analysis_url: string;
duration_ms: number;
time_signature: number;
}
export declare class PlaylistTrackInfo {
href: string;
total: number;
}
export declare class PlaylistItem {
name: string;
id: string;
uri: string;
playlistTypeId: number;
collaborative: boolean;
public: boolean;
tracks: PlaylistTrackInfo;
type: string;
itemType: string;
playerType: PlayerType;
tag: string;
tooltip: string;
state: TrackStatus;
artists: string;
command: string;
position: number;
loved: boolean;
played_count: number;
popularity: number;
artist: string;
owner: any;
duplicateIds: string[];
}
export declare class CodyConfig {
spotifyAccessToken: string;
spotifyRefreshToken: string;
spotifyClientSecret: string;
spotifyClientId: string;
enableItunesDesktop: boolean;
enableItunesDesktopSongTracking: boolean;
enableSpotifyDesktop: boolean;
enableSpotifyApi: boolean;
}
export declare class SpotifyAuthState {
oauthActivated: boolean;
loggedIn: boolean;
}