Class: Spotted::Models::SearchQueryParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/spotted/models/search_query_params.rb

Overview

Defined Under Namespace

Modules: IncludeExternal, Type

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from Spotted::Internal::Type::BaseModel

Instance Attribute Details

#include_external ⇒ Symbol, ...

If include_external=audio is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response.



44
# File 'lib/spotted/models/search_query_params.rb', line 44

optional :include_external, enum: -> { Spotted::SearchQueryParams::IncludeExternal }

#limit ⇒ Integer?

The maximum number of results to return in each item type.

Returns:

  • (Integer, nil)


50
# File 'lib/spotted/models/search_query_params.rb', line 50

optional :limit, Integer

#market ⇒ String?

An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned.
If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
_Note: If neither market or user country are provided, the content is considered unavailable for the client._
Users can view the country that is associated with their account in the account settings.

Returns:

  • (String, nil)


64
# File 'lib/spotted/models/search_query_params.rb', line 64

optional :market, String

#offset ⇒ Integer?

The index of the first result to return. Use with limit to get the next page of search results.

Returns:

  • (Integer, nil)


71
# File 'lib/spotted/models/search_query_params.rb', line 71

optional :offset, Integer

#q ⇒ String

Your search query.

You can narrow down your search using field filters. The available filters are album, artist, track, year, upc, tag:hipster, tag:new, isrc, and genre. Each field filter only applies to certain result types.

The artist and year filters can be used while searching albums, artists and tracks. You can filter on a single year or a range (e.g. 1955-1960).
The album filter can be used while searching albums and tracks.
The genre filter can be used while searching artists and tracks.
The isrc and track filters can be used while searching tracks.
The upc, tag:new and tag:hipster filters can only be used while searching albums. The tag:new filter will return albums released in the past two weeks and tag:hipster can be used to return only albums with the lowest 10% popularity.

Returns:

  • (String)


27
# File 'lib/spotted/models/search_query_params.rb', line 27

required :q, String

#type ⇒ Array<Symbol, Spotted::Models::SearchQueryParams::Type>

A comma-separated list of item types to search across. Search results include hits from all the specified item types. For example: q=abacab&type=album,track returns both albums and tracks matching "abacab".

Returns:



35
# File 'lib/spotted/models/search_query_params.rb', line 35

required :type, -> { Spotted::Internal::Type::ArrayOf[enum: Spotted::SearchQueryParams::Type] }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/spotted/models/search_query_params.rb', line 102