new UserManager( spotify )

Description

Manages spotify users.

Parameters
Name Type Description
spotify Spotify

The spotify client.

Details

Members


spotify :Spotify

Description

The spotify client.

Details

Methods


get( id ) → {Promise.<(User|HTTPError|ApiError)>}

Description

Get public profile information about a Spotify user.

Parameters
Name Type Description
id string

The Spotify ID for the user.

Returns
Details

top( type, options ) → {Promise.<(Array.<Artist>|Array.<Track>|HTTPError|ApiError)>}

Description

Get the current user's top artists or tracks based on calculated affinity.

Parameters
Name Type Description
type string

The type of entity to return. Valid values: artists or tracks

options UserTopOptions
Returns
Details

followed( options ) → {Array.<Artist>|HTTPError|ApiError}

Description

Get the current user's followed artists.

Parameters
Name Type Description
options FollowingArtistOptions
Returns
Details

follow( ids ) → {Promise.<(Status|HTTPError|ApiError)>}

Description

Add the current user as a follower of one or more user.

Parameters
Name Type Description
ids string | Array.<string>

The Spotify ID of the user.

Returns
Details

unfollow( ids ) → {Promise.<(Status|HTTPError|ApiError)>}

Description

Remove the current user as a follower of one or more user.

Parameters
Name Type Description
ids string | Array.<string>

The Spotify ID of the user.

Returns
Details

following( ids, users ) → {Array.<boolean>|HTTPError|ApiError}

Description

Check to see if the current user is following one or more users.

Parameters
Name Type Description
ids string

The Spotify ID of the user.

users string | Array.<string>

A list of Spotify User IDs.

Returns
Details

me() → {Promise.<(User|HTTPError|ApiError)>}

Description

Get detailed profile information about the current user (including the current user's username).

Returns
Details