Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/SpotifyObjects"

Index

Type aliases

Action

Action: "interrupting_playback" | "pausing" | "resuming" | "seeking" | "skipping_next" | "skipping_prev" | "toggling_repeat_context" | "toggling_shuffle" | "toggling_repeat_track" | "transferring_playback"

Album

Album: { album_type: "album" | "single" | "compilation"; artists: SimplifiedArtist[]; available_markets: string[]; copyrights: Copyright[]; external_ids: ExternalID; external_urls: ExternalURL; genres: string[]; href: string; id: string; images: SpotifyImage[]; label: string; name: string; popularity: number; release_date: string; release_date_precision: "year" | "month" | "day"; restrictions?: Restrictions; total_tracks: number; tracks: Paging<SimplifiedTrack>; type: "album"; uri: string }

Type declaration

  • album_type: "album" | "single" | "compilation"
  • artists: SimplifiedArtist[]
  • available_markets: string[]
  • copyrights: Copyright[]
  • external_ids: ExternalID
  • external_urls: ExternalURL
  • genres: string[]
  • href: string
  • id: string
  • images: SpotifyImage[]
  • label: string
  • name: string
  • popularity: number
  • release_date: string
  • release_date_precision: "year" | "month" | "day"
  • Optional restrictions?: Restrictions
  • total_tracks: number
  • tracks: Paging<SimplifiedTrack>
  • type: "album"
  • uri: string

Artist

Artist: { external_urls: ExternalURL; followers: Followers; genres: string[]; href: string; id: string; images: SpotifyImage[]; name: string; popularity: number; type: "artist"; uri: string }

Type declaration

  • external_urls: ExternalURL
  • followers: Followers
  • genres: string[]
  • href: string
  • id: string
  • images: SpotifyImage[]
  • name: string
  • popularity: number
  • type: "artist"
  • uri: string

AudioAnalysis

AudioAnalysis: { bars: TimeInterval[]; beats: TimeInterval[]; meta?: unknown; sections: Section[]; segments: Segment[]; tatums: TimeInterval[]; track?: unknown }

Type declaration

AudioFeatures

AudioFeatures: { acousticness: number; analysis_url: string; danceability: number; duration_ms: number; energy: number; id: string; instrumentalness: number; key: number; liveness: number; loudness: number; mode: number; speechiness: number; tempo: number; time_signature: number; track_href: string; type: "audio_features"; uri: string; valence: number }

Type declaration

  • acousticness: number
  • analysis_url: string
  • danceability: number
  • duration_ms: number
  • energy: number
  • id: string
  • instrumentalness: number
  • key: number
  • liveness: number
  • loudness: number
  • mode: number
  • speechiness: number
  • tempo: number
  • time_signature: number
  • track_href: string
  • type: "audio_features"
  • uri: string
  • valence: number

Category

Category: { href: string; icons: SpotifyImage[]; id: string; name: string }

Type declaration

  • href: string
  • icons: SpotifyImage[]
  • id: string
  • name: string

Context

Context: { external_urls: ExternalURL | null; href: string | null; type: "album" | "artist" | "playlist"; uri: string }

Type declaration

  • external_urls: ExternalURL | null
  • href: string | null
  • type: "album" | "artist" | "playlist"
  • uri: string

Copyright

Copyright: { text: string; type: "C" | "P" }

Type declaration

  • text: string
  • type: "C" | "P"

CurrentlyPlaying

CurrentlyPlaying: { actions: Disallows; context: Context | null; currently_playing_type: "track" | "episode" | "ad" | "unknown"; is_playing: boolean; item: Episode | Track | null; progress_ms: number | null; timestamp: number }

Type declaration

  • actions: Disallows
  • context: Context | null
  • currently_playing_type: "track" | "episode" | "ad" | "unknown"
  • is_playing: boolean
  • item: Episode | Track | null
  • progress_ms: number | null
  • timestamp: number

CurrentlyPlayingContext

CurrentlyPlayingContext: { actions: Disallows; context: Context | null; currently_playing_type: "track" | "episode" | "ad" | "unknown"; device: Device; is_playing: boolean; item: Track | null; progress_ms: number | null; repeat_state: "off" | "track" | "context"; shuffle_state: boolean; timestamp: number }

Type declaration

  • actions: Disallows
  • context: Context | null
  • currently_playing_type: "track" | "episode" | "ad" | "unknown"
  • device: Device
  • is_playing: boolean
  • item: Track | null
  • progress_ms: number | null
  • repeat_state: "off" | "track" | "context"
  • shuffle_state: boolean
  • timestamp: number

Cursor

Cursor: { after: string; before?: undefined | string }

Type declaration

  • after: string
  • Optional before?: undefined | string

CursorBasedPaging

CursorBasedPaging<T>: { cursors: Cursor; href: string; items: T[]; limit: number; next: string | null; total?: undefined | number }

Type parameters

  • T

Type declaration

  • cursors: Cursor
  • href: string
  • items: T[]
  • limit: number
  • next: string | null
  • Optional total?: undefined | number

Device

Device: { id: string | null; is_active: boolean; is_private_session: boolean; is_restricted: boolean; name: string; type: DeviceType; volume_percent: number | null }

Type declaration

  • id: string | null
  • is_active: boolean
  • is_private_session: boolean
  • is_restricted: boolean
  • name: string
  • type: DeviceType
  • volume_percent: number | null

DeviceType

DeviceType: "Computer" | "Tablet" | "Smartphone" | "Speaker" | "TV" | "AVR" | "STB" | "AudioDongle" | "GameConsole" | "CastVideo" | "CastAudio" | "Automobile" | "Unknown"

Disallows

Disallows: { disallows: Partial<Record<Action, boolean>> }

Type declaration

  • disallows: Partial<Record<Action, boolean>>

Episode

Episode: { audio_preview_url: string | null; description: string; duration_ms: number; explicit: boolean; external_urls: ExternalURL; href: string; id: string; images: SpotifyImage[]; is_externally_hosted: boolean; is_playable: boolean; language?: undefined | string; languages: string[]; name: string; release_date: string; release_date_precision: "year" | "month" | "day"; resume_point?: ResumePoint; show: SimplifiedShow; type: "episode"; uri: string }

Type declaration

  • audio_preview_url: string | null
  • description: string
  • duration_ms: number
  • explicit: boolean
  • external_urls: ExternalURL
  • href: string
  • id: string
  • images: SpotifyImage[]
  • is_externally_hosted: boolean
  • is_playable: boolean
  • Optional language?: undefined | string
  • languages: string[]
  • name: string
  • release_date: string
  • release_date_precision: "year" | "month" | "day"
  • Optional resume_point?: ResumePoint
  • show: SimplifiedShow
  • type: "episode"
  • uri: string

ExplicitContent

ExplicitContent: { filter_enabled: boolean; filter_locked: boolean }

Type declaration

  • filter_enabled: boolean
  • filter_locked: boolean

ExternalID

ExternalID: {}

Type declaration

  • [key: string]: string

ExternalURL

ExternalURL: {}

Type declaration

  • [key: string]: string

Followers

Followers: { href: string | null; total: number }

Type declaration

  • href: string | null
  • total: number

GetRecommendationsSeeds

GetRecommendationsSeeds: { seed_artists?: string[]; seed_genres?: string[]; seed_tracks?: string[] }

Type declaration

  • Optional seed_artists?: string[]
  • Optional seed_genres?: string[]
  • Optional seed_tracks?: string[]

Paging

Paging<T>: { href: string; items: T[]; limit: number; next: string | null; offset: number; previous: string | null; total: number }

Type parameters

  • T

Type declaration

  • href: string
  • items: T[]
  • limit: number
  • next: string | null
  • offset: number
  • previous: string | null
  • total: number

PlayHistory

PlayHistory: { context: Context | null; played_at: string; track: Track }

Type declaration

Playlist

Playlist: { collaborative: boolean; description: string | null; external_urls: ExternalURL; followers: Followers; href: string; id: string; images: SpotifyImage[]; name: string; owner: PublicUser; primary_color?: string | null; public: boolean | null; snapshot_id: string; tracks: Paging<PlaylistItem>; type: "playlist"; uri: string }

Type declaration

  • collaborative: boolean
  • description: string | null
  • external_urls: ExternalURL
  • followers: Followers
  • href: string
  • id: string
  • images: SpotifyImage[]
  • name: string
  • owner: PublicUser
  • Optional primary_color?: string | null
  • public: boolean | null
  • snapshot_id: string
  • tracks: Paging<PlaylistItem>
  • type: "playlist"
  • uri: string

PlaylistDetails

PlaylistDetails: { collaborative?: undefined | false | true; description?: undefined | string; name?: undefined | string; public?: undefined | false | true }

Type declaration

  • Optional collaborative?: undefined | false | true
  • Optional description?: undefined | string
  • Optional name?: undefined | string
  • Optional public?: undefined | false | true

PlaylistItem

PlaylistItem: { added_at: string | null; added_by: PublicUser | null; is_local: boolean; primary_color?: string | null; track: Track | Episode; video_thumbnail?: VideoThumbnail }

Type declaration

PrivateUser

PrivateUser: { birthdate?: undefined | string; country?: undefined | string; display_name: string | null; email?: undefined | string; explicit_content?: ExplicitContent; external_urls: ExternalURL; followers: Followers; href: string; id: string; images: SpotifyImage[]; product?: undefined | string; type: "user"; uri: string }

Type declaration

  • Optional birthdate?: undefined | string
  • Optional country?: undefined | string
  • display_name: string | null
  • Optional email?: undefined | string
  • Optional explicit_content?: ExplicitContent
  • external_urls: ExternalURL
  • followers: Followers
  • href: string
  • id: string
  • images: SpotifyImage[]
  • Optional product?: undefined | string
  • type: "user"
  • uri: string

PublicUser

PublicUser: { display_name?: string | null; external_urls: ExternalURL; followers?: Followers; href: string; id: string; images?: SpotifyImage[]; type: "user"; uri: string }

Type declaration

  • Optional display_name?: string | null
  • external_urls: ExternalURL
  • Optional followers?: Followers
  • href: string
  • id: string
  • Optional images?: SpotifyImage[]
  • type: "user"
  • uri: string

RecommendationSeed

RecommendationSeed: { afterFilteringSize: number; afterRelinkingSize: number; href: string | null; id: string; initialPoolSize: number; type: "artist" | "ARTIST" | "track" | "TRACK" | "genre" | "GENRE" }

Type declaration

  • afterFilteringSize: number
  • afterRelinkingSize: number
  • href: string | null
  • id: string
  • initialPoolSize: number
  • type: "artist" | "ARTIST" | "track" | "TRACK" | "genre" | "GENRE"

RegularError

RegularError: { error: { message: string; status: number } }

Type declaration

  • error: { message: string; status: number }
    • message: string
    • status: number

RepeatState

RepeatState: "track" | "context" | "off"

Restrictions

Restrictions: { reason: string }

Type declaration

  • reason: string

ResumePoint

ResumePoint: { fully_played: boolean; resume_position_ms: number }

Type declaration

  • fully_played: boolean
  • resume_position_ms: number

SavedAlbum

SavedAlbum: { added_at: string; album: Album }

Type declaration

  • added_at: string
  • album: Album

SavedShow

SavedShow: { added_at: string; show: SimplifiedShow }

Type declaration

SavedTrack

SavedTrack: { added_at: string; track: Track }

Type declaration

  • added_at: string
  • track: Track

SearchType

SearchType: "album" | "artist" | "playlist" | "track" | "show" | "episode"

Section

Section: { confidence: number; duration: number; key: number; key_confidence: number; loudness: number; mode: number; mode_confidence: number; start: number; tempo: number; tempo_confidence: number; time_signature: number; time_signature_confidence: number }

Type declaration

  • confidence: number
  • duration: number
  • key: number
  • key_confidence: number
  • loudness: number
  • mode: number
  • mode_confidence: number
  • start: number
  • tempo: number
  • tempo_confidence: number
  • time_signature: number
  • time_signature_confidence: number

Segment

Segment: { confidence: number; duration: number; loudness_end: number; loudness_max: number; loudness_max_time: number; loudness_start: number; pitches: number[]; start: number; timbre: number[] }

Type declaration

  • confidence: number
  • duration: number
  • loudness_end: number
  • loudness_max: number
  • loudness_max_time: number
  • loudness_start: number
  • pitches: number[]
  • start: number
  • timbre: number[]

Show

Show: { available_markets: string[]; copyrights: Copyright[]; description: string; episodes: Paging<SimplifiedEpisode>; explicit: boolean; external_urls: ExternalURL; href: string; id: string; images: SpotifyImage[]; is_externally_hosted: boolean | null; languages: string[]; media_type: string; name: string; publisher: string; type: "show"; uri: string }

Type declaration

  • available_markets: string[]
  • copyrights: Copyright[]
  • description: string
  • episodes: Paging<SimplifiedEpisode>
  • explicit: boolean
  • external_urls: ExternalURL
  • href: string
  • id: string
  • images: SpotifyImage[]
  • is_externally_hosted: boolean | null
  • languages: string[]
  • media_type: string
  • name: string
  • publisher: string
  • type: "show"
  • uri: string

SimplifiedAlbum

SimplifiedAlbum: { album_group?: "album" | "single" | "compilation" | "appears_on"; album_type: "album" | "ALBUM" | "single" | "SINGLE" | "compilation" | "COMPILATION"; artists: SimplifiedArtist[]; available_markets?: string[]; external_urls: ExternalURL; href: string; id: string; images: SpotifyImage[]; name: string; release_date: string; release_date_precision: "year" | "month" | "day"; restrictions?: Restrictions; total_tracks: number; type: "album"; uri: string }

Type declaration

  • Optional album_group?: "album" | "single" | "compilation" | "appears_on"
  • album_type: "album" | "ALBUM" | "single" | "SINGLE" | "compilation" | "COMPILATION"
  • artists: SimplifiedArtist[]
  • Optional available_markets?: string[]
  • external_urls: ExternalURL
  • href: string
  • id: string
  • images: SpotifyImage[]
  • name: string
  • release_date: string
  • release_date_precision: "year" | "month" | "day"
  • Optional restrictions?: Restrictions
  • total_tracks: number
  • type: "album"
  • uri: string

SimplifiedArtist

SimplifiedArtist: { external_urls: ExternalURL; href: string; id: string; name: string; type: "artist"; uri: string }

Type declaration

  • external_urls: ExternalURL
  • href: string
  • id: string
  • name: string
  • type: "artist"
  • uri: string

SimplifiedEpisode

SimplifiedEpisode: { audio_preview_url: string | null; description: string; duration_ms: number; explicit: boolean; external_urls: ExternalURL; href: string; id: string; images: SpotifyImage[]; is_externally_hosted: boolean; is_playable: boolean; language?: undefined | string; languages: string[]; name: string; release_date: string; release_date_precision: "year" | "month" | "day"; resume_point?: ResumePoint; type: "episode"; uri: string }

Type declaration

  • audio_preview_url: string | null
  • description: string
  • duration_ms: number
  • explicit: boolean
  • external_urls: ExternalURL
  • href: string
  • id: string
  • images: SpotifyImage[]
  • is_externally_hosted: boolean
  • is_playable: boolean
  • Optional language?: undefined | string
  • languages: string[]
  • name: string
  • release_date: string
  • release_date_precision: "year" | "month" | "day"
  • Optional resume_point?: ResumePoint
  • type: "episode"
  • uri: string

SimplifiedPlaylist

SimplifiedPlaylist: { collaborative: boolean; description: string | null; external_urls: ExternalURL; href: string; id: string; images: SpotifyImage[]; name: string; owner: PublicUser; primary_color: string | null; public: boolean | null; snapshot_id: string; tracks: Tracks; type: "playlist"; uri: string }

Type declaration

  • collaborative: boolean
  • description: string | null
  • external_urls: ExternalURL
  • href: string
  • id: string
  • images: SpotifyImage[]
  • name: string
  • owner: PublicUser
  • primary_color: string | null
  • public: boolean | null
  • snapshot_id: string
  • tracks: Tracks
  • type: "playlist"
  • uri: string

SimplifiedShow

SimplifiedShow: { available_markets: string[]; copyrights: Copyright[]; description: string; explicit: boolean; external_urls: ExternalURL; href: string; id: string; images: SpotifyImage[]; is_externally_hosted: boolean | null; languages: string[]; media_type: string; name: string; publisher: string; type: "show"; uri: string }

Type declaration

  • available_markets: string[]
  • copyrights: Copyright[]
  • description: string
  • explicit: boolean
  • external_urls: ExternalURL
  • href: string
  • id: string
  • images: SpotifyImage[]
  • is_externally_hosted: boolean | null
  • languages: string[]
  • media_type: string
  • name: string
  • publisher: string
  • type: "show"
  • uri: string

SimplifiedTrack

SimplifiedTrack: { artists: SimplifiedArtist[]; available_markets: string[]; disc_number: number; duration_ms: number; explicit: boolean; external_urls: ExternalURL; href: string; id: string; is_local: boolean; is_playable?: undefined | false | true; linked_from?: TrackLink; name: string; preview_url: string; restrictions?: Restrictions; track_number: number; type: "track"; uri: string }

Type declaration

  • artists: SimplifiedArtist[]
  • available_markets: string[]
  • disc_number: number
  • duration_ms: number
  • explicit: boolean
  • external_urls: ExternalURL
  • href: string
  • id: string
  • is_local: boolean
  • Optional is_playable?: undefined | false | true
  • Optional linked_from?: TrackLink
  • name: string
  • preview_url: string
  • Optional restrictions?: Restrictions
  • track_number: number
  • type: "track"
  • uri: string

SpotifyImage

SpotifyImage: { height: number | null; url: string; width: number | null }

Type declaration

  • height: number | null
  • url: string
  • width: number | null

TimeInterval

TimeInterval: { confidence: number; duration: number; start: number }

Type declaration

  • confidence: number
  • duration: number
  • start: number

Track

Track: { album: SimplifiedAlbum; artists: SimplifiedArtist[]; available_markets?: string[]; disc_number: number; duration_ms: number; episode?: undefined | false | true; explicit: boolean; external_ids: ExternalID; external_urls: ExternalURL; href: string; id: string; is_local: boolean; is_playable?: undefined | false | true; linked_from?: TrackLink; name: string; popularity: number; preview_url: string | null; restrictions?: Restrictions; track?: undefined | false | true; track_number: number; type: "track"; uri: string }

Type declaration

  • album: SimplifiedAlbum
  • artists: SimplifiedArtist[]
  • Optional available_markets?: string[]
  • disc_number: number
  • duration_ms: number
  • Optional episode?: undefined | false | true
  • explicit: boolean
  • external_ids: ExternalID
  • external_urls: ExternalURL
  • href: string
  • id: string
  • is_local: boolean
  • Optional is_playable?: undefined | false | true
  • Optional linked_from?: TrackLink
  • name: string
  • popularity: number
  • preview_url: string | null
  • Optional restrictions?: Restrictions
  • Optional track?: undefined | false | true
  • track_number: number
  • type: "track"
  • uri: string

TrackLink

TrackLink: { external_urls: ExternalURL; href: string; id: string; type: "track"; uri: string }

Type declaration

  • external_urls: ExternalURL
  • href: string
  • id: string
  • type: "track"
  • uri: string

Tracks

Tracks: { href: string; total: number }

Type declaration

  • href: string
  • total: number

VideoThumbnail

VideoThumbnail: { url: string | null }

Type declaration

  • url: string | null

Generated using TypeDoc