Class FollowApi
- java.lang.Object
-
- de.sonallux.spotify.api.apis.FollowApi
-
public class FollowApi extends Object
-
-
Constructor Summary
Constructors Constructor Description FollowApi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckCurrentUserFollowsRequestcheckCurrentUserFollows(String type, String ids)Get Following State for Artists/UsersCheckIfUserFollowsPlaylistRequestcheckIfUserFollowsPlaylist(String playlistId, String ids)Check if Users Follow a PlaylistFollowArtistsUsersRequestfollowArtistsUsers(String type, List<String> ids)Follow Artists or UsersFollowPlaylistRequestfollowPlaylist(String playlistId)Follow a PlaylistGetFollowedRequestgetFollowed(String type)Get User's Followed ArtistsUnfollowArtistsUsersRequestunfollowArtistsUsers(String type, List<String> ids)Unfollow Artists or UsersUnfollowPlaylistRequestunfollowPlaylist(String playlistId)Unfollow Playlist
-
-
-
Method Detail
-
checkCurrentUserFollows
public CheckCurrentUserFollowsRequest checkCurrentUserFollows(String type, String ids)
Get Following State for Artists/Users
Check to see if the current user is following one or more artists or other Spotify users.
- Parameters:
type-The ID type: either
artistoruser.ids-A comma-separated list of the artist or the user Spotify IDs to check. For example:
ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q. A maximum of 50 IDs can be sent in one request.- Returns:
- a
CheckCurrentUserFollowsRequestobject to build and execute the request
-
checkIfUserFollowsPlaylist
public CheckIfUserFollowsPlaylistRequest checkIfUserFollowsPlaylist(String playlistId, String ids)
Check if Users Follow a Playlist
Check to see if one or more Spotify users are following a specified playlist.
- Parameters:
playlistId-The Spotify ID of the playlist.
ids-A comma-separated list of Spotify User IDs ; the ids of the users that you want to check to see if they follow the playlist. Maximum: 5 ids.
- Returns:
- a
CheckIfUserFollowsPlaylistRequestobject to build and execute the request
-
followArtistsUsers
public FollowArtistsUsersRequest followArtistsUsers(String type, List<String> ids)
Follow Artists or Users
Add the current user as a follower of one or more artists or other Spotify users.
- Parameters:
type-The ID type.
ids-A JSON array of the artist or user Spotify IDs. For example:
{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}. A maximum of 50 IDs can be sent in one request. Note: if theidsparameter is present in the query string, any IDs listed here in the body will be ignored.- Returns:
- a
FollowArtistsUsersRequestobject to build and execute the request
-
followPlaylist
public FollowPlaylistRequest followPlaylist(String playlistId)
Follow a Playlist
Add the current user as a follower of a playlist.
- Parameters:
playlistId-The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.
- Returns:
- a
FollowPlaylistRequestobject to build and execute the request
-
getFollowed
public GetFollowedRequest getFollowed(String type)
Get User's Followed Artists
Get the current user's followed artists.
- Parameters:
type-The ID type: currently only
artistis supported.- Returns:
- a
GetFollowedRequestobject to build and execute the request
-
unfollowArtistsUsers
public UnfollowArtistsUsersRequest unfollowArtistsUsers(String type, List<String> ids)
Unfollow Artists or Users
Remove the current user as a follower of one or more artists or other Spotify users.
- Parameters:
type-The ID type: either
artistoruser.ids-A JSON array of the artist or user Spotify IDs. For example:
{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}. A maximum of 50 IDs can be sent in one request. Note: if theidsparameter is present in the query string, any IDs listed here in the body will be ignored.- Returns:
- a
UnfollowArtistsUsersRequestobject to build and execute the request
-
unfollowPlaylist
public UnfollowPlaylistRequest unfollowPlaylist(String playlistId)
Unfollow Playlist
Remove the current user as a follower of a playlist.
- Parameters:
playlistId-The Spotify ID of the playlist that is to be no longer followed.
- Returns:
- a
UnfollowPlaylistRequestobject to build and execute the request
-
-