public class VideogameService extends MediaItemService
MediaItemService.MediaItemInfoCallback, MediaItemService.MediaItemSearchCallback
MAX_SEARCH_RESULTS
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getBaseUrl()
Get the external API base URL
|
static VideogameService |
getInstance(Context context)
Singleton pattern
|
void |
getMediaItemInfo(java.lang.String externalServiceId,
MediaItemService.MediaItemInfoCallback mediaItemInfoCallback)
Allows to get information about a specific media item
|
protected void |
initializeRestInterface(retrofit2.Retrofit retrofit)
Allows the subclasses to initialize the REST interface with the given retrofit instance
|
void |
searchMediaItems(java.lang.String query,
MediaItemService.MediaItemSearchCallback mediaItemSearchCallback)
Allows to search for media items
|
public static VideogameService getInstance(Context context)
protected java.lang.String getBaseUrl()
getBaseUrl
in class MediaItemService
protected void initializeRestInterface(retrofit2.Retrofit retrofit)
initializeRestInterface
in class MediaItemService
retrofit
- the retrofit instancepublic void searchMediaItems(java.lang.String query, MediaItemService.MediaItemSearchCallback mediaItemSearchCallback)
searchMediaItems
in class MediaItemService
query
- the title to searchmediaItemSearchCallback
- the callback that will receive the resultspublic void getMediaItemInfo(java.lang.String externalServiceId, MediaItemService.MediaItemInfoCallback mediaItemInfoCallback)
getMediaItemInfo
in class MediaItemService
externalServiceId
- the external service ID linked with the media itemmediaItemInfoCallback
- the callback that will receive the results