com.uwetrottmann.trakt5.services.Episodes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trakt-java Show documentation
Show all versions of trakt-java Show documentation
trakt-java is a retrofit2 based wrapper around the trakt API v2.
package com.uwetrottmann.trakt5.services;
import com.uwetrottmann.trakt5.entities.Comment;
import com.uwetrottmann.trakt5.entities.Episode;
import com.uwetrottmann.trakt5.entities.Ratings;
import com.uwetrottmann.trakt5.entities.Stats;
import com.uwetrottmann.trakt5.enums.Extended;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
import java.util.List;
public interface Episodes {
/**
* Returns a single episode's details.
*
* @param showId trakt ID, trakt slug, or IMDB ID. Example: "game-of-thrones".
* @param season Season number.
* @param episode Episode number.
*/
@GET("shows/{id}/seasons/{season}/episodes/{episode}")
Call summary(
@Path("id") String showId,
@Path("season") int season,
@Path("episode") int episode,
@Query(value = "extended", encoded = true) Extended extended
);
/**
* Returns all top level comments for an episode. Most recent comments returned first.
*
* @param showId trakt ID, trakt slug, or IMDB ID. Example: "game-of-thrones".
* @param season Season number.
* @param episode Episode number.
*/
@GET("shows/{id}/seasons/{season}/episodes/{episode}/comments")
Call> comments(
@Path("id") String showId,
@Path("season") int season,
@Path("episode") int episode,
@Query("page") Integer page,
@Query("limit") Integer limit,
@Query(value = "extended", encoded = true) Extended extended
);
/**
* Returns rating (between 0 and 10) and distribution for an episode.
*
* @param showId trakt ID, trakt slug, or IMDB ID. Example: "game-of-thrones".
* @param season Season number.
* @param episode Episode number.
*/
@GET("shows/{id}/seasons/{season}/episodes/{episode}/ratings")
Call ratings(
@Path("id") String showId,
@Path("season") int season,
@Path("episode") int episode
);
/**
* Returns lots of episode stats.
*/
@GET("shows/{id}/seasons/{season}/episodes/{episode}/stats")
Call stats(
@Path("id") String showId,
@Path("season") int season,
@Path("episode") int episode
);
}