Last active
May 27, 2020 04:54
-
-
Save odaridavid/65aa001c7750e3af893025287bf3640a to your computer and use it in GitHub Desktop.
Blog Dynamic Url
This file contains 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
interface StarWarsApiService { | |
@GET("people") | |
suspend fun searchCharacters(@Query("search") params: String): SearchResponse | |
@GET("species/{id}/") | |
suspend fun getSpeciesDetails(@Path("id") speciesId: Int): SpeciesDetailResponse | |
@GET("films/{id}/") | |
suspend fun getFilmDetails(@Path("id") filmsId: Int): FilmDetailResponse | |
@GET("planets/{id}/") | |
suspend fun getPlanetDetails(@Path("id") planetId: Int): PlanetDetailResponse | |
@GET("people/{id}/") | |
suspend fun getFilms(@Path("id") characterId: Int): FilmsResponse | |
@GET("people/{id}/") | |
suspend fun getSpecies(@Path("id") characterId: Int): SpeciesResponse | |
@GET("people/{id}/") | |
suspend fun getPlanet(@Path("id") characterId: Int): PlanetResponse | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment