Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change parameter for map in ApiSuccessModelMapper #77

Closed
renaudmathieu opened this issue Oct 13, 2022 · 1 comment
Closed

Change parameter for map in ApiSuccessModelMapper #77

renaudmathieu opened this issue Oct 13, 2022 · 1 comment
Assignees

Comments

@renaudmathieu
Copy link

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.

@skydoves
Copy link
Owner

@renaudmathieu It was fixed in #78. This fix will be included in the next release. Thank you for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants