public interface FeedManager
Modifier and Type | Interface and Description |
---|---|
static class |
FeedManager.InternalGfycatException
Indicate that there is an internal unhandled error inside Gfycat SDK.
|
static class |
FeedManager.NoSearchResultException
Indicates that there are no [more] results for requested search.
|
Modifier and Type | Method and Description |
---|---|
<any> |
getCategories()
Request categories list from cache.
|
<any> |
getGfycat(java.lang.String gfyId)
Look for a Gfycat in cache.
|
Completable |
getGfycats(FeedIdentifier feedIdentifier)
Perform a network request of Gfycat list for a specified .
|
Completable |
getMoreGfycats(FeedDescription feedDescription)
Perform a network request of more Gfycats for corresponding feed.
|
Completable |
getNewGfycats(FeedDescription feedDescription)
Perform a network request of new Gfycats for a specified .
|
<any> |
observeGfycats(android.content.Context context,
FeedIdentifier feedIdentifier)
Deprecated.
|
<any> |
observeGfycats(FeedIdentifier feedIdentifier)
Subscribe for Gfycat changes in local DB.
|
<any> getCategories()
If found in cache but expired - will return cached one and perform network request for updates.
So, onNext may be called more than once!!!
GfycatCategoriesList
observable.<any> observeGfycats(FeedIdentifier feedIdentifier)
!!! Important: You should NOT forget to unsubscribe, otherwise memory leak will occur.
feedIdentifier
- - to subscribe for.FeedData
flowable.@Deprecated <any> observeGfycats(android.content.Context context, FeedIdentifier feedIdentifier)
observeGfycats(FeedIdentifier)
.
Deprecation reason: Context not required anymore. Target deprecation version: 0.9.0
Completable getGfycats(FeedIdentifier feedIdentifier)
FeedData
containing this request result will be returned via observeGfycats(Context, FeedIdentifier)
observable.
feedIdentifier
- - to get gfycats for.Completable
calling onError in case of failure or onComplete in case of success.Completable getNewGfycats(FeedDescription feedDescription)
FeedData
containing this request result will be returned via observeGfycats(Context, FeedIdentifier)
observable.
NOTE: This works only with FeedDescription
obtained via PublicFeedIdentifier.trending()
.
feedDescription
- from the latest FeedData
received with observeGfycats(Context, FeedIdentifier)
Completable
calling onError in case of failure or onComplete in case of success.Completable getMoreGfycats(FeedDescription feedDescription)
FeedData
containing this request result will be returned via observeGfycats(Context, FeedIdentifier)
observable.
feedDescription
- from latest FeedData
received with observeGfycats(Context, FeedIdentifier)
.Completable
calling onError in case of failure or onComplete in case of success<any> getGfycat(java.lang.String gfyId)
Single
emitting a Gfycat object or null, if not found neither in cache nor during network request.