Reference / @open-music-sdk/client-catalog / tSearchCatalogOptions
Interface: tSearchCatalogOptions
Defined in: clients/client-catalog/src/discover.ts:23
The options of searchCatalog.
Extends
Properties
extend?
readonly optional extend?: readonly string[];Defined in: packages/core/src/options.ts:26
The attributes to add to those sent by default, such as ["artistUrl"]: at most 300 names, each of 1 to 64 characters with no comma in it. An empty list is none, and is not sent.
Inherited from
include?
readonly optional include?: readonly string[];Defined in: packages/core/src/options.ts:21
The relationships to send in full with each resource, such as ["albums", "artists"]: at most 300 names, each of 1 to 64 characters with no comma in it. An empty list is none, and is not sent.
Inherited from
language?
readonly optional language?: string;Defined in: packages/core/src/options.ts:16
The language to answer in, as a tag the storefront supports, such as "en-GB": a string of 1 to 64 characters, sent as l. Default: the storefront's own.
Inherited from
limit?
readonly optional limit?: number;Defined in: packages/core/src/options.ts:28
How many to send in one answer: a whole number above zero. Apple sets the default and the most.
Inherited from
offset?
readonly optional offset?: string | number;Defined in: packages/core/src/options.ts:30
Where in the collection to start: a whole number from zero, or a cursor as Apple gave it, of 1 to 256 characters.
Inherited from
params?
readonly optional params?: Readonly<Record<string,
| string
| number
| boolean
| readonly (string | number)[]
| null
| undefined>>;Defined in: packages/core/src/options.ts:42
Any other query parameter, sent as given: what Apple takes and no option here names. An option that is given, or an argument of the function, wins over the same key here.
It is a plain object of at most 100 parameters; a Map or a URLSearchParams is a TypeError, where it would otherwise be read as no parameters at all. A name is one as Apple writes them, such as ids[albums] or limit[songs:tracks]: a letter, then letters, digits, -, _, . and :, with any part in brackets after, in at most 64 characters. A name that does not fit is described in the error, not repeated. A value is a string of at most 256 characters, a number, true or false, or a list of at most 300 numbers and strings, each string of 1 to 64 characters with no comma in it. null, undefined and an empty list are not sent.
Inherited from
schema?
readonly optional schema?: tSchemaLike<tSearchResponse>;Defined in: packages/core/src/options.ts:47
Validates the answer; a failure throws ValidationError. Any Standard Schema, such as a validator from @open-music-sdk/validate: an object or a function with a validate function under ~standard.
Inherited from
signal?
readonly optional signal?: AbortSignal;Defined in: packages/core/src/options.ts:49
Aborts the request. An abort is rethrown as it is.
Inherited from
storefront?
readonly optional storefront?: string;Defined in: packages/core/src/endpoint.ts:367
The storefront whose catalog is asked, by its id, such as "gb". Default: the client's, which is the one it was created with, or else the listener's, which the client looks up once.
Inherited from
types
readonly types: readonly tCatalogSearchType[];Defined in: clients/client-catalog/src/discover.ts:25
The types of resource to look for, such as ["songs", "albums"]. There is no default: Apple wants one at least.
with?
readonly optional with?: readonly "topResults"[];Defined in: clients/client-catalog/src/discover.ts:27
What to send beside the results by type: ["topResults"] for the best matches of any type, under results.top.