Class: Spotted::Resources::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/spotted/resources/search.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Search

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Search.

Parameters:



46
47
48
# File 'lib/spotted/resources/search.rb', line 46

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(q: , type: , include_external: nil, limit: nil, market: nil, offset: nil, request_options: {}) ⇒ Spotted::Models::SearchRetrieveResponse

Some parameter documentations has been truncated, see Models::SearchRetrieveParams for more details.

Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks that match a keyword string. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

Parameters:

Returns:

See Also:



32
33
34
35
36
37
38
39
40
41
# File 'lib/spotted/resources/search.rb', line 32

def retrieve(params)
  parsed, options = Spotted::SearchRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: "search",
    query: parsed,
    model: Spotted::Models::SearchRetrieveResponse,
    options: options
  )
end