com.uwetrottmann.trakt5.services.Search 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.SearchResult;
import com.uwetrottmann.trakt5.enums.Extended;
import com.uwetrottmann.trakt5.enums.IdType;
import com.uwetrottmann.trakt5.enums.Type;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
import java.util.List;
public interface Search {
/**
* Search all text fields that a media object contains (i.e. title, overview, etc). Results are ordered by the most relevant score.
*
* @see Search - Text Query
* @see Filters
* @see Extended
* @see Pagination
*/
@GET("search/{type}")
Call> textQuery(
@Path("type") Type type,
@Query("query") String query,
@Query("years") String years,
@Query("genres") String genres,
@Query("languages") String languages,
@Query("countries") String countries,
@Query("runtimes") String runtimes,
@Query("ratings") String ratings,
@Query("extended") Extended extended,
@Query("page") Integer page,
@Query("limit") Integer limit
);
/**
* @see #textQuery textQuery
*/
@GET("search/movie")
Call> textQueryMovie(
@Query("query") String query,
@Query("years") String years,
@Query("genres") String genres,
@Query("languages") String languages,
@Query("countries") String countries,
@Query("runtimes") String runtimes,
@Query("ratings") String ratings,
@Query("certifications") String certifications,
@Query("extended") Extended extended,
@Query("page") Integer page,
@Query("limit") Integer limit
);
/**
* @see #textQuery textQuery
*/
@GET("search/show")
Call> textQueryShow(
@Query("query") String query,
@Query("years") String years,
@Query("genres") String genres,
@Query("languages") String languages,
@Query("countries") String countries,
@Query("runtimes") String runtimes,
@Query("ratings") String ratings,
@Query("certifications") String certifications,
@Query("networks") String networks,
@Query("status") String status,
@Query("extended") Extended extended,
@Query("page") Integer page,
@Query("limit") Integer limit
);
/**
* Lookup items by their Trakt, IMDB, TMDB, TVDB, or TVRage ID.
*
* @see Search - ID Lookup
* @see Extended
* @see Pagination
*/
@GET("search/{id_type}/{id}")
Call> idLookup(
@Path(value = "id_type", encoded = true) IdType idType,
@Path(value = "id", encoded = true) String id,
@Query("type") Type type,
@Query("extended") Extended extended,
@Query("page") Integer page,
@Query("limit") Integer limit
);
}