Change parameter for map in ApiSuccessModelMapper
renaudmathieu opened this issue · comments
Sandwich exposes an interfaceApiSuccessModelMapper
. The map parameter method should be named apiSuccessResponse
instead of apiErrorResponse
package com.skydoves.sandwich
/**
* @author skydoves (Jaewoong Eum)
*
* A mapper interface for mapping [ApiResponse.Success] response as a custom [V] instance model.
*
* @see [ApiSuccessModelMapper](https://github.com/skydoves/sandwich#apierrormodelmapper)
*/
public fun interface ApiSuccessModelMapper<T, V> {
/**
* maps the [ApiResponse.Success] to the [V] using the mapper.
*
* @param apiErrorResponse The [ApiResponse.Success] error response from the network request.
* @return A custom [V] success response model.
*/
public fun map(apiErrorResponse: ApiResponse.Success<T>): V
}
Describe the solution you'd like:
Rename map parameter apiErrorResponse
into apiSuccessResponse
.
@renaudmathieu It was fixed in #78. This fix will be included in the next release. Thank you for reporting this!