Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created April 11, 2022 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skydoves/601274f0cdb2f01928f75fd91909defe to your computer and use it in GitHub Desktop.
Save skydoves/601274f0cdb2f01928f75fd91909defe to your computer and use it in GitHub Desktop.
network_result_call_adapter
class NetworkResultCallAdapter(
private val resultType: Type
) : CallAdapter<Type, Call<NetworkResult<Type>>> {
override fun responseType(): Type = resultType
override fun adapt(call: Call<Type>): Call<NetworkResult<Type>> {
return NetworkResultCall(call)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment