All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.uwetrottmann.trakt5.services.Search Maven / Gradle / Ivy

There is a newer version: 6.16.0
Show newest version
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
    );

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy