Skip to content

Instantly share code, notes, and snippets.

@navi25
Last active January 16, 2019 02:05
Show Gist options
  • Save navi25/f948b2cd70478c617d263a7796f026e3 to your computer and use it in GitHub Desktop.
Save navi25/f948b2cd70478c617d263a7796f026e3 to your computer and use it in GitHub Desktop.
// Data Model for TMDB Movie item
data class TmdbMovie(
val id: Int,
val vote_average: Double,
val title: String,
val overview: String,
val adult: Boolean
)
// Data Model for the Response returned from the TMDB Api
data class TmdbMovieResponse(
val results: List<TmdbMovie>
)
//A retrofit Network Interface for the Api
interface TmdbApi{
@GET("movie/popular")
fun getPopularMovie(): Deferred<Response<TmdbMovieResponse>>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment