public abstract class MediaItemService
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
MediaItemService.MediaItemInfoCallback
Callback called when the external service media item details are available
|
static interface |
MediaItemService.MediaItemSearchCallback
Callback called when the external service search results are available
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_SEARCH_RESULTS |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.String |
getBaseUrl()
Get the external API base URL
|
abstract void |
getMediaItemInfo(java.lang.String externalServiceId,
MediaItemService.MediaItemInfoCallback mediaItemInfoCallback)
Allows to get information about a specific media item
|
protected abstract void |
initializeRestInterface(retrofit2.Retrofit retrofit)
Allows the subclasses to initialize the REST interface with the given retrofit instance
|
abstract void |
searchMediaItems(java.lang.String query,
MediaItemService.MediaItemSearchCallback mediaItemSearchCallback)
Allows to search for media items
|
public static final int MAX_SEARCH_RESULTS
protected abstract java.lang.String getBaseUrl()
protected abstract void initializeRestInterface(retrofit2.Retrofit retrofit)
retrofit
- the retrofit instancepublic abstract void searchMediaItems(java.lang.String query, MediaItemService.MediaItemSearchCallback mediaItemSearchCallback)
query
- the title to searchmediaItemSearchCallback
- the callback that will receive the resultspublic abstract void getMediaItemInfo(java.lang.String externalServiceId, MediaItemService.MediaItemInfoCallback mediaItemInfoCallback)
externalServiceId
- the external service ID linked with the media itemmediaItemInfoCallback
- the callback that will receive the results