SearchApi

open class SearchApi(api: GenericSpotifyApi) : SpotifyEndpoint

Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string. It is possible to have 0 results and no exception thrown with these methods. Check the size of items returned.

Api Reference

Constructors

SearchApi
Link copied to clipboard
common
fun SearchApi(api: GenericSpotifyApi)

Types

SearchType
Link copied to clipboard
common
enum SearchType : Enum<SearchApi.SearchType>
Describes which object to search forApi Reference

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
search
Link copied to clipboard
common
suspend fun search(query: String, vararg searchTypes: SearchApi.SearchType, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null, includeExternal: Boolean? = null): SpotifySearchResult
Get Spotify Catalog information about artists, albums, tracks and/or playlists that match a keyword string.
searchAlbum
Link copied to clipboard
common
suspend fun searchAlbum(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<SimpleAlbum>
Get Spotify Catalog information about albums that match the keyword string.
searchArtist
Link copied to clipboard
common
suspend fun searchArtist(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<Artist>
Get Spotify Catalog information about artists that match the keyword string.
searchPlaylist
Link copied to clipboard
common
suspend fun searchPlaylist(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<SimplePlaylist>
Get Spotify Catalog information about playlists that match the keyword string.
searchTrack
Link copied to clipboard
common
suspend fun searchTrack(query: String, limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, market: Market? = null): PagingObject<Track>
Get Spotify Catalog information about tracks that match the keyword string.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

api
Link copied to clipboard
common
val api: GenericSpotifyApi
cache
Link copied to clipboard
common
val cache: SpotifyCache

Inheritors

ClientSearchApi
Link copied to clipboard

Sources

(source)
Link copied to clipboard