|
|
@ -1,5 +1,6 @@
|
|
|
|
package fr.iut.pm.movieapplication.api
|
|
|
|
package fr.iut.pm.movieapplication.api
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import fr.iut.pm.movieapplication.api.dtos.MovieDTO
|
|
|
|
import fr.iut.pm.movieapplication.api.dtos.MovieResultDTO
|
|
|
|
import fr.iut.pm.movieapplication.api.dtos.MovieResultDTO
|
|
|
|
import fr.iut.pm.movieapplication.api.dtos.PopularDTO
|
|
|
|
import fr.iut.pm.movieapplication.api.dtos.PopularDTO
|
|
|
|
import fr.iut.pm.movieapplication.utils.Constants.Companion.API_KEY
|
|
|
|
import fr.iut.pm.movieapplication.utils.Constants.Companion.API_KEY
|
|
|
@ -13,10 +14,19 @@ interface MovieApplicationAPI {
|
|
|
|
@GET("movie/popular")
|
|
|
|
@GET("movie/popular")
|
|
|
|
fun getPopularMovies(@Query("api_key") apiKey : String = API_KEY) : Call<PopularDTO>
|
|
|
|
fun getPopularMovies(@Query("api_key") apiKey : String = API_KEY) : Call<PopularDTO>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GET("movie/top_rated")
|
|
|
|
|
|
|
|
fun getTopRatedMovies(@Query("api_key") apiKey: String = API_KEY) : Call<PopularDTO>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GET("movie/upcoming")
|
|
|
|
|
|
|
|
fun getUpcomingMovies(@Query("api_key") apiKey: String = API_KEY) : Call<PopularDTO>
|
|
|
|
|
|
|
|
|
|
|
|
@GET("trending/{media_type}/{time_window}")
|
|
|
|
@GET("trending/{media_type}/{time_window}")
|
|
|
|
fun getTrending(@Path("media_type") mediaType : String = "all", @Path("time_window") timeWindow : String = "day", @Query("api_key") apiKey: String = API_KEY ) : Call<PopularDTO>
|
|
|
|
fun getTrending(@Path("media_type") mediaType : String = "all", @Path("time_window") timeWindow : String = "day", @Query("api_key") apiKey: String = API_KEY ) : Call<PopularDTO>
|
|
|
|
|
|
|
|
|
|
|
|
@GET("movie/{movie_id")
|
|
|
|
@GET("movie/{movie_id")
|
|
|
|
fun getMovieDetails(@Path("movie_id") movieId : Int, @Query("api_key") apiKey: String = API_KEY) : Call<MovieResultDTO>
|
|
|
|
fun getMovieDetails(@Path("movie_id") movieId : Int, @Query("api_key") apiKey: String = API_KEY) : Call<MovieDTO>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GET("tv/{tv_id}")
|
|
|
|
|
|
|
|
fun getShowDetails(@Path("tv_id") tvId : Int, @Query("api_key") apiKey: String = API_KEY)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|