UserManager src/managers/User.ts#L17
A manager to perform actions which belongs to the spotify user web api.
Properties:
clientMethods:
follow followsPlaylist get getPlaylists unfollowconstructor(client) src/managers/User.ts#L17
No documentation found.
Name | Type | Description |
---|---|---|
client | Client | The spotify api client. |
.follow(ids) src/managers/User.ts#L70
Follow one or many users. This method requires an user authorized token.
await client.users.follow('id1', 'id2');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
ids | string[] | The array of user ids. |
.followsPlaylist(playlistID, ids) src/managers/User.ts#L57
Verify a list of users follows a paticular playlist.
const [userFollows] = await client.users.followsPlaylist('id');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
playlistID | string | The id of the spotify playlist. |
ids | string[] | The array of spotify user ids. |
.get(id, force) src/managers/User.ts#L26
Get an user's information.
const user = await client.users.get('id');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The spotify user id. |
force | boolean | When true, will directly fetch else will search for the cache first! |
.getPlaylists(id, options) src/managers/User.ts#L39
Get the list of playlists of a user by the user's spotify id.
const playlists = await client.users.getPlaylists('id');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
id | string | The spotify user id. |
options | { limit?: number, offset?: number, } | The limit, offset query parameter options. |
.unfollow(ids) src/managers/User.ts#L84
Unfollow one or many users. This method requires an user authorized token.
await client.users.unfollow('id1', 'id2');
Returns:
Parameters:
Name | Type | Description |
---|---|---|
ids | string[] | The array of user ids. |