1.0.4
馃帀 Released a new version 1.0.4! 馃帀
What's New?
Added suspendOnSuccess, suspendOnFailure, suspendOnException extensions of the ApiResponse.
We can use them for handling suspend functions inside the lambda.
In this case, we should use with CoroutinesResponseCallAdapterFactory.
flow {
val response = disneyService.fetchDisneyPosterList()
response.suspendOnSuccess {
emit(data)
}.suspendOnError {
// stub error case
}.suspendOnFailure {
// stub exception case
}
}