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

de.jsone_studios.wrapper.spotify.services.SearchSpotifyService Maven / Gradle / Ivy

The newest version!
package de.jsone_studios.wrapper.spotify.services;

import de.jsone_studios.wrapper.spotify.models.AlbumsPager;
import de.jsone_studios.wrapper.spotify.models.ArtistsPager;
import de.jsone_studios.wrapper.spotify.models.PlaylistsPager;
import de.jsone_studios.wrapper.spotify.models.TracksPager;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

import java.util.Map;

public interface SearchSpotifyService
{
    /**
     * Get Spotify catalog information about albums that match a keyword string.
     *
     * @param q The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=album")
    Call searchAlbums(@Query("q") String q);

    /**
     * Get Spotify catalog information about albums that match a keyword string.
     *
     * @param q       The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @param options Optional parameters. For list of supported parameters see
     *                endpoint documentation
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=album")
    Call searchAlbums(@Query("q") String q, @QueryMap Map options);

    /**
     * Get Spotify catalog information about artists that match a keyword string.
     *
     * @param q The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=artist")
    Call searchArtists(@Query("q") String q);

    /**
     * Get Spotify catalog information about artists that match a keyword string.
     *
     * @param q       The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @param options Optional parameters. For list of supported parameters see
     *                endpoint documentation
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=artist")
    Call searchArtists(@Query("q") String q, @QueryMap Map options);

    /**
     * Get Spotify catalog information about playlists that match a keyword string.
     *
     * @param q The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=playlist")
    Call searchPlaylists(@Query("q") String q);

    /**
     * Get Spotify catalog information about playlists that match a keyword string.
     *
     * @param q       The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @param options Optional parameters. For list of supported parameters see
     *                endpoint documentation
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=playlist")
    Call searchPlaylists(@Query("q") String q, @QueryMap Map options);

    /**
     * Get Spotify catalog information about tracks that match a keyword string.
     *
     * @param q The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=track")
    Call searchTracks(@Query("q") String q);

    /**
     * Get Spotify catalog information about tracks that match a keyword string.
     *
     * @param q       The search query's keywords (and optional field filters and operators), for example "roadhouse+blues"
     * @param options Optional parameters. For list of supported parameters see
     *                endpoint documentation
     * @return A paginated list of results
     * @see Search for an Item
     */
    @GET("search?type=track")
    Call searchTracks(@Query("q") String q, @QueryMap Map options);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy