Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PlaylistsApi

Index

Constructors

constructor

Properties

Private http

http: Http

Methods

addItemToPlaylist

  • Add Item to a Playlist

    Add an item to a user's playlist.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • uri: string

      The Spotify track or episode URI to add.

    • Optional options: AddItemsToPlaylistOptions

      Optional request information.

    Returns Promise<string>

addItemsToPlaylist

  • Add Items to a Playlist

    Add one or more items to a user's playlist.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • uris: string[]

      The Spotify track or episode URIs to add.

    • Optional options: AddItemsToPlaylistOptions

      Optional request information.

    Returns Promise<string>

changePlaylistDetails

  • changePlaylistDetails(playlistId: string, details: PlaylistDetails): Promise<void>
  • Change a Playlist's Details

    Change a playlist's name and public/private state. (The user must, of course, own the playlist.)

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • details: PlaylistDetails

      The playlist details to update.

    Returns Promise<void>

createPlaylist

  • Create a Playlist

    Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)

    Parameters

    • userId: string

      The user's Spotify user ID.

    • playlistName: string

      The name for the new playlist.

    • Optional options: CreatePlaylistOptions

      Optional request information.

    Returns Promise<Playlist>

getMyPlaylists

getPlaylist

getPlaylistCover

  • getPlaylistCover(playlistId: string): Promise<SpotifyImage[]>
  • Get a Playlist Cover Image

    Get the current image associated with a specific playlist.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    Returns Promise<SpotifyImage[]>

getPlaylistItems

getUserPlaylists

removePlaylistItem

  • removePlaylistItem(playlistId: string, uri: string): Promise<string>
  • Remove Item from a Playlist

    Remove an item from a user's playlist.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • uri: string

      The Spotify track or episode URI to remove.

    Returns Promise<string>

removePlaylistItemByPosition

  • Remove Item from a Playlist by Position

    Remove an item from a user's playlist by position.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • uri: string

      The Spotify track or episode URI to remove.

    • positions: number[]

      The positions of the item to remove.

    • Optional options: RemovePlaylistItemsByPositionOptions

      Optional request information.

    Returns Promise<string>

removePlaylistItems

  • removePlaylistItems(playlistId: string, uris: string[]): Promise<string>
  • Remove Items from a Playlist

    Remove one or more items from a user's playlist.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • uris: string[]

      The Spotify track or episode URIs to remove.

    Returns Promise<string>

removePlaylistItemsByPosition

  • Remove Items from a Playlist by Position

    Remove one or more items from a user's playlist by position.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • items: Array<{ positions: number[]; uri: string }>

      The Spotify track or episode URIs and positions to remove.

    • Optional options: RemovePlaylistItemsByPositionOptions

      Optional request information.

    Returns Promise<string>

reorderPlaylistItems

  • reorderPlaylistItems(playlistId: string, rangeStart: number, insertBefore: number, options?: ReorderPlaylistItemsOptions): Promise<string>
  • Reorder a Playlist's Items

    Reorder an item or a group of items in a playlist.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • rangeStart: number

      The position of the first item to be reordered.

    • insertBefore: number

      The position where the items should be inserted.

    • Optional options: ReorderPlaylistItemsOptions

      Optional request information.

    Returns Promise<string>

replacePlaylistItems

  • replacePlaylistItems(playlistId: string, uris: string[]): Promise<void>
  • Replace a Playlist's Items

    Replace all the items in a playlist, overwriting its existing tracks.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • uris: string[]

      The Spotify track or episode URIs to set.

    Returns Promise<void>

uploadPlaylistCover

  • uploadPlaylistCover(playlistId: string, image: string): Promise<void>
  • Upload a Custom Playlist Cover Image

    Replace the image used to represent a specific playlist.

    Parameters

    • playlistId: string

      The Spotify ID for the playlist.

    • image: string

      Base64 encoded JPEG image data.

    Returns Promise<void>

Generated using TypeDoc