bandcamp-fetch/docs/api/classes/SearchAPI.md
2023-10-30 01:25:17 +08:00

8.9 KiB

bandcamp-fetch / SearchAPI

Class: SearchAPI

Hierarchy

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new SearchAPI(params)

Parameters

Name Type
params BaseAPIWithImageSupportParams

Inherited from

BaseAPIWithImageSupport.constructor

Defined in

lib/common/BaseAPIWithImageSupport.ts:12

Accessors

cache

Protected get cache(): Cache

Returns

Cache

Inherited from

BaseAPIWithImageSupport.cache

Defined in

lib/common/BaseAPI.ts:27


imageAPI

get imageAPI(): ImageAPI

Returns

ImageAPI

Inherited from

BaseAPIWithImageSupport.imageAPI

Defined in

lib/common/BaseAPIWithImageSupport.ts:17

Methods

albums

albums(params): Promise<SearchResults<SearchResultAlbum>>

Parameters

Name Type
params SearchAPISearchParams

Returns

Promise<SearchResults<SearchResultAlbum>>

Defined in

lib/search/SearchAPI.ts:34


all

all(params): Promise<SearchResults<SearchResultAny>>

Parameters

Name Type
params SearchAPISearchParams

Returns

Promise<SearchResults<SearchResultAny>>

Defined in

lib/search/SearchAPI.ts:26


artistsAndLabels

artistsAndLabels(params): Promise<SearchResults<SearchResultArtist | SearchResultLabel>>

Parameters

Name Type
params SearchAPISearchParams

Returns

Promise<SearchResults<SearchResultArtist | SearchResultLabel>>

Defined in

lib/search/SearchAPI.ts:30


fans

fans(params): Promise<SearchResults<SearchResultFan>>

Parameters

Name Type
params SearchAPISearchParams

Returns

Promise<SearchResults<SearchResultFan>>

Defined in

lib/search/SearchAPI.ts:42


fetch

Protected fetch(url, jsonResponse, method, payload?): Promise<Response>

Parameters

Name Type
url string
jsonResponse false
method HEAD
payload? undefined

Returns

Promise<Response>

Inherited from

BaseAPIWithImageSupport.fetch

Defined in

lib/common/BaseAPI.ts:20

Protected fetch(url, jsonResponse, method?, payload?): Promise<any>

Parameters

Name Type
url string
jsonResponse true
method? FetchMethod
payload? Record<string, any>

Returns

Promise<any>

Inherited from

BaseAPIWithImageSupport.fetch

Defined in

lib/common/BaseAPI.ts:21

Protected fetch(url, jsonResponse?, method?, payload?): Promise<string>

Parameters

Name Type
url string
jsonResponse? boolean
method? FetchMethod
payload? Record<string, any>

Returns

Promise<string>

Inherited from

BaseAPIWithImageSupport.fetch

Defined in

lib/common/BaseAPI.ts:22


Protected search(params): Promise<SearchResults<SearchResultAlbum>>

Parameters

Name Type
params SearchAPISearchParams & { itemType: Albums }

Returns

Promise<SearchResults<SearchResultAlbum>>

Defined in

lib/search/SearchAPI.ts:50

Protected search(params): Promise<SearchResults<SearchResultTrack>>

Parameters

Name Type
params SearchAPISearchParams & { itemType: Tracks }

Returns

Promise<SearchResults<SearchResultTrack>>

Defined in

lib/search/SearchAPI.ts:51

Protected search(params): Promise<SearchResults<SearchResultFan>>

Parameters

Name Type
params SearchAPISearchParams & { itemType: Fans }

Returns

Promise<SearchResults<SearchResultFan>>

Defined in

lib/search/SearchAPI.ts:52

Protected search(params): Promise<SearchResults<SearchResultAny>>

Parameters

Name Type
params SearchAPISearchParams & { itemType: All }

Returns

Promise<SearchResults<SearchResultAny>>

Defined in

lib/search/SearchAPI.ts:53


tracks

tracks(params): Promise<SearchResults<SearchResultTrack>>

Parameters

Name Type
params SearchAPISearchParams

Returns

Promise<SearchResults<SearchResultTrack>>

Defined in

lib/search/SearchAPI.ts:38