Created
April 27, 2019 14:47
-
-
Save JacquesSmuts/96af861d1096ed8feb8c299d19a623b0 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
import kotlin.reflect.KSuspendFunction1 // You have to import this manually | |
import kotlin.reflect.KSuspendFunction2 // You have to import this manually | |
inline suspend fun <reified Service: RetroService, Result> doSuspendedApiCall( | |
services: List<RetroService>, | |
apiCall: KSuspendFunction1<Service, Result> | |
): Result? { | |
// identical to doApiCall | |
} | |
inline suspend fun <reified Service: RetroService, Input, Result> doSuspendedApiCallWithParam( | |
services: List<RetroService>, | |
apiCall: KSuspendFunction2<Service, Input, Result>, | |
input: Input | |
): Result? { | |
// identical to doApiCallWithParam | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment