Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FollowApi

Index

Constructors

constructor

Properties

Private http

http: Http

Methods

areFollowingPlaylist

  • areFollowingPlaylist(playlistId: string, userIds: string[]): Promise<boolean[]>
  • Check to see if one or more Spotify users are following a specified playlist.

    Required Scopes: playlist-read-private when checking if the current user is privately following a playlist.

    example
    const response = await spotify.follow.areFollowingPlaylist(
      '7fdQkum2nvXwcaCKnBZ7rR',
      ['griegs', 'jmperezperez'],
    );
    console.log(response);
    // Array [ true, false ]

    Parameters

    • playlistId: string

      The Spotify ID of the playlist.

    • userIds: string[]

      The Spotify IDs of the users.

    Returns Promise<boolean[]>

followArtist

  • followArtist(artistId: string): Promise<void>
  • Add the current user as a follower of an artist.

    Required Scopes: user-follow-modify.

    example
    await spotify.follow.followArtist('029y4wr8YYFoqPBahe8Ddz');

    Parameters

    • artistId: string

      The Spotify ID of the artist.

    Returns Promise<void>

followArtists

  • followArtists(artistIds: string[]): Promise<void>
  • Add the current user as a follower of one or more artists.

    Required Scopes: user-follow-modify.

    example
    await spotify.follow.followArtists([
      '029y4wr8YYFoqPBahe8Ddz',
      '1SlPJ2l80sMnCHpz1wB8nT',
    ]);

    Parameters

    • artistIds: string[]

      The Spotify IDs of the artists.

    Returns Promise<void>

followPlaylist

  • Add the current user as a follower of a playlist.

    Required Scopes: playlist-modify-public when publicly following a playlist. playlist-modify-private when privately following a playlist.

    example
    await spotify.follow.followPlaylist('0USISVmfwjRpmY980WkNW4');

    Parameters

    • playlistId: string

      The Spotify ID of the playlist.

    • Optional options: FollowPlaylistOptions

      Optional request information.

    Returns Promise<void>

followUser

  • followUser(userId: string): Promise<void>
  • Add the current user as a follower of a Spotify user.

    Required Scopes: user-follow-modify.

    example
    await spotify.follow.followUser('griegs');

    Parameters

    • userId: string

      The Spotify ID of the user.

    Returns Promise<void>

followUsers

  • followUsers(userIds: string[]): Promise<void>
  • Add the current user as a follower of one or more Spotify users.

    Required Scopes: user-follow-modify.

    example
    await spotify.follow.followUsers(['griegs', 'jmperezperez']);

    Parameters

    • userIds: string[]

      The Spotify IDs of the users.

    Returns Promise<void>

getFollowedArtists

isFollowingArtist

  • isFollowingArtist(artistId: string): Promise<boolean>
  • Check to see if the current user is following an artist.

    Required Scopes: user-follow-read.

    example
    const response = await spotify.follow.isFollowingArtist(
      '7rZjYMRC5pTV089WKn1Y4s',
    );
    console.log(response);
    // true

    Parameters

    • artistId: string

      The Spotify ID for the artist.

    Returns Promise<boolean>

isFollowingArtists

  • isFollowingArtists(artistIds: string[]): Promise<boolean[]>
  • Check to see if the current user is following one or more artists.

    Required Scopes: user-follow-read.

    example
    const response = await spotify.follow.isFollowingArtists([
      '2leze82lbuNUn3K4c7nS1B',
      '77bG3jpmWXOxpmZcVjPayy',
    ]);
    console.log(response);
    // Array [ true, false ]

    Parameters

    • artistIds: string[]

      The Spotify IDs for the artists.

    Returns Promise<boolean[]>

isFollowingPlaylist

  • isFollowingPlaylist(playlistId: string, userId: string): Promise<boolean>
  • Check to see if a Spotify user is following a specified playlist.

    Required Scopes: playlist-read-private when checking if the current user is privately following a playlist.

    example
    const response = await spotify.follow.isFollowingPlaylist(
      '4xOF7TTAG2McFFJDixc3Lt',
      'griegs',
    );
    console.log(response);
    // true

    Parameters

    • playlistId: string

      The Spotify ID of the playlist.

    • userId: string

      The Spotify ID of the user.

    Returns Promise<boolean>

isFollowingUser

  • isFollowingUser(userId: string): Promise<boolean>
  • Check to see if the current user is following a Spotify user.

    Required Scopes: user-follow-read.

    example
    const response = await spotify.follow.isFollowingUser('griegs');
    console.log(response);
    // true

    Parameters

    • userId: string

      The Spotify ID for the user.

    Returns Promise<boolean>

isFollowingUsers

  • isFollowingUsers(userIds: string[]): Promise<boolean[]>
  • Check to see if the current user is following one or more Spotify users.

    Required Scopes: user-follow-read.

    example
    const response = await spotify.follow.isFollowingUsers([
      'griegs',
      'jmperezperez',
    ]);
    console.log(response);
    // Array [ true, true ]

    Parameters

    • userIds: string[]

      The Spotify IDs for the users.

    Returns Promise<boolean[]>

unfollowArtist

  • unfollowArtist(artistId: string): Promise<void>
  • Remove the current user as a follower of an artist.

    Required Scopes: user-follow-modify.

    example
    await spotify.follow.unfollowArtist('3bU97PoqnxjKD45CrfwmC9');

    Parameters

    • artistId: string

      The Spotify ID of the artist.

    Returns Promise<void>

unfollowArtists

  • unfollowArtists(artistIds: string[]): Promise<void>
  • Remove the current user as a follower of one or more artists.

    Required Scopes: user-follow-modify.

    Parameters

    • artistIds: string[]

      The Spotify IDs of the artists.

    Returns Promise<void>

unfollowPlaylist

  • unfollowPlaylist(playlistId: string): Promise<void>
  • Remove the current user as a follower of a playlist.

    Required Scopes: playlist-modify-public when unfollowing a publicly followed playlist. playlist-modify-private when unfollowing a privately followed playlist.

    example
    await spotify.follow.unfollowPlaylist('6SAtV2bMjUbQTV37X51F3u');

    Parameters

    • playlistId: string

      The Spotify ID of the playlist.

    Returns Promise<void>

unfollowUser

  • unfollowUser(userId: string): Promise<void>
  • Remove the current user as a follower of a Spotify user.

    Required Scopes: user-follow-modify.

    example
    await spotify.follow.unfollowUser('griegs');

    Parameters

    • userId: string

      The Spotify ID of the user.

    Returns Promise<void>

unfollowUsers

  • unfollowUsers(userIds: string[]): Promise<void>
  • Remove the current user as a follower of one or more Spotify users.

    Required Scopes: user-follow-modify.

    example
    await spotify.follow.unfollowUsers(['griegs', 'jmperezperez']);

    Parameters

    • userIds: string[]

      The Spotify IDs of the users.

    Returns Promise<void>

Generated using TypeDoc