Class: Spotify::SearchResource

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

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Spotify::Resource

Instance Method Details

#search(query:, type:, market: nil, limit: nil, offset: nil) ⇒ Object



3
4
5
6
7
8
# File 'lib/spotify/resources/search.rb', line 3

def search(query:, type:, market: nil, limit: nil, offset: nil)
  params = { q: query, type: type, market: market, limit: limit, offset: offset }
  response = get_request("search", params: params)

  Collection.from_search_response(response)
end