com.uwetrottmann.tmdb2.services.AccountService Maven / Gradle / Ivy
Show all versions of tmdb-java Show documentation
package com.uwetrottmann.tmdb2.services;
import com.uwetrottmann.tmdb2.entities.Account;
import com.uwetrottmann.tmdb2.entities.FavoriteMedia;
import com.uwetrottmann.tmdb2.entities.ListResultsPage;
import com.uwetrottmann.tmdb2.entities.MovieResultsPage;
import com.uwetrottmann.tmdb2.entities.Status;
import com.uwetrottmann.tmdb2.entities.TvEpisodeResultsPage;
import com.uwetrottmann.tmdb2.entities.TvShowResultsPage;
import com.uwetrottmann.tmdb2.entities.WatchlistMedia;
import com.uwetrottmann.tmdb2.enumerations.SortBy;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface AccountService {
/**
* Get your account details.
*
* Requires an active Session.
*/
@GET("account")
Call summary();
/**
* Get all of the lists created by an account. Will include private lists if you are the owner.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
*/
@GET("account/{account_id}/lists")
Call lists(
@Path("account_id") Integer accountId
);
/**
* Get the list of your favorite movies.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
* @param sortBy Optional. Sort the results. Allowed Value(s): created_at.asc, created_at.desc
*/
@GET("account/{account_id}/favorite/movies")
Call favoriteMovies(
@Path("account_id") Integer accountId,
@Query("language") String language,
@Query("sort_by") SortBy sortBy,
@Query("page") Integer page
);
/**
* Get the list of your favorite TV shows.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id..
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
* @param sortBy Optional. Sort the results. Allowed Value(s): created_at.asc, created_at.desc
*/
@GET("account/{account_id}/favorite/tv")
Call favoriteTvShows(
@Path("account_id") Integer accountId,
@Query("language") String language,
@Query("sort_by") SortBy sortBy,
@Query("page") Integer page
);
/**
* Adds a movie or TV show as a favorite item.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param favorite {@link FavoriteMedia FavoriteMedia} Object to define the MediaType and MediaId of the item you are adding on your favorite list.
*/
@POST("account/{account_id}/favorite")
Call favorite(
@Path("account_id") Integer accountId,
@Body FavoriteMedia favorite
);
/**
* Get a list of all the movies you have rated.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
* @param sortBy Optional. Sort the results. Allowed Value(s): created_at.asc, created_at.desc
*/
@GET("account/{account_id}/rated/movies")
Call ratedMovies(
@Path("account_id") Integer accountId,
@Query("language") String language,
@Query("sort_by") SortBy sortBy,
@Query("page") Integer page
);
/**
* Get a list of all the TV shows you have rated.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
* @param sortBy Optional. Sort the results. Allowed Value(s): created_at.asc, created_at.desc
*/
@GET("account/{account_id}/rated/tv")
Call ratedTvShows(
@Path("account_id") Integer accountId,
@Query("language") String language,
@Query("sort_by") SortBy sortBy,
@Query("page") Integer page
);
/**
* Get a list of all the TV episodes you have rated.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
* @param sortBy Optional. Sort the results. Allowed Value(s): created_at.asc, created_at.desc
*/
@GET("account/{account_id}/rated/tv/episodes")
Call ratedTvShowEpisodes(
@Path("account_id") Integer accountId,
@Query("language") String language,
@Query("sort_by") SortBy sortBy,
@Query("page") Integer page
);
/**
* Get a list of all the movies you have added to your watchlist.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
* @param sortBy Optional. Sort the results. Allowed Value(s): created_at.asc, created_at.desc
*/
@GET("account/{account_id}/watchlist/movies")
Call watchlistMovies(
@Path("account_id") Integer accountId,
@Query("language") String language,
@Query("sort_by") SortBy sortBy,
@Query("page") Integer page
);
/**
* Get a list of all the TV shows you have added to your watchlist.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param page Optional. Minimum value is 1, expected value is an integer.
* @param language Optional. ISO 639-1 code.
* @param sortBy Optional. Sort the results. Allowed Value(s): created_at.asc, created_at.desc
*/
@GET("account/{account_id}/watchlist/tv")
Call watchlistTvShows(
@Path("account_id") Integer accountId,
@Query("language") String language,
@Query("sort_by") SortBy sortBy,
@Query("page") Integer page
);
/**
* Adds a movie or TV show to your watchlist.
*
* Requires an active Session.
*
* @param accountId Optional. Account TMDb Id.
* @param watchlist {@link WatchlistMedia WatchListMedia} Object to define the MediaType and MediaId of the item you are adding on your watchlist.
*/
@POST("account/{account_id}/watchlist")
Call watchlist(
@Path("account_id") Integer accountId,
@Body WatchlistMedia watchlist
);
}