Last active
January 16, 2019 02:05
-
-
Save navi25/f948b2cd70478c617d263a7796f026e3 to your computer and use it in GitHub Desktop.
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
// 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