spotify-audio-api
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -34,15 +34,14 @@ export interface RequestParams { | ||
*/ | ||
export interface ArtistSimple { | ||
export interface Artist extends ArtistSimple { | ||
external_urls: ExternalUrl; | ||
followers: Followers; | ||
genres: string[]; | ||
href: string; | ||
id: string; | ||
name: string; | ||
popularity: number; | ||
type: string; | ||
uri: string; | ||
} | ||
export interface Artist extends ArtistSimple { | ||
followers: Followers; | ||
genres: string[]; | ||
popularity: number; | ||
} | ||
declare type ArtistSimple = Omit<Artist, "followers" | "genres" | "popularity">; | ||
export interface ArtistSimplePaged extends Paged { | ||
@@ -60,3 +59,4 @@ items: ArtistSimple[]; | ||
*/ | ||
export interface TrackSimple { | ||
export interface Track extends TrackSimple { | ||
album_type: string; | ||
artists: ArtistSimple[]; | ||
@@ -67,2 +67,3 @@ available_markets: string[]; | ||
explicit: boolean; | ||
external_ids: ExternalId; | ||
external_urls: ExternalUrl; | ||
@@ -74,2 +75,3 @@ href: string; | ||
name: string; | ||
popularity: number; | ||
preview_url: string; | ||
@@ -80,7 +82,3 @@ track_number: number; | ||
} | ||
export interface Track extends TrackSimple { | ||
album_type: string; | ||
external_ids: ExternalId; | ||
popularity: number; | ||
} | ||
declare type TrackSimple = Omit<Track, "album_type" | "external_ids" | "popularity">; | ||
export interface TrackSimplePaged extends Paged { | ||
@@ -98,3 +96,3 @@ items: TrackSimple; | ||
*/ | ||
export interface AlbumSimple { | ||
export interface Album extends AlbumSimple { | ||
album_group?: string; | ||
@@ -104,21 +102,20 @@ album_type: string; | ||
available_markets: string[]; | ||
copyrights: Copyright[]; | ||
external_ids: ExternalId; | ||
external_urls: ExternalUrl; | ||
genres: string[]; | ||
href: string; | ||
id: string; | ||
images: Image[]; | ||
label: string; | ||
name: string; | ||
popularity: number; | ||
release_date: string; | ||
release_date_precision: string; | ||
restrictions: any; | ||
tracks: TrackSimplePaged; | ||
type: string; | ||
uri: string; | ||
} | ||
export interface Album extends AlbumSimple { | ||
copyrights: Copyright[]; | ||
external_ids: ExternalId; | ||
genres: string[]; | ||
label: string; | ||
popularity: number; | ||
tracks: TrackSimplePaged; | ||
} | ||
declare type AlbumSimple = Omit<Album, "copyrights" | "external_ids" | "genres" | "label" | "popularity" | "tracks">; | ||
export interface AlbumSimplePaged extends Paged { | ||
@@ -130,6 +127,17 @@ items: AlbumSimple; | ||
} | ||
interface BasicAudioFeatures { | ||
loudness: number; | ||
tempo: number; | ||
tempo_confidence: number; | ||
key: number; | ||
key_confidence: number; | ||
mode: number; | ||
mode_confidence: number; | ||
time_signature: number; | ||
time_signature_confidence: number; | ||
} | ||
/** | ||
* ANALYSIS | ||
*/ | ||
export interface AudioFeatures { | ||
export declare type AudioFeatures = Omit<BasicAudioFeatures, "tempo_confidence" | "key_confidence" | "mode_confidence" | "time_signature_confidence"> & { | ||
acousticness: number; | ||
@@ -142,9 +150,4 @@ analysis_url: string; | ||
instrumentalness: number; | ||
key: number; | ||
liveness: number; | ||
loudness: number; | ||
mode: number; | ||
speechiness: number; | ||
tempo: number; | ||
time_signature: number; | ||
track_href: string; | ||
@@ -154,3 +157,3 @@ type: string; | ||
valence: number; | ||
} | ||
}; | ||
interface AudioMeta { | ||
@@ -165,3 +168,3 @@ analyzer_version: string; | ||
} | ||
interface TrackAnalysis { | ||
declare type TrackAnalysis = BasicAudioFeatures & { | ||
num_samples: number; | ||
@@ -176,11 +179,2 @@ duration: number; | ||
start_of_fade_out: number; | ||
loudness: number; | ||
tempo: number; | ||
tempo_confidence: number; | ||
time_signature: number; | ||
time_signature_confidence: number; | ||
key: number; | ||
key_confidence: number; | ||
mode: number; | ||
mode_confidence: number; | ||
codestring: string; | ||
@@ -194,3 +188,3 @@ code_version: string; | ||
rhythm_version: 1; | ||
} | ||
}; | ||
interface Bar { | ||
@@ -201,13 +195,2 @@ start: number; | ||
} | ||
interface Section extends Bar { | ||
loudness: number; | ||
tempo: number; | ||
tempo_confidence: number; | ||
key: number; | ||
key_confidence: number; | ||
mode: number; | ||
mode_confidence: number; | ||
time_signature: number; | ||
time_signature_confidence: number; | ||
} | ||
interface Segment extends Bar { | ||
@@ -219,2 +202,3 @@ loudness_start: number; | ||
} | ||
declare type Section = BasicAudioFeatures[]; | ||
export interface AudioAnalysis { | ||
@@ -221,0 +205,0 @@ meta: AudioMeta; |
{ | ||
"name": "spotify-audio-api", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Spotify API wrapper to return audio metadata", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
21553
537