Created
June 18, 2020 16:07
-
-
Save lukaszkalnik/2ce1a80657435311053622cbe2b4fbd5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class EitherCallAdapter<R>( | |
private val successType: Type | |
) : CallAdapter<R, Call<Either<ApiError, R>>> { | |
override fun adapt(call: Call<R>): Call<Either<ApiError, R>> = EitherCall(call, successType) | |
override fun responseType(): Type = successType | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment