ResponseDataSource
Author
skydoves (Jaewoong Eum)
ResponseDataSource is an implementation of the DataSource interface.
Asynchronously send requests and A response data holder from the REST API call. Support observer for the every request responses, concat another DataSource, Retry fetching data when the request gets failure.
Constructors
Properties
Functions
combine a call and callback instances for caching data.
concat an another DataSource and request API call sequentially if the API call getting successful.
sets DataRetainPolicy for limiting retaining data.
invalidate a cached data and re-fetching the API request.
joins onto CompositeDisposable as a disposable. must be called before request.
observes a ApiResponse value from the API call request.
sets value on the worker thread and post the value to the main thread.
request API network call asynchronously. if the request is successful, this data source will hold the success response model. in the next request after success, returns the cached API response. if you need to fetch a new response data or refresh, use invalidate().
extension method for requesting and observing response at once.
combine a call and callback instances for caching data on a CoroutineContext.
combine a call and callback instances for caching data on a CoroutineScope.
extension method for requesting and observing response at once with a CoroutineContext.
extension method for requesting and observing response at once on a CoroutineScope.