Package com.skydoves.sandwich
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Properties
Functions
Link copied to clipboard
Link copied to clipboard
fun <T, V> ApiResponse.Failure.Error<T>.map(mapper: ApiErrorModelMapper<V>): V
Content copied to clipboard
fun <T, V> ApiResponse.Failure.Error<T>.map(mapper: (ApiResponse.Failure.Error<T>) -> V): V
Content copied to clipboard
fun <T, V> ApiResponse.Success<T>.map(mapper: ApiSuccessModelMapper<T, V>): V
Content copied to clipboard
fun <T, V> ApiResponse.Success<T>.map(mapper: (ApiResponse.Success<T>) -> V): V
Content copied to clipboard
inline fun <T, V> ApiResponse.Failure.Error<T>.map(mapper: ApiErrorModelMapper<V>, crossinline onResult: V.() -> Unit)
Content copied to clipboard
inline fun <T, V> ApiResponse.Success<T>.map(mapper: ApiSuccessModelMapper<T, V>, crossinline onResult: V.() -> Unit)
Content copied to clipboard
Link copied to clipboard
fun <T, V> ApiResponse<T>.mapSuccess(transformer: T.() -> V): ApiResponse<V>
Content copied to clipboard
Link copied to clipboard
fun <T> ApiResponse<List<T>>.merge(vararg responses: ApiResponse<List<T>>, mergePolicy: ApiResponseMergePolicy = ApiResponseMergePolicy.IGNORE_FAILURE): ApiResponse<List<T>>
Content copied to clipboard
Link copied to clipboard
Returns an error message from the ApiResponse.Failure.Exception that consists of the localized message.
Returns an error message from the ApiResponse.Failure that consists of the localized message.
Link copied to clipboard
inline fun <T> ApiResponse<T>.onError(crossinline onResult: ApiResponse.Failure.Error<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
inline fun <T, V> ApiResponse<T>.onError(mapper: ApiErrorModelMapper<V>, crossinline onResult: V.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline fun <T> ApiResponse<T>.onException(crossinline onResult: ApiResponse.Failure.Exception<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline fun <T> ApiResponse<T>.onFailure(crossinline onResult: ApiResponse.Failure<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline fun <T> ApiResponse<T>.onProcedure( crossinline onSuccess: ApiResponse.Success<T>.() -> Unit, crossinline onError: ApiResponse.Failure.Error<T>.() -> Unit, crossinline onException: ApiResponse.Failure.Exception<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline fun <T> ApiResponse<T>.onSuccess(crossinline onResult: ApiResponse.Success<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
inline fun <T, V> ApiResponse<T>.onSuccess(mapper: ApiSuccessModelMapper<T, V>, crossinline onResult: V.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
fun <T, V : ApiResponseOperator<T>> ApiResponse<T>.operator(apiResponseOperator: V): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T : Any> retry( retry: Int = 1, timeMillis: Long = 1000, execute: () -> ApiResponse<T>): ApiResponse<T>
Content copied to clipboard
Retry the given function execute specified number of times with delays if the execute returns ApiResponse.Failure.
Link copied to clipboard
inline suspend fun <T, V> ApiResponse.Failure.Error<T>.suspendMap(crossinline mapper: suspend (ApiResponse.Failure.Error<T>) -> V): V
Content copied to clipboard
inline suspend fun <T, V> ApiResponse.Success<T>.suspendMap(crossinline mapper: suspend (ApiResponse.Success<T>) -> V): V
Content copied to clipboard
inline suspend fun <T, V> ApiResponse.Failure.Error<T>.suspendMap(mapper: ApiErrorModelMapper<V>, crossinline onResult: suspend V.() -> Unit)
Content copied to clipboard
inline suspend fun <T, V> ApiResponse.Success<T>.suspendMap(mapper: ApiSuccessModelMapper<T, V>, crossinline onResult: suspend V.() -> Unit)
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T> ApiResponse<T>.suspendOnError(crossinline onResult: suspend ApiResponse.Failure.Error<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
inline suspend fun <T, V> ApiResponse<T>.suspendOnError(mapper: ApiErrorModelMapper<V>, crossinline onResult: suspend V.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T> ApiResponse<T>.suspendOnException(crossinline onResult: suspend ApiResponse.Failure.Exception<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T> ApiResponse<T>.suspendOnFailure(crossinline onResult: suspend ApiResponse.Failure<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T> ApiResponse<T>.suspendOnProcedure( crossinline onSuccess: suspend ApiResponse.Success<T>.() -> Unit, crossinline onError: suspend ApiResponse.Failure.Error<T>.() -> Unit, crossinline onException: suspend ApiResponse.Failure.Exception<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T> ApiResponse<T>.suspendOnSuccess(crossinline onResult: suspend ApiResponse.Success<T>.() -> Unit): ApiResponse<T>
Content copied to clipboard
inline suspend fun <T, V> ApiResponse<T>.suspendOnSuccess(mapper: ApiSuccessModelMapper<T, V>, crossinline onResult: suspend V.() -> Unit): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
suspend fun <T, V : ApiResponseSuspendOperator<T>> ApiResponse<T>.suspendOperator(apiResponseOperator: V): ApiResponse<T>
Content copied to clipboard
Link copied to clipboard
inline suspend fun <T, R> ApiResponse<T>.toSuspendFlow(crossinline transformer: suspend T.() -> R): Flow<R>
Content copied to clipboard