Skip to content

Instantly share code, notes, and snippets.

@odaridavid
Last active May 27, 2020 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odaridavid/62e5c543b2a7f60ff3b402a3d192ca06 to your computer and use it in GitHub Desktop.
Save odaridavid/62e5c543b2a7f60ff3b402a3d192ca06 to your computer and use it in GitHub Desktop.
Blog Dynamic Url
interface StarWarsApiService {
@GET("people")
suspend fun searchCharacters(@Query("search") params: String): SearchResponse
@GET
suspend fun getSpeciesDetails(@Url speciesUrl: String): SpecieDetailsResponse
@GET
suspend fun getFilmDetails(@Url filmsUrl: String): FilmDetailsResponse
@GET
suspend fun getPlanetDetails(@Url planetUrl: String): PlanetDetailsResponse
@GET
suspend fun getFilms(@Url characterUrl: String): FilmsResponse
@GET
suspend fun getSpecies(@Url characterUrl: String): SpeciesResponse
@GET
suspend fun getPlanet(@Url characterUrl: String): PlanetResponse
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment