Skip to content

Instantly share code, notes, and snippets.

@murattuzel
Last active November 6, 2021 20:02
Show Gist options
  • Save murattuzel/aa55344ea1b1b7ff884a200ecdd74094 to your computer and use it in GitHub Desktop.
Save murattuzel/aa55344ea1b1b7ff884a200ecdd74094 to your computer and use it in GitHub Desktop.
Attaching a tag for GET method.
enum class MockRequestType(val filePath: String) {
MOVIES(MovieService.MOVIES)
}
interface MovieService {
@GET(MOVIES)
suspend fun fetchMovies(
@Tag type: MockRequestType = MockRequestType.MOVIES
): MoviesResponse
companion object {
const val MOVIES = "local/response_movies_success.json"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment