com.uwetrottmann.tmdb2.services.MoviesService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tmdb-java Show documentation
Show all versions of tmdb-java Show documentation
tmdb-java is a retrofit2 based wrapper around the themoviedb.org API v3.
package com.uwetrottmann.tmdb2.services;
import com.uwetrottmann.tmdb2.entities.AppendToResponse;
import com.uwetrottmann.tmdb2.entities.Credits;
import com.uwetrottmann.tmdb2.entities.Images;
import com.uwetrottmann.tmdb2.entities.ListResultsPage;
import com.uwetrottmann.tmdb2.entities.Movie;
import com.uwetrottmann.tmdb2.entities.MovieAlternativeTitles;
import com.uwetrottmann.tmdb2.entities.MovieKeywords;
import com.uwetrottmann.tmdb2.entities.MovieResultsPage;
import com.uwetrottmann.tmdb2.entities.ReleaseDate;
import com.uwetrottmann.tmdb2.entities.ReleaseDatesResults;
import com.uwetrottmann.tmdb2.entities.ReviewResultsPage;
import com.uwetrottmann.tmdb2.entities.Translations;
import com.uwetrottmann.tmdb2.entities.Videos;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface MoviesService {
/**
* Get the basic movie information for a specific movie id.
*
* @param tmdbId TMDb id.
* @param language Optional. ISO 639-1 code.
* @param appendToResponse Optional. extra requests to append to the result.
*/
@GET("movie/{id}")
Call summary(
@Path("id") int tmdbId,
@Query("language") String language,
@Query("append_to_response") AppendToResponse appendToResponse
);
/**
* Get the alternative titles for a specific movie id.
*
* @param tmdbId TMDb id.
* @param country Optional. ISO 3166-1 code.
*/
@GET("movie/{id}/alternative_titles")
Call alternativeTitles(
@Path("id") int tmdbId,
@Query("country") String country
);
/**
* Get the cast and crew information for a specific movie id.
*
* @param tmdbId TMDb id.
*/
@GET("movie/{id}/credits")
Call credits(
@Path("id") int tmdbId
);
/**
* Get the images (posters and backdrops) for a specific movie id.
*
* @param tmdbId TMDb id.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/{id}/images")
Call images(
@Path("id") int tmdbId,
@Query("language") String language
);
/**
* Get the plot keywords for a specific movie id.
*
* @param tmdbId TMDb id.
*/
@GET("movie/{id}/keywords")
Call keywords(
@Path("id") int tmdbId
);
/**
* Get the release dates, certifications and related information by country for a specific movie id.
*
* The results are keyed by iso_3166_1 code and contain a type value which on our system, maps to:
* {@link ReleaseDate#TYPE_PREMIERE}, {@link ReleaseDate#TYPE_THEATRICAL_LIMITED},
* {@link ReleaseDate#TYPE_THEATRICAL}, {@link ReleaseDate#TYPE_DIGITAL}, {@link ReleaseDate#TYPE_PHYSICAL},
* {@link ReleaseDate#TYPE_TV}
*
* @param tmdbId TMDb id.
*/
@GET("movie/{id}/release_dates")
Call releaseDates(
@Path("id") int tmdbId
);
/**
* Get the videos (trailers, teasers, clips, etc...) for a specific movie id.
*
* @param tmdbId TMDb id.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/{id}/videos")
Call videos(
@Path("id") int tmdbId,
@Query("language") String language
);
/**
* Get the translations for a specific movie id.
*
* @param tmdbId TMDb id.
* @param appendToResponse Optional. extra requests to append to the result.
*/
@GET("movie/{id}/translations")
Call translations(
@Path("id") int tmdbId,
@Query("append_to_response") AppendToResponse appendToResponse
);
/**
* Get the similar movies for a specific movie id.
*
* @param tmdbId TMDb id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/{id}/similar")
Call similar(
@Path("id") int tmdbId,
@Query("page") Integer page,
@Query("language") String language
);
/**
* Get the reviews for a particular movie id.
*
* @param tmdbId TMDb id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/{id}/reviews")
Call reviews(
@Path("id") int tmdbId,
@Query("page") Integer page,
@Query("language") String language
);
/**
* Get the lists that the movie belongs to.
*
* @param tmdbId TMDb id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/{id}/lists")
Call lists(
@Path("id") int tmdbId,
@Query("page") Integer page,
@Query("language") String language
);
/**
* Get the latest movie id.
*/
@GET("movie/latest")
Call latest();
/**
* Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will
* include is 100.
*
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/upcoming")
Call upcoming(
@Query("page") Integer page,
@Query("language") String language
);
/**
* Get the list of movies playing in theaters. This list refreshes every day. The maximum number of items this list
* will include is 100.
*
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/now_playing")
Call nowPlaying(
@Query("page") Integer page,
@Query("language") String language
);
/**
* Get the list of popular movies on The Movie Database. This list refreshes every day.
*
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/popular")
Call popular(
@Query("page") Integer page,
@Query("language") String language
);
/**
* Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This
* list refreshes every day.
*
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
*/
@GET("movie/top_rated")
Call topRated(
@Query("page") Integer page,
@Query("language") String language
);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy