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

com.uwetrottmann.tmdb2.services.SearchService Maven / Gradle / Ivy

The newest version!
package com.uwetrottmann.tmdb2.services;

import com.uwetrottmann.tmdb2.entities.CollectionResultsPage;
import com.uwetrottmann.tmdb2.entities.CompanyResultsPage;
import com.uwetrottmann.tmdb2.entities.KeywordResultsPage;
import com.uwetrottmann.tmdb2.entities.MediaResultsPage;
import com.uwetrottmann.tmdb2.entities.MovieResultsPage;
import com.uwetrottmann.tmdb2.entities.PersonResultsPage;
import com.uwetrottmann.tmdb2.entities.TvShowResultsPage;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface SearchService {

    /**
     * Search for companies.
     *
     * @see Documentation
     */
    @GET("search/company")
    Call company(
            @Query("query") String query,
            @Query("page") Integer page
    );

    /**
     * Search for collections.
     *
     * @see Documentation
     */
    @GET("search/collection")
    Call collection(
            @Query("query") String query,
            @Query("page") Integer page,
            @Query("language") String language
    );

    /**
     * Search for keywords.
     *
     * @see Documentation
     */
    @GET("search/keyword")
    Call keyword(
            @Query("query") String query,
            @Query("page") Integer page
    );

    /**
     * Search for movies.
     *
     * @see Documentation
     */
    @GET("search/movie")
    Call movie(
            @Query("query") String query,
            @Query("page") Integer page,
            @Query("language") String language,
            @Query("region") String region,
            @Query("include_adult") Boolean includeAdult,
            @Query("year") Integer year,
            @Query("primary_release_year") Integer primaryReleaseYear
    );

    /**
     * Search multiple models in a single request.
     * Multi search currently supports searching for movies,
     * tv shows and people in a single request.
     *
     * @see Documentation
     */
    @GET("search/multi")
    Call multi(
            @Query("query") String query,
            @Query("page") Integer page,
            @Query("language") String language,
            @Query("region") String region,
            @Query("include_adult") Boolean includeAdult
    );

    /**
     * Search for people.
     *
     * @see Documentation
     */
    @GET("search/person")
    Call person(
            @Query("query") String query,
            @Query("page") Integer page,
            @Query("language") String language,
            @Query("region") String region,
            @Query("include_adult") Boolean includeAdult
    );

    /**
     * Search for TV shows.
     *
     * @see Documentation
     */
    @GET("search/tv")
    Call tv(
            @Query("query") String query,
            @Query("page") Integer page,
            @Query("language") String language,
            @Query("first_air_date_year") Integer firstAirDateYear,
            @Query("include_adult") Boolean includeAdult
    );
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy