Skip to content

Instantly share code, notes, and snippets.

@odaridavid
Last active May 27, 2020 04:54
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/65aa001c7750e3af893025287bf3640a to your computer and use it in GitHub Desktop.
Save odaridavid/65aa001c7750e3af893025287bf3640a 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("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