Skip to content
Client
Server

Reference / @open-music-sdk/client-user / tSearchLibraryOptions

Interface: tSearchLibraryOptions ​

Defined in: clients/client-user/src/library.ts:48

The options of searchLibrary.

Extends ​

Properties ​

extend? ​

ts
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 ​

tReadOptions.extend


include? ​

ts
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 ​

tReadOptions.include


language? ​

ts
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 ​

tReadOptions.language


limit? ​

ts
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 ​

tReadOptions.limit


offset? ​

ts
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 ​

tReadOptions.offset


params? ​

ts
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 ​

tReadOptions.params


schema? ​

ts
readonly optional schema?: tSchemaLike<tLibrarySearchResponse>;

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 ​

tReadOptions.schema


signal? ​

ts
readonly optional signal?: AbortSignal;

Defined in: packages/core/src/options.ts:49

Aborts the request. An abort is rethrown as it is.

Inherited from ​

tReadOptions.signal


types ​

ts
readonly types: readonly (keyof tLibrarySearchResponseResults)[];

Defined in: clients/client-user/src/library.ts:50

The types of resource to look for, such as ["library-songs", "library-albums"]. There is no default: Apple wants one at least.

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.