Class UsersApi

java.lang.Object
de.sonallux.spotify.api.apis.UsersApi

public class UsersApi extends Object
Users
  • Constructor Details

    • UsersApi

      public UsersApi()
  • Method Details

    • checkCurrentUserFollows

      public CheckCurrentUserFollowsRequest checkCurrentUserFollows(String type, String ids)

      Check If User Follows Artists or Users

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

      Parameters:
      type -

      The ID type: either artist or user.

      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 CheckCurrentUserFollowsRequest object to build and execute the request
    • checkIfUserFollowsPlaylist

      public CheckIfUserFollowsPlaylistRequest checkIfUserFollowsPlaylist(String playlistId, String ids)

      Check if Users Follow 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 CheckIfUserFollowsPlaylistRequest object 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 the ids parameter is present in the query string, any IDs listed here in the body will be ignored.

      Returns:
      a FollowArtistsUsersRequest object to build and execute the request
    • followPlaylist

      public FollowPlaylistRequest followPlaylist(String playlistId)

      Follow Playlist

      Add the current user as a follower of a playlist.

      Parameters:
      playlistId -

      The Spotify ID of the playlist.

      Returns:
      a FollowPlaylistRequest object to build and execute the request
    • getCurrentUsersProfile

      public GetCurrentUsersProfileRequest getCurrentUsersProfile()

      Get Current User's Profile

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

      Returns:
      a GetCurrentUsersProfileRequest object to build and execute the request
    • getFollowed

      public GetFollowedRequest getFollowed(String type)

      Get Followed Artists

      Get the current user's followed artists.

      Parameters:
      type -

      The ID type: currently only artist is supported.

      Returns:
      a GetFollowedRequest object to build and execute the request
    • getUsersProfile

      public GetUsersProfileRequest getUsersProfile(String userId)

      Get User's Profile

      Get public profile information about a Spotify user.

      Parameters:
      userId -

      The user's Spotify user ID.

      Returns:
      a GetUsersProfileRequest object to build and execute the request
    • getUsersTopArtists

      public GetUsersTopArtistsRequest getUsersTopArtists()

      Get User's Top Artists

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

      Returns:
      a GetUsersTopArtistsRequest object to build and execute the request
    • getUsersTopTracks

      public GetUsersTopTracksRequest getUsersTopTracks()

      Get User's Top Tracks

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

      Returns:
      a GetUsersTopTracksRequest object 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 artist or user.

      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 the ids parameter is present in the query string, any IDs listed here in the body will be ignored.

      Returns:
      a UnfollowArtistsUsersRequest object 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.

      Returns:
      a UnfollowPlaylistRequest object to build and execute the request