Skip to content

1.0.4

Choose a tag to compare

@skydoves skydoves released this 17 Jul 11:44
9eefa84

馃帀 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
      }
    }