com.samsung.android.penup
Class ArtistApi
- java.lang.Object
-
- com.samsung.android.penup.ArtistApi
-
public class ArtistApi extends java.lang.Object
This class sends requests related to artist information.- Since:
- PEN.UP 1.0
-
-
Method Summary
Methods Modifier and Type Method and Description static void
getArtist(PenupClient penupClient, java.lang.String artistId, ResourceCallback<ArtistResource> resourceCallback)
Gets the artist with the specified ID.static void
getMyFollowers(PenupClient penupClient, int maxResults, java.lang.String pageToken, ResourceListCallback<ArtistResource> resourceListCallback)
Gets user's followers.static void
getMyFollowingArtists(PenupClient penupClient, int maxResults, java.lang.String pageToken, ResourceListCallback<ArtistResource> resourceListCallback)
Gets artists whom the user follows.static void
getMyProfile(PenupClient penupClient, ResourceCallback<ArtistResource> resourceCallback)
Gets the user's profile.static void
getPopularArtists(PenupClient penupClient, int maxResults, java.lang.String pageToken, ResourceListCallback<ArtistResource> resourceListCallback)
Gets popular artists.
-
-
-
Method Detail
-
getArtist
public static void getArtist(PenupClient penupClient, java.lang.String artistId, ResourceCallback<ArtistResource> resourceCallback)
Gets the artist with the specified ID.
TheScope.READ_RESOURCES
scope is required.- Parameters:
penupClient
- The PenupClient instanceartistId
- The artist IDresourceCallback
- The ResourceCallbackinstance for receiving the artist - Throws:
java.lang.IllegalArgumentException
- Thrown when either of the following conditions has occurred:- The
penupClient
isnull
. - The
artistId
isnull
or empty. - The
resourceCallback
isnull
.
- The
- Since:
- PEN.UP 1.0
-
getMyProfile
public static void getMyProfile(PenupClient penupClient, ResourceCallback<ArtistResource> resourceCallback)
Gets the user's profile.
TheScope.READ_MY_RESOURCES
scope is required.- Parameters:
penupClient
- The PenupClient instanceresourceCallback
- The ResourceCallbackinstance for receiving the user's profile - Throws:
java.lang.IllegalArgumentException
- Thrown when one of the parameters isnull
.- Since:
- PEN.UP 1.0
-
getMyFollowingArtists
public static void getMyFollowingArtists(PenupClient penupClient, int maxResults, java.lang.String pageToken, ResourceListCallback<ArtistResource> resourceListCallback)
Gets artists whom the user follows.
TheScope.READ_MY_RESOURCES
scope is required.- Parameters:
penupClient
- The PenupClient instancemaxResults
- The maximum number of artists to include in the response, which is used for paging.
The value should be between 1 and 100.pageToken
- The page token obtained from ResourceListCallback for getting the specific page.
Setsnull
to get the first page.resourceListCallback
- The ResourceListCallbackinstance for receiving the artists whom the user follows - Throws:
java.lang.IllegalArgumentException
- Thrown when either of the following conditions has occurred:- The
penupClient
isnull
. - The
maxResults
is less than 1 or greater than 100. - The
resourceListCallback
isnull
.
- The
- Since:
- PEN.UP 1.0
-
getMyFollowers
public static void getMyFollowers(PenupClient penupClient, int maxResults, java.lang.String pageToken, ResourceListCallback<ArtistResource> resourceListCallback)
Gets user's followers.
TheScope.READ_MY_RESOURCES
scope is required.- Parameters:
penupClient
- The PenupClient instancemaxResults
- The maximum number of artists to include in the response, which is used for paging.
The value should be between 1 and 100.pageToken
- The page token obtained from ResourceListCallback for getting the specific page.
Setsnull
to get the first page.resourceListCallback
- The ResourceListCallbackinstance for receiving the user's followers - Throws:
java.lang.IllegalArgumentException
- Thrown when either of the following conditions has occurred:- The
penupClient
isnull
. - The
maxResults
is less than 1 or greater than 100. - The
resourceListCallback
isnull
.
- The
- Since:
- PEN.UP 1.0
-
getPopularArtists
public static void getPopularArtists(PenupClient penupClient, int maxResults, java.lang.String pageToken, ResourceListCallback<ArtistResource> resourceListCallback)
Gets popular artists.
TheScope.READ_RESOURCES
scope is required.- Parameters:
penupClient
- The PenupClient instancemaxResults
- The maximum number of artists to include in the response, which is used for paging.
The value should be between 1 and 100.pageToken
- The page token obtained from ResourceListCallback for getting the specific page.
Setsnull
to get the first page.resourceListCallback
- The ResourceListCallbackinstance for receiving the popular artists - Throws:
java.lang.IllegalArgumentException
- Thrown when either of the following conditions has occurred:- The
penupClient
isnull
. - The
maxResults
is less than 1 or greater than 100. - The
resourceListCallback
isnull
.
- The
- Since:
- PEN.UP 1.0
-
-