From 913d4ff533fc193930bea05f4453606905c70a89 Mon Sep 17 00:00:00 2001 From: patrickkfkan Date: Sat, 28 Oct 2023 20:55:26 +0800 Subject: [PATCH] Add cookie support + make bcfetch instantiable --- .gitignore | 1 + docs/api/README.md | 52 ++-- docs/api/classes/AlbumAPI.md | 118 ++++++++- docs/api/classes/ArticleAPI.md | 126 +++++++++- docs/api/classes/AutocompleteAPI.md | 107 +++++++- docs/api/classes/BandAPI.md | 126 +++++++++- docs/api/classes/BandcampFetch.md | 234 ++++++++++++++++++ docs/api/classes/BaseAPI.md | 99 ++++++++ docs/api/classes/BaseAPIWithImageSupport.md | 144 +++++++++++ docs/api/classes/Cache.md | 182 +++++++++++++- docs/api/classes/CacheWrapper.md | 92 +++++++ docs/api/classes/DiscoveryAPI.md | 126 +++++++++- docs/api/classes/FanAPI.md | 134 +++++++++- docs/api/classes/FetchError.md | 49 ++++ docs/api/classes/Fetcher.md | 110 ++++++++ docs/api/classes/ImageAPI.md | 103 +++++++- docs/api/classes/Limiter.md | 70 ++++++ docs/api/classes/LimiterAlbumAPI.md | 110 +++++++- docs/api/classes/LimiterArticleAPI.md | 118 ++++++++- docs/api/classes/LimiterAutocompleteAPI.md | 99 +++++++- docs/api/classes/LimiterBandAPI.md | 118 ++++++++- docs/api/classes/LimiterDiscoveryAPI.md | 118 ++++++++- docs/api/classes/LimiterFanAPI.md | 126 +++++++++- docs/api/classes/LimiterImageAPI.md | 95 ++++++- docs/api/classes/LimiterSearchAPI.md | 142 +++++++++-- docs/api/classes/LimiterShowAPI.md | 114 ++++++++- docs/api/classes/LimiterTagAPI.md | 126 +++++++++- docs/api/classes/LimiterTrackAPI.md | 110 +++++++- docs/api/classes/SearchAPI.md | 150 +++++++++-- docs/api/classes/ShowAPI.md | 122 ++++++++- docs/api/classes/TagAPI.md | 134 +++++++++- docs/api/classes/TrackAPI.md | 118 ++++++++- docs/api/enums/AutocompleteItemType.md | 4 +- docs/api/enums/CacheDataType.md | 4 +- docs/api/enums/FetchMethod.md | 30 +++ docs/api/enums/ImageFormatFilter.md | 4 +- docs/api/enums/SearchItemType.md | 10 +- docs/api/interfaces/Album.md | 34 +-- docs/api/interfaces/AlbumAPIGetInfoParams.md | 8 +- docs/api/interfaces/AlbumHighlightsByTag.md | 6 +- docs/api/interfaces/AlbumRelease.md | 10 +- docs/api/interfaces/Article.md | 22 +- .../interfaces/ArticleAPIGetArticleParams.md | 8 +- docs/api/interfaces/ArticleAPIListParams.md | 6 +- docs/api/interfaces/ArticleCategory.md | 4 +- docs/api/interfaces/ArticleCategorySection.md | 8 +- docs/api/interfaces/ArticleList.md | 8 +- docs/api/interfaces/ArticleListItem.md | 10 +- docs/api/interfaces/ArticleSection.md | 8 +- docs/api/interfaces/Artist.md | 16 +- docs/api/interfaces/AutoCompleteTag.md | 8 +- .../AutocompleteAPIGetSuggestionsParams.md | 6 +- docs/api/interfaces/AutocompleteItem.md | 4 +- docs/api/interfaces/AutocompleteLocation.md | 8 +- .../interfaces/BandAPIGetDiscographyParams.md | 4 +- docs/api/interfaces/BandAPIGetInfoParams.md | 6 +- .../BandAPIGetLabelArtistsParams.md | 4 +- docs/api/interfaces/BandcampFetchParams.md | 19 ++ docs/api/interfaces/BaseAPIParams.md | 36 +++ .../BaseAPIWithImageSupportParams.md | 55 ++++ docs/api/interfaces/DiscoverOptions.md | 14 +- docs/api/interfaces/DiscoverParams.md | 20 +- docs/api/interfaces/DiscoverResult.md | 6 +- docs/api/interfaces/Fan.md | 24 +- docs/api/interfaces/FanAPIGetInfoParams.md | 4 +- docs/api/interfaces/FanAPIGetItemsParams.md | 4 +- .../interfaces/FanContinuationItemsResult.md | 4 +- docs/api/interfaces/FanItemsContinuation.md | 4 +- docs/api/interfaces/FanPageItemsResult.md | 6 +- docs/api/interfaces/FetcherParams.md | 30 +++ docs/api/interfaces/ImageConstants.md | 4 +- docs/api/interfaces/ImageFormat.md | 10 +- docs/api/interfaces/Label.md | 14 +- docs/api/interfaces/MediaKind.md | 16 +- docs/api/interfaces/NameValuePair.md | 4 +- docs/api/interfaces/ReleasesByTag-1.md | 6 +- docs/api/interfaces/ReleasesByTag.Filter.md | 4 +- .../interfaces/ReleasesByTag.FilterOption.md | 8 +- docs/api/interfaces/SearchAPISearchParams.md | 8 +- docs/api/interfaces/SearchResultAlbum.md | 18 +- docs/api/interfaces/SearchResultArtist.md | 14 +- docs/api/interfaces/SearchResultFan.md | 10 +- docs/api/interfaces/SearchResultItem.md | 8 +- docs/api/interfaces/SearchResultLabel.md | 10 +- docs/api/interfaces/SearchResultTrack.md | 16 +- docs/api/interfaces/SearchResults.md | 4 +- docs/api/interfaces/Show.md | 26 +- docs/api/interfaces/ShowAPIGetShowParams.md | 8 +- docs/api/interfaces/ShowAPIListParams.md | 2 +- docs/api/interfaces/Tag.md | 14 +- .../TagAPIGetAlbumHighlightsParams.md | 4 +- .../api/interfaces/TagAPIGetReleasesParams.md | 10 +- docs/api/interfaces/TagList.md | 4 +- docs/api/interfaces/Track.md | 28 +-- docs/api/interfaces/TrackAPIGetInfoParams.md | 8 +- docs/api/interfaces/UserKind.md | 10 +- package-lock.json | 31 ++- package.json | 2 + src/index.ts | 69 ++---- src/lib/BandcampFetch.ts | 142 +++++++++++ src/lib/album/AlbumAPI.ts | 28 ++- src/lib/article/ArticleAPI.ts | 40 +-- src/lib/autocomplete/AutocompleteAPI.ts | 38 +-- src/lib/band/BandAPI.ts | 60 +++-- src/lib/common/BaseAPI.ts | 28 +++ src/lib/common/BaseAPIWithImageSupport.ts | 20 ++ src/lib/discovery/DiscoveryAPI.ts | 47 ++-- src/lib/fan/FanAPI.ts | 65 ++--- src/lib/image/ImageAPI.ts | 31 ++- src/lib/search/SearchAPI.ts | 60 +++-- src/lib/show/ShowAPI.ts | 40 +-- src/lib/tag/TagAPI.ts | 67 ++--- src/lib/track/TrackAPI.ts | 26 +- src/lib/utils/Cache.ts | 7 +- src/lib/utils/Fetch.ts | 81 ------ src/lib/utils/Fetcher.ts | 118 +++++++++ src/lib/utils/Limiter.ts | 23 +- 117 files changed, 4533 insertions(+), 897 deletions(-) create mode 100644 docs/api/classes/BandcampFetch.md create mode 100644 docs/api/classes/BaseAPI.md create mode 100644 docs/api/classes/BaseAPIWithImageSupport.md create mode 100644 docs/api/classes/CacheWrapper.md create mode 100644 docs/api/classes/FetchError.md create mode 100644 docs/api/classes/Fetcher.md create mode 100644 docs/api/classes/Limiter.md create mode 100644 docs/api/enums/FetchMethod.md create mode 100644 docs/api/interfaces/BandcampFetchParams.md create mode 100644 docs/api/interfaces/BaseAPIParams.md create mode 100644 docs/api/interfaces/BaseAPIWithImageSupportParams.md create mode 100644 docs/api/interfaces/FetcherParams.md create mode 100644 src/lib/BandcampFetch.ts create mode 100644 src/lib/common/BaseAPI.ts create mode 100644 src/lib/common/BaseAPIWithImageSupport.ts delete mode 100644 src/lib/utils/Fetch.ts create mode 100644 src/lib/utils/Fetcher.ts diff --git a/.gitignore b/.gitignore index b947077..7ba286e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ dist/ +test/ diff --git a/docs/api/README.md b/docs/api/README.md index 00cda4a..5cd42de 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -12,6 +12,7 @@ bandcamp-fetch - [AutocompleteItemType](enums/AutocompleteItemType.md) - [CacheDataType](enums/CacheDataType.md) +- [FetchMethod](enums/FetchMethod.md) - [ImageFormatFilter](enums/ImageFormatFilter.md) - [SearchItemType](enums/SearchItemType.md) @@ -21,10 +22,17 @@ bandcamp-fetch - [ArticleAPI](classes/ArticleAPI.md) - [AutocompleteAPI](classes/AutocompleteAPI.md) - [BandAPI](classes/BandAPI.md) +- [BandcampFetch](classes/BandcampFetch.md) +- [BaseAPI](classes/BaseAPI.md) +- [BaseAPIWithImageSupport](classes/BaseAPIWithImageSupport.md) - [Cache](classes/Cache.md) +- [CacheWrapper](classes/CacheWrapper.md) - [DiscoveryAPI](classes/DiscoveryAPI.md) - [FanAPI](classes/FanAPI.md) +- [FetchError](classes/FetchError.md) +- [Fetcher](classes/Fetcher.md) - [ImageAPI](classes/ImageAPI.md) +- [Limiter](classes/Limiter.md) - [LimiterAlbumAPI](classes/LimiterAlbumAPI.md) - [LimiterArticleAPI](classes/LimiterArticleAPI.md) - [LimiterAutocompleteAPI](classes/LimiterAutocompleteAPI.md) @@ -63,6 +71,9 @@ bandcamp-fetch - [BandAPIGetDiscographyParams](interfaces/BandAPIGetDiscographyParams.md) - [BandAPIGetInfoParams](interfaces/BandAPIGetInfoParams.md) - [BandAPIGetLabelArtistsParams](interfaces/BandAPIGetLabelArtistsParams.md) +- [BandcampFetchParams](interfaces/BandcampFetchParams.md) +- [BaseAPIParams](interfaces/BaseAPIParams.md) +- [BaseAPIWithImageSupportParams](interfaces/BaseAPIWithImageSupportParams.md) - [DiscoverOptions](interfaces/DiscoverOptions.md) - [DiscoverParams](interfaces/DiscoverParams.md) - [DiscoverResult](interfaces/DiscoverResult.md) @@ -72,6 +83,7 @@ bandcamp-fetch - [FanContinuationItemsResult](interfaces/FanContinuationItemsResult.md) - [FanItemsContinuation](interfaces/FanItemsContinuation.md) - [FanPageItemsResult](interfaces/FanPageItemsResult.md) +- [FetcherParams](interfaces/FetcherParams.md) - [ImageConstants](interfaces/ImageConstants.md) - [ImageFormat](interfaces/ImageFormat.md) - [Label](interfaces/Label.md) @@ -115,7 +127,7 @@ bandcamp-fetch #### Defined in -[lib/types/Article.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L51) +[lib/types/Article.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L51) ___ @@ -125,7 +137,7 @@ ___ #### Defined in -[lib/types/Label.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Label.ts#L9) +[lib/types/Label.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Label.ts#L9) ___ @@ -135,44 +147,14 @@ ___ #### Defined in -[lib/types/Search.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L47) +[lib/types/Search.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L47) ## Variables ### default -• **default**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `album` | typeof [`AlbumAPI`](classes/AlbumAPI.md) | -| `article` | typeof [`ArticleAPI`](classes/ArticleAPI.md) | -| `autocomplete` | typeof [`AutocompleteAPI`](classes/AutocompleteAPI.md) | -| `band` | typeof [`BandAPI`](classes/BandAPI.md) | -| `cache` | typeof [`Cache`](classes/Cache.md) | -| `discovery` | typeof [`DiscoveryAPI`](classes/DiscoveryAPI.md) | -| `fan` | typeof [`FanAPI`](classes/FanAPI.md) | -| `image` | typeof [`ImageAPI`](classes/ImageAPI.md) | -| `limiter` | { `album`: typeof [`LimiterAlbumAPI`](classes/LimiterAlbumAPI.md) = LimiterAlbumAPI; `article`: typeof [`LimiterArticleAPI`](classes/LimiterArticleAPI.md) = LimiterArticleAPI; `autocomplete`: typeof [`LimiterAutocompleteAPI`](classes/LimiterAutocompleteAPI.md) = LimiterAutocompleteAPI; `band`: typeof [`LimiterBandAPI`](classes/LimiterBandAPI.md) = LimiterBandAPI; `discovery`: typeof [`LimiterDiscoveryAPI`](classes/LimiterDiscoveryAPI.md) = LimiterDiscoveryAPI; `fan`: typeof [`LimiterFanAPI`](classes/LimiterFanAPI.md) = LimiterFanAPI; `image`: typeof [`LimiterImageAPI`](classes/LimiterImageAPI.md) = LimiterImageAPI; `search`: typeof [`LimiterSearchAPI`](classes/LimiterSearchAPI.md) = LimiterSearchAPI; `show`: typeof [`LimiterShowAPI`](classes/LimiterShowAPI.md) = LimiterShowAPI; `tag`: typeof [`LimiterTagAPI`](classes/LimiterTagAPI.md) = LimiterTagAPI; `track`: typeof [`LimiterTrackAPI`](classes/LimiterTrackAPI.md) = LimiterTrackAPI; `updateSettings`: (`options?`: `ConstructorOptions`) => `void` } | -| `limiter.album` | typeof [`LimiterAlbumAPI`](classes/LimiterAlbumAPI.md) | -| `limiter.article` | typeof [`LimiterArticleAPI`](classes/LimiterArticleAPI.md) | -| `limiter.autocomplete` | typeof [`LimiterAutocompleteAPI`](classes/LimiterAutocompleteAPI.md) | -| `limiter.band` | typeof [`LimiterBandAPI`](classes/LimiterBandAPI.md) | -| `limiter.discovery` | typeof [`LimiterDiscoveryAPI`](classes/LimiterDiscoveryAPI.md) | -| `limiter.fan` | typeof [`LimiterFanAPI`](classes/LimiterFanAPI.md) | -| `limiter.image` | typeof [`LimiterImageAPI`](classes/LimiterImageAPI.md) | -| `limiter.search` | typeof [`LimiterSearchAPI`](classes/LimiterSearchAPI.md) | -| `limiter.show` | typeof [`LimiterShowAPI`](classes/LimiterShowAPI.md) | -| `limiter.tag` | typeof [`LimiterTagAPI`](classes/LimiterTagAPI.md) | -| `limiter.track` | typeof [`LimiterTrackAPI`](classes/LimiterTrackAPI.md) | -| `limiter.updateSettings` | (`options?`: `ConstructorOptions`) => `void` | -| `search` | typeof [`SearchAPI`](classes/SearchAPI.md) | -| `show` | typeof [`ShowAPI`](classes/ShowAPI.md) | -| `tag` | typeof [`TagAPI`](classes/TagAPI.md) | -| `track` | typeof [`TrackAPI`](classes/TrackAPI.md) | +• **default**: [`BandcampFetch`](classes/BandcampFetch.md) #### Defined in -[index.ts:82](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/index.ts#L82) +[index.ts:68](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/index.ts#L68) diff --git a/docs/api/classes/AlbumAPI.md b/docs/api/classes/AlbumAPI.md index edca534..143b05a 100644 --- a/docs/api/classes/AlbumAPI.md +++ b/docs/api/classes/AlbumAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`AlbumAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterAlbumAPI`](LimiterAlbumAPI.md) + ↳ **`AlbumAPI`** + + ↳↳ [`LimiterAlbumAPI`](LimiterAlbumAPI.md) ## Table of contents @@ -14,21 +16,127 @@ - [constructor](AlbumAPI.md#constructor) +### Accessors + +- [cache](AlbumAPI.md#cache) +- [imageAPI](AlbumAPI.md#imageapi) + ### Methods +- [fetch](AlbumAPI.md#fetch) - [getInfo](AlbumAPI.md#getinfo) ## Constructors ### constructor -• **new AlbumAPI**() +• **new AlbumAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Album`](../interfaces/Album.md)\> +▸ **getInfo**(`params`): `Promise`<[`Album`](../interfaces/Album.md)\> #### Parameters @@ -42,4 +150,4 @@ #### Defined in -[lib/album/AlbumAPI.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/album/AlbumAPI.ts#L16) +[lib/album/AlbumAPI.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/album/AlbumAPI.ts#L16) diff --git a/docs/api/classes/ArticleAPI.md b/docs/api/classes/ArticleAPI.md index a92acf5..f1ff10d 100644 --- a/docs/api/classes/ArticleAPI.md +++ b/docs/api/classes/ArticleAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`ArticleAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterArticleAPI`](LimiterArticleAPI.md) + ↳ **`ArticleAPI`** + + ↳↳ [`LimiterArticleAPI`](LimiterArticleAPI.md) ## Table of contents @@ -14,8 +16,14 @@ - [constructor](ArticleAPI.md#constructor) +### Accessors + +- [cache](ArticleAPI.md#cache) +- [imageAPI](ArticleAPI.md#imageapi) + ### Methods +- [fetch](ArticleAPI.md#fetch) - [getArticle](ArticleAPI.md#getarticle) - [getCategories](ArticleAPI.md#getcategories) - [list](ArticleAPI.md#list) @@ -24,13 +32,113 @@ ### constructor -• **new ArticleAPI**() +• **new ArticleAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getArticle -▸ `Static` **getArticle**(`params`): `Promise`<[`Article`](../interfaces/Article.md)\> +▸ **getArticle**(`params`): `Promise`<[`Article`](../interfaces/Article.md)\> #### Parameters @@ -44,13 +152,13 @@ #### Defined in -[lib/article/ArticleAPI.ts:32](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L32) +[lib/article/ArticleAPI.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L31) ___ ### getCategories -▸ `Static` **getCategories**(): `Promise`<[`ArticleCategorySection`](../interfaces/ArticleCategorySection.md)[]\> +▸ **getCategories**(): `Promise`<[`ArticleCategorySection`](../interfaces/ArticleCategorySection.md)[]\> #### Returns @@ -58,13 +166,13 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L27) +[lib/article/ArticleAPI.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L26) ___ ### list -▸ `Static` **list**(`params?`): `Promise`<[`ArticleList`](../interfaces/ArticleList.md)\> +▸ **list**(`params?`): `Promise`<[`ArticleList`](../interfaces/ArticleList.md)\> #### Parameters @@ -78,4 +186,4 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:44](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L44) +[lib/article/ArticleAPI.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L43) diff --git a/docs/api/classes/AutocompleteAPI.md b/docs/api/classes/AutocompleteAPI.md index 546bd14..05f05c4 100644 --- a/docs/api/classes/AutocompleteAPI.md +++ b/docs/api/classes/AutocompleteAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`AutocompleteAPI`** +- [`BaseAPI`](BaseAPI.md) - ↳ [`LimiterAutocompleteAPI`](LimiterAutocompleteAPI.md) + ↳ **`AutocompleteAPI`** + + ↳↳ [`LimiterAutocompleteAPI`](LimiterAutocompleteAPI.md) ## Table of contents @@ -14,21 +16,108 @@ - [constructor](AutocompleteAPI.md#constructor) +### Accessors + +- [cache](AutocompleteAPI.md#cache) + ### Methods +- [fetch](AutocompleteAPI.md#fetch) - [getSuggestions](AutocompleteAPI.md#getsuggestions) ## Constructors ### constructor -• **new AutocompleteAPI**() +• **new AutocompleteAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIParams`](../interfaces/BaseAPIParams.md) | + +#### Inherited from + +[BaseAPI](BaseAPI.md).[constructor](BaseAPI.md#constructor) + +#### Defined in + +[lib/common/BaseAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L14) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPI](BaseAPI.md).[fetch](BaseAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPI](BaseAPI.md).[fetch](BaseAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getSuggestions -▸ `Static` **getSuggestions**(`params`): `Promise`<[`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> +▸ **getSuggestions**(`params`): `Promise`<[`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> #### Parameters @@ -42,9 +131,9 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L20) +[lib/autocomplete/AutocompleteAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L21) -▸ `Static` **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[]\> +▸ **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[]\> #### Parameters @@ -58,9 +147,9 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L21) +[lib/autocomplete/AutocompleteAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L22) -▸ `Static` **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[] \| [`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> +▸ **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[] \| [`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> #### Parameters @@ -74,4 +163,4 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L22) +[lib/autocomplete/AutocompleteAPI.ts:23](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L23) diff --git a/docs/api/classes/BandAPI.md b/docs/api/classes/BandAPI.md index 940c588..e75e621 100644 --- a/docs/api/classes/BandAPI.md +++ b/docs/api/classes/BandAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`BandAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterBandAPI`](LimiterBandAPI.md) + ↳ **`BandAPI`** + + ↳↳ [`LimiterBandAPI`](LimiterBandAPI.md) ## Table of contents @@ -14,8 +16,14 @@ - [constructor](BandAPI.md#constructor) +### Accessors + +- [cache](BandAPI.md#cache) +- [imageAPI](BandAPI.md#imageapi) + ### Methods +- [fetch](BandAPI.md#fetch) - [getDiscography](BandAPI.md#getdiscography) - [getInfo](BandAPI.md#getinfo) - [getLabelArtists](BandAPI.md#getlabelartists) @@ -24,13 +32,113 @@ ### constructor -• **new BandAPI**() +• **new BandAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getDiscography -▸ `Static` **getDiscography**(`params`): `Promise`<([`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md))[]\> +▸ **getDiscography**(`params`): `Promise`<([`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md))[]\> #### Parameters @@ -44,13 +152,13 @@ #### Defined in -[lib/band/BandAPI.ts:32](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L32) +[lib/band/BandAPI.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L31) ___ ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Label`](../interfaces/Label.md) \| [`Artist`](../interfaces/Artist.md)\> +▸ **getInfo**(`params`): `Promise`<[`Label`](../interfaces/Label.md) \| [`Artist`](../interfaces/Artist.md)\> #### Parameters @@ -64,13 +172,13 @@ ___ #### Defined in -[lib/band/BandAPI.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L43) +[lib/band/BandAPI.ts:42](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L42) ___ ### getLabelArtists -▸ `Static` **getLabelArtists**(`params`): `Promise`<[`LabelArtist`](../README.md#labelartist)[]\> +▸ **getLabelArtists**(`params`): `Promise`<[`LabelArtist`](../README.md#labelartist)[]\> #### Parameters @@ -84,4 +192,4 @@ ___ #### Defined in -[lib/band/BandAPI.ts:86](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L86) +[lib/band/BandAPI.ts:85](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L85) diff --git a/docs/api/classes/BandcampFetch.md b/docs/api/classes/BandcampFetch.md new file mode 100644 index 0000000..c47832c --- /dev/null +++ b/docs/api/classes/BandcampFetch.md @@ -0,0 +1,234 @@ +[bandcamp-fetch](../README.md) / BandcampFetch + +# Class: BandcampFetch + +## Table of contents + +### Constructors + +- [constructor](BandcampFetch.md#constructor) + +### Properties + +- [album](BandcampFetch.md#album) +- [article](BandcampFetch.md#article) +- [autocomplete](BandcampFetch.md#autocomplete) +- [band](BandcampFetch.md#band) +- [discovery](BandcampFetch.md#discovery) +- [fan](BandcampFetch.md#fan) +- [image](BandcampFetch.md#image) +- [limiter](BandcampFetch.md#limiter) +- [search](BandcampFetch.md#search) +- [show](BandcampFetch.md#show) +- [tag](BandcampFetch.md#tag) +- [track](BandcampFetch.md#track) + +### Accessors + +- [cache](BandcampFetch.md#cache) +- [cookie](BandcampFetch.md#cookie) + +### Methods + +- [setCookie](BandcampFetch.md#setcookie) + +## Constructors + +### constructor + +• **new BandcampFetch**(`params?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params?` | [`BandcampFetchParams`](../interfaces/BandcampFetchParams.md) | + +#### Defined in + +[lib/BandcampFetch.ts:56](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L56) + +## Properties + +### album + +• `Readonly` **album**: [`AlbumAPI`](AlbumAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:29](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L29) + +___ + +### article + +• `Readonly` **article**: [`ArticleAPI`](ArticleAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L35) + +___ + +### autocomplete + +• `Readonly` **autocomplete**: [`AutocompleteAPI`](AutocompleteAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:39](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L39) + +___ + +### band + +• `Readonly` **band**: [`BandAPI`](BandAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L33) + +___ + +### discovery + +• `Readonly` **discovery**: [`DiscoveryAPI`](DiscoveryAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L31) + +___ + +### fan + +• `Readonly` **fan**: [`FanAPI`](FanAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L37) + +___ + +### image + +• `Readonly` **image**: [`ImageAPI`](ImageAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:32](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L32) + +___ + +### limiter + +• `Readonly` **limiter**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `album` | [`LimiterAlbumAPI`](LimiterAlbumAPI.md) | +| `article` | [`LimiterArticleAPI`](LimiterArticleAPI.md) | +| `autocomplete` | [`LimiterAutocompleteAPI`](LimiterAutocompleteAPI.md) | +| `band` | [`LimiterBandAPI`](LimiterBandAPI.md) | +| `discovery` | [`LimiterDiscoveryAPI`](LimiterDiscoveryAPI.md) | +| `fan` | [`LimiterFanAPI`](LimiterFanAPI.md) | +| `image` | [`LimiterImageAPI`](LimiterImageAPI.md) | +| `search` | [`LimiterSearchAPI`](LimiterSearchAPI.md) | +| `show` | [`LimiterShowAPI`](LimiterShowAPI.md) | +| `tag` | [`LimiterTagAPI`](LimiterTagAPI.md) | +| `track` | [`LimiterTrackAPI`](LimiterTrackAPI.md) | +| `updateSettings` | (`options?`: `ConstructorOptions`) => `void` | + +#### Defined in + +[lib/BandcampFetch.ts:41](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L41) + +___ + +### search + +• `Readonly` **search**: [`SearchAPI`](SearchAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L38) + +___ + +### show + +• `Readonly` **show**: [`ShowAPI`](ShowAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:36](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L36) + +___ + +### tag + +• `Readonly` **tag**: [`TagAPI`](TagAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:34](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L34) + +___ + +### track + +• `Readonly` **track**: [`TrackAPI`](TrackAPI.md) + +#### Defined in + +[lib/BandcampFetch.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L30) + +## Accessors + +### cache + +• `get` **cache**(): [`CacheWrapper`](CacheWrapper.md) + +#### Returns + +[`CacheWrapper`](CacheWrapper.md) + +#### Defined in + +[lib/BandcampFetch.ts:118](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L118) + +___ + +### cookie + +• `get` **cookie**(): `undefined` \| ``null`` \| `string` + +#### Returns + +`undefined` \| ``null`` \| `string` + +#### Defined in + +[lib/BandcampFetch.ts:114](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L114) + +## Methods + +### setCookie + +▸ **setCookie**(`value?`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value?` | ``null`` \| `string` | + +#### Returns + +`void` + +#### Defined in + +[lib/BandcampFetch.ts:109](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L109) diff --git a/docs/api/classes/BaseAPI.md b/docs/api/classes/BaseAPI.md new file mode 100644 index 0000000..537e440 --- /dev/null +++ b/docs/api/classes/BaseAPI.md @@ -0,0 +1,99 @@ +[bandcamp-fetch](../README.md) / BaseAPI + +# Class: BaseAPI + +## Hierarchy + +- **`BaseAPI`** + + ↳ [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) + + ↳ [`ImageAPI`](ImageAPI.md) + + ↳ [`AutocompleteAPI`](AutocompleteAPI.md) + +## Table of contents + +### Constructors + +- [constructor](BaseAPI.md#constructor) + +### Accessors + +- [cache](BaseAPI.md#cache) + +### Methods + +- [fetch](BaseAPI.md#fetch) + +## Constructors + +### constructor + +• **new BaseAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIParams`](../interfaces/BaseAPIParams.md) | + +#### Defined in + +[lib/common/BaseAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L14) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +## Methods + +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) diff --git a/docs/api/classes/BaseAPIWithImageSupport.md b/docs/api/classes/BaseAPIWithImageSupport.md new file mode 100644 index 0000000..2951557 --- /dev/null +++ b/docs/api/classes/BaseAPIWithImageSupport.md @@ -0,0 +1,144 @@ +[bandcamp-fetch](../README.md) / BaseAPIWithImageSupport + +# Class: BaseAPIWithImageSupport + +## Hierarchy + +- [`BaseAPI`](BaseAPI.md) + + ↳ **`BaseAPIWithImageSupport`** + + ↳↳ [`AlbumAPI`](AlbumAPI.md) + + ↳↳ [`ArticleAPI`](ArticleAPI.md) + + ↳↳ [`BandAPI`](BandAPI.md) + + ↳↳ [`DiscoveryAPI`](DiscoveryAPI.md) + + ↳↳ [`FanAPI`](FanAPI.md) + + ↳↳ [`ShowAPI`](ShowAPI.md) + + ↳↳ [`TagAPI`](TagAPI.md) + + ↳↳ [`TrackAPI`](TrackAPI.md) + + ↳↳ [`SearchAPI`](SearchAPI.md) + +## Table of contents + +### Constructors + +- [constructor](BaseAPIWithImageSupport.md#constructor) + +### Accessors + +- [cache](BaseAPIWithImageSupport.md#cache) +- [imageAPI](BaseAPIWithImageSupport.md#imageapi) + +### Methods + +- [fetch](BaseAPIWithImageSupport.md#fetch) + +## Constructors + +### constructor + +• **new BaseAPIWithImageSupport**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Overrides + +[BaseAPI](BaseAPI.md).[constructor](BaseAPI.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + +## Methods + +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPI](BaseAPI.md).[fetch](BaseAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPI](BaseAPI.md).[fetch](BaseAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) diff --git a/docs/api/classes/Cache.md b/docs/api/classes/Cache.md index 818dc2e..f6fa467 100644 --- a/docs/api/classes/Cache.md +++ b/docs/api/classes/Cache.md @@ -11,20 +11,37 @@ ### Methods - [clear](Cache.md#clear) -- [setMaxPages](Cache.md#setmaxpages) +- [get](Cache.md#get) +- [getKeys](Cache.md#getkeys) +- [getMaxEntries](Cache.md#getmaxentries) +- [getOrSet](Cache.md#getorset) +- [put](Cache.md#put) +- [reduceEntries](Cache.md#reduceentries) +- [setMaxEntries](Cache.md#setmaxentries) - [setTTL](Cache.md#setttl) ## Constructors ### constructor -• **new Cache**() +• **new Cache**(`ttl`, `maxEntries`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `ttl` | `Record`<[`CacheDataType`](../enums/CacheDataType.md), `number`\> | +| `maxEntries` | `Record`<`string`, `number`\> | + +#### Defined in + +[lib/utils/Cache.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L13) ## Methods ### clear -▸ `Static` **clear**(`type?`): `void` +▸ **clear**(`type?`): `void` #### Parameters @@ -38,19 +55,143 @@ #### Defined in -[index.ts:69](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/index.ts#L69) +[lib/utils/Cache.ts:74](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L74) ___ -### setMaxPages +### get -▸ `Static` **setMaxPages**(`maxPages`): `void` +▸ **get**<`T`\>(`type`, `key`): `undefined` \| `T` + +#### Type parameters + +| Name | +| :------ | +| `T` | #### Parameters | Name | Type | | :------ | :------ | -| `maxPages` | `number` | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | +| `key` | `string` | + +#### Returns + +`undefined` \| `T` + +#### Defined in + +[lib/utils/Cache.ts:39](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L39) + +___ + +### getKeys + +▸ **getKeys**(`type`): `string`[] + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | + +#### Returns + +`string`[] + +#### Defined in + +[lib/utils/Cache.ts:70](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L70) + +___ + +### getMaxEntries + +▸ **getMaxEntries**(`type`): `number` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | + +#### Returns + +`number` + +#### Defined in + +[lib/utils/Cache.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L35) + +___ + +### getOrSet + +▸ **getOrSet**<`T`\>(`type`, `key`, `promiseCallback`): `Promise`<`T`\> + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | +| `key` | `string` | +| `promiseCallback` | () => `Promise`<`T`\> | + +#### Returns + +`Promise`<`T`\> + +#### Defined in + +[lib/utils/Cache.ts:85](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L85) + +___ + +### put + +▸ **put**<`T`\>(`type`, `key`, `value`): `boolean` + +#### Type parameters + +| Name | +| :------ | +| `T` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | +| `key` | `string` | +| `value` | `T` | + +#### Returns + +`boolean` + +#### Defined in + +[lib/utils/Cache.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L43) + +___ + +### reduceEntries + +▸ **reduceEntries**(`type`, `reduceTo?`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | +| `reduceTo?` | `number` | #### Returns @@ -58,13 +199,34 @@ ___ #### Defined in -[index.ts:77](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/index.ts#L77) +[lib/utils/Cache.ts:58](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L58) + +___ + +### setMaxEntries + +▸ **setMaxEntries**(`type`, `maxEntries`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | +| `maxEntries` | `number` | + +#### Returns + +`void` + +#### Defined in + +[lib/utils/Cache.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L30) ___ ### setTTL -▸ `Static` **setTTL**(`type`, `ttl`): `void` +▸ **setTTL**(`type`, `ttl`): `void` #### Parameters @@ -79,4 +241,4 @@ ___ #### Defined in -[index.ts:73](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/index.ts#L73) +[lib/utils/Cache.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L21) diff --git a/docs/api/classes/CacheWrapper.md b/docs/api/classes/CacheWrapper.md new file mode 100644 index 0000000..ce3ee53 --- /dev/null +++ b/docs/api/classes/CacheWrapper.md @@ -0,0 +1,92 @@ +[bandcamp-fetch](../README.md) / CacheWrapper + +# Class: CacheWrapper + +## Table of contents + +### Constructors + +- [constructor](CacheWrapper.md#constructor) + +### Methods + +- [clear](CacheWrapper.md#clear) +- [setMaxPages](CacheWrapper.md#setmaxpages) +- [setTTL](CacheWrapper.md#setttl) + +## Constructors + +### constructor + +• **new CacheWrapper**(`cache`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `cache` | [`Cache`](Cache.md) | + +#### Defined in + +[lib/BandcampFetch.ts:127](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L127) + +## Methods + +### clear + +▸ **clear**(`type?`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type?` | [`CacheDataType`](../enums/CacheDataType.md) | + +#### Returns + +`void` + +#### Defined in + +[lib/BandcampFetch.ts:131](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L131) + +___ + +### setMaxPages + +▸ **setMaxPages**(`maxPages`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `maxPages` | `number` | + +#### Returns + +`void` + +#### Defined in + +[lib/BandcampFetch.ts:139](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L139) + +___ + +### setTTL + +▸ **setTTL**(`type`, `ttl`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type` | [`CacheDataType`](../enums/CacheDataType.md) | +| `ttl` | `number` | + +#### Returns + +`void` + +#### Defined in + +[lib/BandcampFetch.ts:135](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L135) diff --git a/docs/api/classes/DiscoveryAPI.md b/docs/api/classes/DiscoveryAPI.md index 493b667..b08cd29 100644 --- a/docs/api/classes/DiscoveryAPI.md +++ b/docs/api/classes/DiscoveryAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`DiscoveryAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterDiscoveryAPI`](LimiterDiscoveryAPI.md) + ↳ **`DiscoveryAPI`** + + ↳↳ [`LimiterDiscoveryAPI`](LimiterDiscoveryAPI.md) ## Table of contents @@ -14,9 +16,15 @@ - [constructor](DiscoveryAPI.md#constructor) +### Accessors + +- [cache](DiscoveryAPI.md#cache) +- [imageAPI](DiscoveryAPI.md#imageapi) + ### Methods - [discover](DiscoveryAPI.md#discover) +- [fetch](DiscoveryAPI.md#fetch) - [getAvailableOptions](DiscoveryAPI.md#getavailableoptions) - [sanitizeDiscoverParams](DiscoveryAPI.md#sanitizediscoverparams) @@ -24,13 +32,63 @@ ### constructor -• **new DiscoveryAPI**() +• **new DiscoveryAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods ### discover -▸ `Static` **discover**(`params?`): `Promise`<[`DiscoverResult`](../interfaces/DiscoverResult.md)\> +▸ **discover**(`params?`): `Promise`<[`DiscoverResult`](../interfaces/DiscoverResult.md)\> #### Parameters @@ -44,13 +102,63 @@ #### Defined in -[lib/discovery/DiscoveryAPI.ts:76](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/discovery/DiscoveryAPI.ts#L76) +[lib/discovery/DiscoveryAPI.ts:76](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/discovery/DiscoveryAPI.ts#L76) + +___ + +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) ___ ### getAvailableOptions -▸ `Static` **getAvailableOptions**(): `Promise`<[`DiscoverOptions`](../interfaces/DiscoverOptions.md)\> +▸ **getAvailableOptions**(): `Promise`<[`DiscoverOptions`](../interfaces/DiscoverOptions.md)\> #### Returns @@ -58,13 +166,13 @@ ___ #### Defined in -[lib/discovery/DiscoveryAPI.ts:24](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/discovery/DiscoveryAPI.ts#L24) +[lib/discovery/DiscoveryAPI.ts:24](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/discovery/DiscoveryAPI.ts#L24) ___ ### sanitizeDiscoverParams -▸ `Static` **sanitizeDiscoverParams**(`params?`): `Promise`<[`DiscoverParams`](../interfaces/DiscoverParams.md)\> +▸ **sanitizeDiscoverParams**(`params?`): `Promise`<[`DiscoverParams`](../interfaces/DiscoverParams.md)\> #### Parameters @@ -78,4 +186,4 @@ ___ #### Defined in -[lib/discovery/DiscoveryAPI.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/discovery/DiscoveryAPI.ts#L31) +[lib/discovery/DiscoveryAPI.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/discovery/DiscoveryAPI.ts#L31) diff --git a/docs/api/classes/FanAPI.md b/docs/api/classes/FanAPI.md index 8aa9826..a454941 100644 --- a/docs/api/classes/FanAPI.md +++ b/docs/api/classes/FanAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`FanAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterFanAPI`](LimiterFanAPI.md) + ↳ **`FanAPI`** + + ↳↳ [`LimiterFanAPI`](LimiterFanAPI.md) ## Table of contents @@ -14,8 +16,14 @@ - [constructor](FanAPI.md#constructor) +### Accessors + +- [cache](FanAPI.md#cache) +- [imageAPI](FanAPI.md#imageapi) + ### Methods +- [fetch](FanAPI.md#fetch) - [getCollection](FanAPI.md#getcollection) - [getFollowingArtistsAndLabels](FanAPI.md#getfollowingartistsandlabels) - [getFollowingGenres](FanAPI.md#getfollowinggenres) @@ -26,13 +34,113 @@ ### constructor -• **new FanAPI**() +• **new FanAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getCollection -▸ `Static` **getCollection**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> +▸ **getCollection**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> #### Parameters @@ -46,13 +154,13 @@ #### Defined in -[lib/fan/FanAPI.ts:52](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L52) +[lib/fan/FanAPI.ts:52](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L52) ___ ### getFollowingArtistsAndLabels -▸ `Static` **getFollowingArtistsAndLabels**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\>\> +▸ **getFollowingArtistsAndLabels**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\>\> #### Parameters @@ -66,13 +174,13 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:72](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L72) +[lib/fan/FanAPI.ts:72](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L72) ___ ### getFollowingGenres -▸ `Static` **getFollowingGenres**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`Tag`](../interfaces/Tag.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`Tag`](../interfaces/Tag.md)\>\> +▸ **getFollowingGenres**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`Tag`](../interfaces/Tag.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`Tag`](../interfaces/Tag.md)\>\> #### Parameters @@ -86,13 +194,13 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:82](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L82) +[lib/fan/FanAPI.ts:82](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L82) ___ ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Fan`](../interfaces/Fan.md)\> +▸ **getInfo**(`params`): `Promise`<[`Fan`](../interfaces/Fan.md)\> #### Parameters @@ -106,13 +214,13 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:41](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L41) +[lib/fan/FanAPI.ts:41](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L41) ___ ### getWishlist -▸ `Static` **getWishlist**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> +▸ **getWishlist**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> #### Parameters @@ -126,4 +234,4 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:62](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L62) +[lib/fan/FanAPI.ts:62](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L62) diff --git a/docs/api/classes/FetchError.md b/docs/api/classes/FetchError.md new file mode 100644 index 0000000..b8f6caa --- /dev/null +++ b/docs/api/classes/FetchError.md @@ -0,0 +1,49 @@ +[bandcamp-fetch](../README.md) / FetchError + +# Class: FetchError + +## Hierarchy + +- `Error` + + ↳ **`FetchError`** + +## Table of contents + +### Constructors + +- [constructor](FetchError.md#constructor) + +### Properties + +- [code](FetchError.md#code) + +## Constructors + +### constructor + +• **new FetchError**(`payload`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `payload` | `any` | + +#### Overrides + +Error.constructor + +#### Defined in + +[lib/utils/Fetcher.ts:106](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L106) + +## Properties + +### code + +• `Optional` **code**: `number` + +#### Defined in + +[lib/utils/Fetcher.ts:104](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L104) diff --git a/docs/api/classes/Fetcher.md b/docs/api/classes/Fetcher.md new file mode 100644 index 0000000..5638af4 --- /dev/null +++ b/docs/api/classes/Fetcher.md @@ -0,0 +1,110 @@ +[bandcamp-fetch](../README.md) / Fetcher + +# Class: Fetcher + +## Table of contents + +### Constructors + +- [constructor](Fetcher.md#constructor) + +### Accessors + +- [cookie](Fetcher.md#cookie) + +### Methods + +- [fetch](Fetcher.md#fetch) +- [setCookie](Fetcher.md#setcookie) + +## Constructors + +### constructor + +• **new Fetcher**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`FetcherParams`](../interfaces/FetcherParams.md) | + +#### Defined in + +[lib/utils/Fetcher.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L20) + +## Accessors + +### cookie + +• `get` **cookie**(): `undefined` \| ``null`` \| `string` + +#### Returns + +`undefined` \| ``null`` \| `string` + +#### Defined in + +[lib/utils/Fetcher.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L33) + +## Methods + +### fetch + +▸ **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Defined in + +[lib/utils/Fetcher.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L37) + +▸ **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Defined in + +[lib/utils/Fetcher.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L38) + +___ + +### setCookie + +▸ **setCookie**(`value?`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value?` | ``null`` \| `string` | + +#### Returns + +`void` + +#### Defined in + +[lib/utils/Fetcher.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L25) diff --git a/docs/api/classes/ImageAPI.md b/docs/api/classes/ImageAPI.md index 7e71196..0240835 100644 --- a/docs/api/classes/ImageAPI.md +++ b/docs/api/classes/ImageAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`ImageAPI`** +- [`BaseAPI`](BaseAPI.md) - ↳ [`LimiterImageAPI`](LimiterImageAPI.md) + ↳ **`ImageAPI`** + + ↳↳ [`LimiterImageAPI`](LimiterImageAPI.md) ## Table of contents @@ -14,8 +16,13 @@ - [constructor](ImageAPI.md#constructor) +### Accessors + +- [cache](ImageAPI.md#cache) + ### Methods +- [fetch](ImageAPI.md#fetch) - [getFormat](ImageAPI.md#getformat) - [getFormats](ImageAPI.md#getformats) @@ -23,13 +30,95 @@ ### constructor -• **new ImageAPI**() +• **new ImageAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIParams`](../interfaces/BaseAPIParams.md) | + +#### Inherited from + +[BaseAPI](BaseAPI.md).[constructor](BaseAPI.md#constructor) + +#### Defined in + +[lib/common/BaseAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L14) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPI](BaseAPI.md).[fetch](BaseAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPI](BaseAPI.md).[fetch](BaseAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getFormat -▸ `Static` **getFormat**(`target?`, `fallbackId?`): `Promise`<``null`` \| [`ImageFormat`](../interfaces/ImageFormat.md)\> +▸ **getFormat**(`target?`, `fallbackId?`): `Promise`<``null`` \| [`ImageFormat`](../interfaces/ImageFormat.md)\> #### Parameters @@ -44,13 +133,13 @@ #### Defined in -[lib/image/ImageAPI.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/image/ImageAPI.ts#L27) +[lib/image/ImageAPI.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/image/ImageAPI.ts#L27) ___ ### getFormats -▸ `Static` **getFormats**(`filter?`): `Promise`<[`ImageFormat`](../interfaces/ImageFormat.md)[]\> +▸ **getFormats**(`filter?`): `Promise`<[`ImageFormat`](../interfaces/ImageFormat.md)[]\> #### Parameters @@ -64,4 +153,4 @@ ___ #### Defined in -[lib/image/ImageAPI.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/image/ImageAPI.ts#L47) +[lib/image/ImageAPI.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/image/ImageAPI.ts#L47) diff --git a/docs/api/classes/Limiter.md b/docs/api/classes/Limiter.md new file mode 100644 index 0000000..f58f217 --- /dev/null +++ b/docs/api/classes/Limiter.md @@ -0,0 +1,70 @@ +[bandcamp-fetch](../README.md) / Limiter + +# Class: Limiter + +## Table of contents + +### Constructors + +- [constructor](Limiter.md#constructor) + +### Methods + +- [schedule](Limiter.md#schedule) +- [updateSettings](Limiter.md#updatesettings) + +## Constructors + +### constructor + +• **new Limiter**() + +#### Defined in + +[lib/utils/Limiter.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Limiter.ts#L7) + +## Methods + +### schedule + +▸ **schedule**<`R`\>(`fn`): `Promise`<`R`\> + +#### Type parameters + +| Name | +| :------ | +| `R` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `fn` | () => `PromiseLike`<`R`\> | + +#### Returns + +`Promise`<`R`\> + +#### Defined in + +[lib/utils/Limiter.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Limiter.ts#L18) + +___ + +### updateSettings + +▸ **updateSettings**(`options?`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | `ConstructorOptions` | + +#### Returns + +`void` + +#### Defined in + +[lib/utils/Limiter.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Limiter.ts#L14) diff --git a/docs/api/classes/LimiterAlbumAPI.md b/docs/api/classes/LimiterAlbumAPI.md index 71e9c40..b7b0cff 100644 --- a/docs/api/classes/LimiterAlbumAPI.md +++ b/docs/api/classes/LimiterAlbumAPI.md @@ -14,25 +14,127 @@ - [constructor](LimiterAlbumAPI.md#constructor) +### Accessors + +- [cache](LimiterAlbumAPI.md#cache) +- [imageAPI](LimiterAlbumAPI.md#imageapi) + ### Methods +- [fetch](LimiterAlbumAPI.md#fetch) - [getInfo](LimiterAlbumAPI.md#getinfo) ## Constructors ### constructor -• **new LimiterAlbumAPI**() +• **new LimiterAlbumAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [AlbumAPI](AlbumAPI.md).[constructor](AlbumAPI.md#constructor) +#### Defined in + +[lib/album/AlbumAPI.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/album/AlbumAPI.ts#L33) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +AlbumAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +AlbumAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[AlbumAPI](AlbumAPI.md).[fetch](AlbumAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[AlbumAPI](AlbumAPI.md).[fetch](AlbumAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Album`](../interfaces/Album.md)\> +▸ **getInfo**(`params`): `Promise`<[`Album`](../interfaces/Album.md)\> #### Parameters @@ -50,4 +152,4 @@ #### Defined in -[lib/album/AlbumAPI.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/album/AlbumAPI.ts#L30) +[lib/album/AlbumAPI.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/album/AlbumAPI.ts#L38) diff --git a/docs/api/classes/LimiterArticleAPI.md b/docs/api/classes/LimiterArticleAPI.md index ac54d15..789d7a6 100644 --- a/docs/api/classes/LimiterArticleAPI.md +++ b/docs/api/classes/LimiterArticleAPI.md @@ -14,8 +14,14 @@ - [constructor](LimiterArticleAPI.md#constructor) +### Accessors + +- [cache](LimiterArticleAPI.md#cache) +- [imageAPI](LimiterArticleAPI.md#imageapi) + ### Methods +- [fetch](LimiterArticleAPI.md#fetch) - [getArticle](LimiterArticleAPI.md#getarticle) - [getCategories](LimiterArticleAPI.md#getcategories) - [list](LimiterArticleAPI.md#list) @@ -24,17 +30,113 @@ ### constructor -• **new LimiterArticleAPI**() +• **new LimiterArticleAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [ArticleAPI](ArticleAPI.md).[constructor](ArticleAPI.md#constructor) +#### Defined in + +[lib/article/ArticleAPI.ts:60](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L60) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +ArticleAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +ArticleAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[ArticleAPI](ArticleAPI.md).[fetch](ArticleAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[ArticleAPI](ArticleAPI.md).[fetch](ArticleAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getArticle -▸ `Static` **getArticle**(`params`): `Promise`<[`Article`](../interfaces/Article.md)\> +▸ **getArticle**(`params`): `Promise`<[`Article`](../interfaces/Article.md)\> #### Parameters @@ -52,13 +154,13 @@ #### Defined in -[lib/article/ArticleAPI.ts:63](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L63) +[lib/article/ArticleAPI.ts:69](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L69) ___ ### getCategories -▸ `Static` **getCategories**(): `Promise`<[`ArticleCategorySection`](../interfaces/ArticleCategorySection.md)[]\> +▸ **getCategories**(): `Promise`<[`ArticleCategorySection`](../interfaces/ArticleCategorySection.md)[]\> #### Returns @@ -70,13 +172,13 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:59](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L59) +[lib/article/ArticleAPI.ts:65](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L65) ___ ### list -▸ `Static` **list**(`params?`): `Promise`<[`ArticleList`](../interfaces/ArticleList.md)\> +▸ **list**(`params?`): `Promise`<[`ArticleList`](../interfaces/ArticleList.md)\> #### Parameters @@ -94,4 +196,4 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:44](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L44) +[lib/article/ArticleAPI.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L43) diff --git a/docs/api/classes/LimiterAutocompleteAPI.md b/docs/api/classes/LimiterAutocompleteAPI.md index ffc3ff2..b03717c 100644 --- a/docs/api/classes/LimiterAutocompleteAPI.md +++ b/docs/api/classes/LimiterAutocompleteAPI.md @@ -14,25 +14,108 @@ - [constructor](LimiterAutocompleteAPI.md#constructor) +### Accessors + +- [cache](LimiterAutocompleteAPI.md#cache) + ### Methods +- [fetch](LimiterAutocompleteAPI.md#fetch) - [getSuggestions](LimiterAutocompleteAPI.md#getsuggestions) ## Constructors ### constructor -• **new LimiterAutocompleteAPI**() +• **new LimiterAutocompleteAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIParams`](../interfaces/BaseAPIParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [AutocompleteAPI](AutocompleteAPI.md).[constructor](AutocompleteAPI.md#constructor) +#### Defined in + +[lib/autocomplete/AutocompleteAPI.ts:64](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L64) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +AutocompleteAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[AutocompleteAPI](AutocompleteAPI.md).[fetch](AutocompleteAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[AutocompleteAPI](AutocompleteAPI.md).[fetch](AutocompleteAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getSuggestions -▸ `Static` **getSuggestions**(`params`): `Promise`<[`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> +▸ **getSuggestions**(`params`): `Promise`<[`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> #### Parameters @@ -50,9 +133,9 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:61](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L61) +[lib/autocomplete/AutocompleteAPI.ts:69](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L69) -▸ `Static` **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[]\> +▸ **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[]\> #### Parameters @@ -70,9 +153,9 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:62](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L62) +[lib/autocomplete/AutocompleteAPI.ts:70](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L70) -▸ `Static` **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[] \| [`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> +▸ **getSuggestions**(`params`): `Promise`<[`AutoCompleteTag`](../interfaces/AutoCompleteTag.md)[] \| [`AutocompleteLocation`](../interfaces/AutocompleteLocation.md)[]\> #### Parameters @@ -90,4 +173,4 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:63](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L63) +[lib/autocomplete/AutocompleteAPI.ts:71](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L71) diff --git a/docs/api/classes/LimiterBandAPI.md b/docs/api/classes/LimiterBandAPI.md index 4f9fccd..eb5f246 100644 --- a/docs/api/classes/LimiterBandAPI.md +++ b/docs/api/classes/LimiterBandAPI.md @@ -14,8 +14,14 @@ - [constructor](LimiterBandAPI.md#constructor) +### Accessors + +- [cache](LimiterBandAPI.md#cache) +- [imageAPI](LimiterBandAPI.md#imageapi) + ### Methods +- [fetch](LimiterBandAPI.md#fetch) - [getDiscography](LimiterBandAPI.md#getdiscography) - [getInfo](LimiterBandAPI.md#getinfo) - [getLabelArtists](LimiterBandAPI.md#getlabelartists) @@ -24,17 +30,113 @@ ### constructor -• **new LimiterBandAPI**() +• **new LimiterBandAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [BandAPI](BandAPI.md).[constructor](BandAPI.md#constructor) +#### Defined in + +[lib/band/BandAPI.ts:136](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L136) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BandAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BandAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BandAPI](BandAPI.md).[fetch](BandAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BandAPI](BandAPI.md).[fetch](BandAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getDiscography -▸ `Static` **getDiscography**(`params`): `Promise`<([`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md))[]\> +▸ **getDiscography**(`params`): `Promise`<([`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md))[]\> #### Parameters @@ -52,13 +154,13 @@ #### Defined in -[lib/band/BandAPI.ts:135](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L135) +[lib/band/BandAPI.ts:141](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L141) ___ ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Label`](../interfaces/Label.md) \| [`Artist`](../interfaces/Artist.md)\> +▸ **getInfo**(`params`): `Promise`<[`Label`](../interfaces/Label.md) \| [`Artist`](../interfaces/Artist.md)\> #### Parameters @@ -76,13 +178,13 @@ ___ #### Defined in -[lib/band/BandAPI.ts:139](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L139) +[lib/band/BandAPI.ts:145](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L145) ___ ### getLabelArtists -▸ `Static` **getLabelArtists**(`params`): `Promise`<[`LabelArtist`](../README.md#labelartist)[]\> +▸ **getLabelArtists**(`params`): `Promise`<[`LabelArtist`](../README.md#labelartist)[]\> #### Parameters @@ -100,4 +202,4 @@ ___ #### Defined in -[lib/band/BandAPI.ts:143](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L143) +[lib/band/BandAPI.ts:149](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L149) diff --git a/docs/api/classes/LimiterDiscoveryAPI.md b/docs/api/classes/LimiterDiscoveryAPI.md index eaa6d8e..78e052a 100644 --- a/docs/api/classes/LimiterDiscoveryAPI.md +++ b/docs/api/classes/LimiterDiscoveryAPI.md @@ -14,9 +14,15 @@ - [constructor](LimiterDiscoveryAPI.md#constructor) +### Accessors + +- [cache](LimiterDiscoveryAPI.md#cache) +- [imageAPI](LimiterDiscoveryAPI.md#imageapi) + ### Methods - [discover](LimiterDiscoveryAPI.md#discover) +- [fetch](LimiterDiscoveryAPI.md#fetch) - [getAvailableOptions](LimiterDiscoveryAPI.md#getavailableoptions) - [sanitizeDiscoverParams](LimiterDiscoveryAPI.md#sanitizediscoverparams) @@ -24,17 +30,63 @@ ### constructor -• **new LimiterDiscoveryAPI**() +• **new LimiterDiscoveryAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides + +[DiscoveryAPI](DiscoveryAPI.md).[constructor](DiscoveryAPI.md#constructor) + +#### Defined in + +[lib/discovery/DiscoveryAPI.ts:136](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/discovery/DiscoveryAPI.ts#L136) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) #### Inherited from -[DiscoveryAPI](DiscoveryAPI.md).[constructor](DiscoveryAPI.md#constructor) +DiscoveryAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +DiscoveryAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods ### discover -▸ `Static` **discover**(`params`): `Promise`<[`DiscoverResult`](../interfaces/DiscoverResult.md)\> +▸ **discover**(`params`): `Promise`<[`DiscoverResult`](../interfaces/DiscoverResult.md)\> #### Parameters @@ -52,13 +104,63 @@ #### Defined in -[lib/discovery/DiscoveryAPI.ts:142](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/discovery/DiscoveryAPI.ts#L142) +[lib/discovery/DiscoveryAPI.ts:149](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/discovery/DiscoveryAPI.ts#L149) + +___ + +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[DiscoveryAPI](DiscoveryAPI.md).[fetch](DiscoveryAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[DiscoveryAPI](DiscoveryAPI.md).[fetch](DiscoveryAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) ___ ### getAvailableOptions -▸ `Static` **getAvailableOptions**(): `Promise`<[`DiscoverOptions`](../interfaces/DiscoverOptions.md)\> +▸ **getAvailableOptions**(): `Promise`<[`DiscoverOptions`](../interfaces/DiscoverOptions.md)\> #### Returns @@ -70,13 +172,13 @@ ___ #### Defined in -[lib/discovery/DiscoveryAPI.ts:134](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/discovery/DiscoveryAPI.ts#L134) +[lib/discovery/DiscoveryAPI.ts:141](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/discovery/DiscoveryAPI.ts#L141) ___ ### sanitizeDiscoverParams -▸ `Static` **sanitizeDiscoverParams**(`params`): `Promise`<[`DiscoverParams`](../interfaces/DiscoverParams.md)\> +▸ **sanitizeDiscoverParams**(`params`): `Promise`<[`DiscoverParams`](../interfaces/DiscoverParams.md)\> #### Parameters @@ -94,4 +196,4 @@ ___ #### Defined in -[lib/discovery/DiscoveryAPI.ts:138](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/discovery/DiscoveryAPI.ts#L138) +[lib/discovery/DiscoveryAPI.ts:145](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/discovery/DiscoveryAPI.ts#L145) diff --git a/docs/api/classes/LimiterFanAPI.md b/docs/api/classes/LimiterFanAPI.md index 62cb25f..c8ce5ae 100644 --- a/docs/api/classes/LimiterFanAPI.md +++ b/docs/api/classes/LimiterFanAPI.md @@ -14,8 +14,14 @@ - [constructor](LimiterFanAPI.md#constructor) +### Accessors + +- [cache](LimiterFanAPI.md#cache) +- [imageAPI](LimiterFanAPI.md#imageapi) + ### Methods +- [fetch](LimiterFanAPI.md#fetch) - [getCollection](LimiterFanAPI.md#getcollection) - [getFollowingArtistsAndLabels](LimiterFanAPI.md#getfollowingartistsandlabels) - [getFollowingGenres](LimiterFanAPI.md#getfollowinggenres) @@ -26,17 +32,113 @@ ### constructor -• **new LimiterFanAPI**() +• **new LimiterFanAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [FanAPI](FanAPI.md).[constructor](FanAPI.md#constructor) +#### Defined in + +[lib/fan/FanAPI.ts:143](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L143) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +FanAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +FanAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[FanAPI](FanAPI.md).[fetch](FanAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[FanAPI](FanAPI.md).[fetch](FanAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getCollection -▸ `Static` **getCollection**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> +▸ **getCollection**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> #### Parameters @@ -54,13 +156,13 @@ #### Defined in -[lib/fan/FanAPI.ts:145](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L145) +[lib/fan/FanAPI.ts:152](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L152) ___ ### getFollowingArtistsAndLabels -▸ `Static` **getFollowingArtistsAndLabels**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\>\> +▸ **getFollowingArtistsAndLabels**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`UserKind`](../interfaces/UserKind.md)\>\> #### Parameters @@ -78,13 +180,13 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:153](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L153) +[lib/fan/FanAPI.ts:160](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L160) ___ ### getFollowingGenres -▸ `Static` **getFollowingGenres**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`Tag`](../interfaces/Tag.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`Tag`](../interfaces/Tag.md)\>\> +▸ **getFollowingGenres**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<[`Tag`](../interfaces/Tag.md)\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<[`Tag`](../interfaces/Tag.md)\>\> #### Parameters @@ -102,13 +204,13 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:157](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L157) +[lib/fan/FanAPI.ts:164](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L164) ___ ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Fan`](../interfaces/Fan.md)\> +▸ **getInfo**(`params`): `Promise`<[`Fan`](../interfaces/Fan.md)\> #### Parameters @@ -126,13 +228,13 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:141](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L141) +[lib/fan/FanAPI.ts:148](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L148) ___ ### getWishlist -▸ `Static` **getWishlist**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> +▸ **getWishlist**(`params`): `Promise`<[`FanPageItemsResult`](../interfaces/FanPageItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\> \| [`FanContinuationItemsResult`](../interfaces/FanContinuationItemsResult.md)<`NonNullable`<``null`` \| [`Track`](../interfaces/Track.md) \| [`Album`](../interfaces/Album.md)\>\>\> #### Parameters @@ -150,4 +252,4 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:149](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L149) +[lib/fan/FanAPI.ts:156](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L156) diff --git a/docs/api/classes/LimiterImageAPI.md b/docs/api/classes/LimiterImageAPI.md index 3836eec..7255b91 100644 --- a/docs/api/classes/LimiterImageAPI.md +++ b/docs/api/classes/LimiterImageAPI.md @@ -14,8 +14,13 @@ - [constructor](LimiterImageAPI.md#constructor) +### Accessors + +- [cache](LimiterImageAPI.md#cache) + ### Methods +- [fetch](LimiterImageAPI.md#fetch) - [getFormat](LimiterImageAPI.md#getformat) - [getFormats](LimiterImageAPI.md#getformats) @@ -23,17 +28,95 @@ ### constructor -• **new LimiterImageAPI**() +• **new LimiterImageAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIParams`](../interfaces/BaseAPIParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [ImageAPI](ImageAPI.md).[constructor](ImageAPI.md#constructor) +#### Defined in + +[lib/image/ImageAPI.ts:64](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/image/ImageAPI.ts#L64) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +ImageAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[ImageAPI](ImageAPI.md).[fetch](ImageAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[ImageAPI](ImageAPI.md).[fetch](ImageAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getFormat -▸ `Static` **getFormat**(`target?`, `fallbackId?`): `Promise`<``null`` \| [`ImageFormat`](../interfaces/ImageFormat.md)\> +▸ **getFormat**(`target?`, `fallbackId?`): `Promise`<``null`` \| [`ImageFormat`](../interfaces/ImageFormat.md)\> #### Parameters @@ -52,13 +135,13 @@ #### Defined in -[lib/image/ImageAPI.ts:66](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/image/ImageAPI.ts#L66) +[lib/image/ImageAPI.ts:73](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/image/ImageAPI.ts#L73) ___ ### getFormats -▸ `Static` **getFormats**(`filter?`): `Promise`<[`ImageFormat`](../interfaces/ImageFormat.md)[]\> +▸ **getFormats**(`filter?`): `Promise`<[`ImageFormat`](../interfaces/ImageFormat.md)[]\> #### Parameters @@ -76,4 +159,4 @@ ___ #### Defined in -[lib/image/ImageAPI.ts:62](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/image/ImageAPI.ts#L62) +[lib/image/ImageAPI.ts:69](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/image/ImageAPI.ts#L69) diff --git a/docs/api/classes/LimiterSearchAPI.md b/docs/api/classes/LimiterSearchAPI.md index 2981646..f1849b2 100644 --- a/docs/api/classes/LimiterSearchAPI.md +++ b/docs/api/classes/LimiterSearchAPI.md @@ -14,12 +14,18 @@ - [constructor](LimiterSearchAPI.md#constructor) +### Accessors + +- [cache](LimiterSearchAPI.md#cache) +- [imageAPI](LimiterSearchAPI.md#imageapi) + ### Methods - [albums](LimiterSearchAPI.md#albums) - [all](LimiterSearchAPI.md#all) - [artistsAndLabels](LimiterSearchAPI.md#artistsandlabels) - [fans](LimiterSearchAPI.md#fans) +- [fetch](LimiterSearchAPI.md#fetch) - [search](LimiterSearchAPI.md#search) - [tracks](LimiterSearchAPI.md#tracks) @@ -27,17 +33,63 @@ ### constructor -• **new LimiterSearchAPI**() +• **new LimiterSearchAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides + +[SearchAPI](SearchAPI.md).[constructor](SearchAPI.md#constructor) + +#### Defined in + +[lib/search/SearchAPI.ts:94](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L94) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) #### Inherited from -[SearchAPI](SearchAPI.md).[constructor](SearchAPI.md#constructor) +SearchAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +SearchAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods ### albums -▸ `Static` **albums**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> +▸ **albums**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> #### Parameters @@ -55,13 +107,13 @@ #### Defined in -[lib/search/SearchAPI.ts:101](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L101) +[lib/search/SearchAPI.ts:107](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L107) ___ ### all -▸ `Static` **all**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> +▸ **all**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> #### Parameters @@ -79,13 +131,13 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:93](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L93) +[lib/search/SearchAPI.ts:99](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L99) ___ ### artistsAndLabels -▸ `Static` **artistsAndLabels**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultArtist`](../interfaces/SearchResultArtist.md) \| [`SearchResultLabel`](../interfaces/SearchResultLabel.md)\>\> +▸ **artistsAndLabels**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultArtist`](../interfaces/SearchResultArtist.md) \| [`SearchResultLabel`](../interfaces/SearchResultLabel.md)\>\> #### Parameters @@ -103,13 +155,13 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:97](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L97) +[lib/search/SearchAPI.ts:103](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L103) ___ ### fans -▸ `Static` **fans**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> +▸ **fans**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> #### Parameters @@ -127,13 +179,63 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:109](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L109) +[lib/search/SearchAPI.ts:115](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L115) + +___ + +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[SearchAPI](SearchAPI.md).[fetch](SearchAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[SearchAPI](SearchAPI.md).[fetch](SearchAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) ___ ### search -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> #### Parameters @@ -151,9 +253,9 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L51) +[lib/search/SearchAPI.ts:50](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L50) -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> #### Parameters @@ -171,9 +273,9 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:52](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L52) +[lib/search/SearchAPI.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L51) -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> #### Parameters @@ -191,9 +293,9 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:53](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L53) +[lib/search/SearchAPI.ts:52](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L52) -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> #### Parameters @@ -211,13 +313,13 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:54](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L54) +[lib/search/SearchAPI.ts:53](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L53) ___ ### tracks -▸ `Static` **tracks**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> +▸ **tracks**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> #### Parameters @@ -235,4 +337,4 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:105](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L105) +[lib/search/SearchAPI.ts:111](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L111) diff --git a/docs/api/classes/LimiterShowAPI.md b/docs/api/classes/LimiterShowAPI.md index fc7e1fd..94b17ba 100644 --- a/docs/api/classes/LimiterShowAPI.md +++ b/docs/api/classes/LimiterShowAPI.md @@ -14,8 +14,14 @@ - [constructor](LimiterShowAPI.md#constructor) +### Accessors + +- [cache](LimiterShowAPI.md#cache) +- [imageAPI](LimiterShowAPI.md#imageapi) + ### Methods +- [fetch](LimiterShowAPI.md#fetch) - [getShow](LimiterShowAPI.md#getshow) - [list](LimiterShowAPI.md#list) @@ -23,17 +29,113 @@ ### constructor -• **new LimiterShowAPI**() +• **new LimiterShowAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [ShowAPI](ShowAPI.md).[constructor](ShowAPI.md#constructor) +#### Defined in + +[lib/show/ShowAPI.ts:50](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L50) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +ShowAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +ShowAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[ShowAPI](ShowAPI.md).[fetch](ShowAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[ShowAPI](ShowAPI.md).[fetch](ShowAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getShow -▸ `Static` **getShow**(`params`): `Promise`<[`Show`](../interfaces/Show.md)\> +▸ **getShow**(`params`): `Promise`<[`Show`](../interfaces/Show.md)\> #### Parameters @@ -51,13 +153,13 @@ #### Defined in -[lib/show/ShowAPI.ts:49](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L49) +[lib/show/ShowAPI.ts:55](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L55) ___ ### list -▸ `Static` **list**(`params?`): `Promise`<[`Show`](../interfaces/Show.md)[]\> +▸ **list**(`params?`): `Promise`<[`Show`](../interfaces/Show.md)[]\> #### Parameters @@ -75,4 +177,4 @@ ___ #### Defined in -[lib/show/ShowAPI.ts:53](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L53) +[lib/show/ShowAPI.ts:59](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L59) diff --git a/docs/api/classes/LimiterTagAPI.md b/docs/api/classes/LimiterTagAPI.md index 82860c6..f37fa4a 100644 --- a/docs/api/classes/LimiterTagAPI.md +++ b/docs/api/classes/LimiterTagAPI.md @@ -14,8 +14,14 @@ - [constructor](LimiterTagAPI.md#constructor) +### Accessors + +- [cache](LimiterTagAPI.md#cache) +- [imageAPI](LimiterTagAPI.md#imageapi) + ### Methods +- [fetch](LimiterTagAPI.md#fetch) - [getAlbumHighlights](LimiterTagAPI.md#getalbumhighlights) - [getInfo](LimiterTagAPI.md#getinfo) - [getReleases](LimiterTagAPI.md#getreleases) @@ -26,17 +32,113 @@ ### constructor -• **new LimiterTagAPI**() +• **new LimiterTagAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [TagAPI](TagAPI.md).[constructor](TagAPI.md#constructor) +#### Defined in + +[lib/tag/TagAPI.ts:148](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L148) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +TagAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +TagAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[TagAPI](TagAPI.md).[fetch](TagAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[TagAPI](TagAPI.md).[fetch](TagAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getAlbumHighlights -▸ `Static` **getAlbumHighlights**(`params`): `Promise`<[`AlbumHighlightsByTag`](../interfaces/AlbumHighlightsByTag.md)[]\> +▸ **getAlbumHighlights**(`params`): `Promise`<[`AlbumHighlightsByTag`](../interfaces/AlbumHighlightsByTag.md)[]\> #### Parameters @@ -54,13 +156,13 @@ #### Defined in -[lib/tag/TagAPI.ts:154](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L154) +[lib/tag/TagAPI.ts:161](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L161) ___ ### getInfo -▸ `Static` **getInfo**(`tagUrl`): `Promise`<[`Tag`](../interfaces/Tag.md)\> +▸ **getInfo**(`tagUrl`): `Promise`<[`Tag`](../interfaces/Tag.md)\> #### Parameters @@ -78,13 +180,13 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:150](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L150) +[lib/tag/TagAPI.ts:157](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L157) ___ ### getReleases -▸ `Static` **getReleases**(`params`): `Promise`<[`ReleasesByTag`](../interfaces/ReleasesByTag-1.md)\> +▸ **getReleases**(`params`): `Promise`<[`ReleasesByTag`](../interfaces/ReleasesByTag-1.md)\> #### Parameters @@ -102,13 +204,13 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:162](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L162) +[lib/tag/TagAPI.ts:169](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L169) ___ ### getReleasesAvailableFilters -▸ `Static` **getReleasesAvailableFilters**(`tagUrl`): `Promise`<[`Filter`](../interfaces/ReleasesByTag.Filter.md)[]\> +▸ **getReleasesAvailableFilters**(`tagUrl`): `Promise`<[`Filter`](../interfaces/ReleasesByTag.Filter.md)[]\> #### Parameters @@ -126,13 +228,13 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:158](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L158) +[lib/tag/TagAPI.ts:165](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L165) ___ ### list -▸ `Static` **list**(): `Promise`<[`TagList`](../interfaces/TagList.md)\> +▸ **list**(): `Promise`<[`TagList`](../interfaces/TagList.md)\> #### Returns @@ -144,4 +246,4 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:146](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L146) +[lib/tag/TagAPI.ts:153](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L153) diff --git a/docs/api/classes/LimiterTrackAPI.md b/docs/api/classes/LimiterTrackAPI.md index ac1663a..68c240c 100644 --- a/docs/api/classes/LimiterTrackAPI.md +++ b/docs/api/classes/LimiterTrackAPI.md @@ -14,25 +14,127 @@ - [constructor](LimiterTrackAPI.md#constructor) +### Accessors + +- [cache](LimiterTrackAPI.md#cache) +- [imageAPI](LimiterTrackAPI.md#imageapi) + ### Methods +- [fetch](LimiterTrackAPI.md#fetch) - [getInfo](LimiterTrackAPI.md#getinfo) ## Constructors ### constructor -• **new LimiterTrackAPI**() +• **new LimiterTrackAPI**(`params`) -#### Inherited from +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) & { `limiter`: [`Limiter`](Limiter.md) } | + +#### Overrides [TrackAPI](TrackAPI.md).[constructor](TrackAPI.md#constructor) +#### Defined in + +[lib/track/TrackAPI.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/track/TrackAPI.ts#L33) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +TrackAPI.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +TrackAPI.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) + ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[TrackAPI](TrackAPI.md).[fetch](TrackAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[TrackAPI](TrackAPI.md).[fetch](TrackAPI.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Track`](../interfaces/Track.md)\> +▸ **getInfo**(`params`): `Promise`<[`Track`](../interfaces/Track.md)\> #### Parameters @@ -50,4 +152,4 @@ #### Defined in -[lib/track/TrackAPI.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/track/TrackAPI.ts#L31) +[lib/track/TrackAPI.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/track/TrackAPI.ts#L37) diff --git a/docs/api/classes/SearchAPI.md b/docs/api/classes/SearchAPI.md index 17f95db..2888645 100644 --- a/docs/api/classes/SearchAPI.md +++ b/docs/api/classes/SearchAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`SearchAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterSearchAPI`](LimiterSearchAPI.md) + ↳ **`SearchAPI`** + + ↳↳ [`LimiterSearchAPI`](LimiterSearchAPI.md) ## Table of contents @@ -14,12 +16,18 @@ - [constructor](SearchAPI.md#constructor) +### Accessors + +- [cache](SearchAPI.md#cache) +- [imageAPI](SearchAPI.md#imageapi) + ### Methods - [albums](SearchAPI.md#albums) - [all](SearchAPI.md#all) - [artistsAndLabels](SearchAPI.md#artistsandlabels) - [fans](SearchAPI.md#fans) +- [fetch](SearchAPI.md#fetch) - [search](SearchAPI.md#search) - [tracks](SearchAPI.md#tracks) @@ -27,13 +35,63 @@ ### constructor -• **new SearchAPI**() +• **new SearchAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods ### albums -▸ `Static` **albums**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> +▸ **albums**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> #### Parameters @@ -47,13 +105,13 @@ #### Defined in -[lib/search/SearchAPI.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L35) +[lib/search/SearchAPI.ts:34](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L34) ___ ### all -▸ `Static` **all**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> +▸ **all**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> #### Parameters @@ -67,13 +125,13 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L27) +[lib/search/SearchAPI.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L26) ___ ### artistsAndLabels -▸ `Static` **artistsAndLabels**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultArtist`](../interfaces/SearchResultArtist.md) \| [`SearchResultLabel`](../interfaces/SearchResultLabel.md)\>\> +▸ **artistsAndLabels**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultArtist`](../interfaces/SearchResultArtist.md) \| [`SearchResultLabel`](../interfaces/SearchResultLabel.md)\>\> #### Parameters @@ -87,13 +145,13 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L31) +[lib/search/SearchAPI.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L30) ___ ### fans -▸ `Static` **fans**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> +▸ **fans**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> #### Parameters @@ -107,13 +165,63 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L43) +[lib/search/SearchAPI.ts:42](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L42) + +___ + +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) ___ ### search -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAlbum`](../interfaces/SearchResultAlbum.md)\>\> #### Parameters @@ -127,9 +235,9 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L51) +[lib/search/SearchAPI.ts:50](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L50) -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> #### Parameters @@ -143,9 +251,9 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:52](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L52) +[lib/search/SearchAPI.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L51) -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultFan`](../interfaces/SearchResultFan.md)\>\> #### Parameters @@ -159,9 +267,9 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:53](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L53) +[lib/search/SearchAPI.ts:52](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L52) -▸ `Static` `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> +▸ `Protected` **search**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultAny`](../README.md#searchresultany)\>\> #### Parameters @@ -175,13 +283,13 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:54](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L54) +[lib/search/SearchAPI.ts:53](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L53) ___ ### tracks -▸ `Static` **tracks**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> +▸ **tracks**(`params`): `Promise`<[`SearchResults`](../interfaces/SearchResults.md)<[`SearchResultTrack`](../interfaces/SearchResultTrack.md)\>\> #### Parameters @@ -195,4 +303,4 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:39](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L39) +[lib/search/SearchAPI.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L38) diff --git a/docs/api/classes/ShowAPI.md b/docs/api/classes/ShowAPI.md index 01f63b2..de60613 100644 --- a/docs/api/classes/ShowAPI.md +++ b/docs/api/classes/ShowAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`ShowAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterShowAPI`](LimiterShowAPI.md) + ↳ **`ShowAPI`** + + ↳↳ [`LimiterShowAPI`](LimiterShowAPI.md) ## Table of contents @@ -14,8 +16,14 @@ - [constructor](ShowAPI.md#constructor) +### Accessors + +- [cache](ShowAPI.md#cache) +- [imageAPI](ShowAPI.md#imageapi) + ### Methods +- [fetch](ShowAPI.md#fetch) - [getShow](ShowAPI.md#getshow) - [list](ShowAPI.md#list) @@ -23,13 +31,113 @@ ### constructor -• **new ShowAPI**() +• **new ShowAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getShow -▸ `Static` **getShow**(`params`): `Promise`<[`Show`](../interfaces/Show.md)\> +▸ **getShow**(`params`): `Promise`<[`Show`](../interfaces/Show.md)\> #### Parameters @@ -43,13 +151,13 @@ #### Defined in -[lib/show/ShowAPI.ts:23](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L23) +[lib/show/ShowAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L22) ___ ### list -▸ `Static` **list**(`params?`): `Promise`<[`Show`](../interfaces/Show.md)[]\> +▸ **list**(`params?`): `Promise`<[`Show`](../interfaces/Show.md)[]\> #### Parameters @@ -63,4 +171,4 @@ ___ #### Defined in -[lib/show/ShowAPI.ts:36](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L36) +[lib/show/ShowAPI.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L35) diff --git a/docs/api/classes/TagAPI.md b/docs/api/classes/TagAPI.md index 7f2f816..05d146a 100644 --- a/docs/api/classes/TagAPI.md +++ b/docs/api/classes/TagAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`TagAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterTagAPI`](LimiterTagAPI.md) + ↳ **`TagAPI`** + + ↳↳ [`LimiterTagAPI`](LimiterTagAPI.md) ## Table of contents @@ -14,8 +16,14 @@ - [constructor](TagAPI.md#constructor) +### Accessors + +- [cache](TagAPI.md#cache) +- [imageAPI](TagAPI.md#imageapi) + ### Methods +- [fetch](TagAPI.md#fetch) - [getAlbumHighlights](TagAPI.md#getalbumhighlights) - [getInfo](TagAPI.md#getinfo) - [getReleases](TagAPI.md#getreleases) @@ -26,13 +34,113 @@ ### constructor -• **new TagAPI**() +• **new TagAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getAlbumHighlights -▸ `Static` **getAlbumHighlights**(`params`): `Promise`<[`AlbumHighlightsByTag`](../interfaces/AlbumHighlightsByTag.md)[]\> +▸ **getAlbumHighlights**(`params`): `Promise`<[`AlbumHighlightsByTag`](../interfaces/AlbumHighlightsByTag.md)[]\> #### Parameters @@ -46,13 +154,13 @@ #### Defined in -[lib/tag/TagAPI.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L38) +[lib/tag/TagAPI.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L38) ___ ### getInfo -▸ `Static` **getInfo**(`tagUrl`): `Promise`<[`Tag`](../interfaces/Tag.md)\> +▸ **getInfo**(`tagUrl`): `Promise`<[`Tag`](../interfaces/Tag.md)\> #### Parameters @@ -66,13 +174,13 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L33) +[lib/tag/TagAPI.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L33) ___ ### getReleases -▸ `Static` **getReleases**(`params`): `Promise`<[`ReleasesByTag`](../interfaces/ReleasesByTag-1.md)\> +▸ **getReleases**(`params`): `Promise`<[`ReleasesByTag`](../interfaces/ReleasesByTag-1.md)\> #### Parameters @@ -86,13 +194,13 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:55](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L55) +[lib/tag/TagAPI.ts:55](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L55) ___ ### getReleasesAvailableFilters -▸ `Static` **getReleasesAvailableFilters**(`tagUrl`): `Promise`<[`Filter`](../interfaces/ReleasesByTag.Filter.md)[]\> +▸ **getReleasesAvailableFilters**(`tagUrl`): `Promise`<[`Filter`](../interfaces/ReleasesByTag.Filter.md)[]\> #### Parameters @@ -106,13 +214,13 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:49](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L49) +[lib/tag/TagAPI.ts:49](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L49) ___ ### list -▸ `Static` **list**(): `Promise`<[`TagList`](../interfaces/TagList.md)\> +▸ **list**(): `Promise`<[`TagList`](../interfaces/TagList.md)\> #### Returns @@ -120,4 +228,4 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:28](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L28) +[lib/tag/TagAPI.ts:28](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L28) diff --git a/docs/api/classes/TrackAPI.md b/docs/api/classes/TrackAPI.md index ae3c055..7732d27 100644 --- a/docs/api/classes/TrackAPI.md +++ b/docs/api/classes/TrackAPI.md @@ -4,9 +4,11 @@ ## Hierarchy -- **`TrackAPI`** +- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md) - ↳ [`LimiterTrackAPI`](LimiterTrackAPI.md) + ↳ **`TrackAPI`** + + ↳↳ [`LimiterTrackAPI`](LimiterTrackAPI.md) ## Table of contents @@ -14,21 +16,127 @@ - [constructor](TrackAPI.md#constructor) +### Accessors + +- [cache](TrackAPI.md#cache) +- [imageAPI](TrackAPI.md#imageapi) + ### Methods +- [fetch](TrackAPI.md#fetch) - [getInfo](TrackAPI.md#getinfo) ## Constructors ### constructor -• **new TrackAPI**() +• **new TrackAPI**(`params`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) | + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L12) + +## Accessors + +### cache + +• `Protected` `get` **cache**(): [`Cache`](Cache.md) + +#### Returns + +[`Cache`](Cache.md) + +#### Inherited from + +BaseAPIWithImageSupport.cache + +#### Defined in + +[lib/common/BaseAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L25) + +___ + +### imageAPI + +• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md) + +#### Returns + +[`ImageAPI`](ImageAPI.md) + +#### Inherited from + +BaseAPIWithImageSupport.imageAPI + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L17) ## Methods +### fetch + +▸ `Protected` **fetch**(`url`, `jsonResponse`, `method?`, `payload?`): `Promise`<`any`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse` | ``true`` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`any`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L19) + +▸ `Protected` **fetch**(`url`, `jsonResponse?`, `method?`, `payload?`): `Promise`<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `url` | `string` | +| `jsonResponse?` | `boolean` | +| `method?` | [`FetchMethod`](../enums/FetchMethod.md) | +| `payload?` | `Record`<`string`, `any`\> | + +#### Returns + +`Promise`<`string`\> + +#### Inherited from + +[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch) + +#### Defined in + +[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L20) + +___ + ### getInfo -▸ `Static` **getInfo**(`params`): `Promise`<[`Track`](../interfaces/Track.md)\> +▸ **getInfo**(`params`): `Promise`<[`Track`](../interfaces/Track.md)\> #### Parameters @@ -42,4 +150,4 @@ #### Defined in -[lib/track/TrackAPI.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/track/TrackAPI.ts#L16) +[lib/track/TrackAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/track/TrackAPI.ts#L15) diff --git a/docs/api/enums/AutocompleteItemType.md b/docs/api/enums/AutocompleteItemType.md index 111316a..b07b551 100644 --- a/docs/api/enums/AutocompleteItemType.md +++ b/docs/api/enums/AutocompleteItemType.md @@ -17,7 +17,7 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L9) +[lib/autocomplete/AutocompleteAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L10) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L8) +[lib/autocomplete/AutocompleteAPI.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L9) diff --git a/docs/api/enums/CacheDataType.md b/docs/api/enums/CacheDataType.md index 0d228f7..a27b173 100644 --- a/docs/api/enums/CacheDataType.md +++ b/docs/api/enums/CacheDataType.md @@ -17,7 +17,7 @@ #### Defined in -[lib/utils/Cache.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/utils/Cache.ts#L5) +[lib/utils/Cache.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L5) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/utils/Cache.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/utils/Cache.ts#L4) +[lib/utils/Cache.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Cache.ts#L4) diff --git a/docs/api/enums/FetchMethod.md b/docs/api/enums/FetchMethod.md new file mode 100644 index 0000000..1c2aa32 --- /dev/null +++ b/docs/api/enums/FetchMethod.md @@ -0,0 +1,30 @@ +[bandcamp-fetch](../README.md) / FetchMethod + +# Enumeration: FetchMethod + +## Table of contents + +### Enumeration Members + +- [GET](FetchMethod.md#get) +- [POST](FetchMethod.md#post) + +## Enumeration Members + +### GET + +• **GET** = ``"GET"`` + +#### Defined in + +[lib/utils/Fetcher.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L6) + +___ + +### POST + +• **POST** = ``"POST"`` + +#### Defined in + +[lib/utils/Fetcher.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L7) diff --git a/docs/api/enums/ImageFormatFilter.md b/docs/api/enums/ImageFormatFilter.md index a6b0eae..a8d717f 100644 --- a/docs/api/enums/ImageFormatFilter.md +++ b/docs/api/enums/ImageFormatFilter.md @@ -19,7 +19,7 @@ Album image formats #### Defined in -[lib/image/ImageAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/image/ImageAPI.ts#L10) +[lib/image/ImageAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/image/ImageAPI.ts#L10) ___ @@ -31,4 +31,4 @@ Artist / Profile image formats #### Defined in -[lib/image/ImageAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/image/ImageAPI.ts#L12) +[lib/image/ImageAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/image/ImageAPI.ts#L12) diff --git a/docs/api/enums/SearchItemType.md b/docs/api/enums/SearchItemType.md index 43714b6..29d18f5 100644 --- a/docs/api/enums/SearchItemType.md +++ b/docs/api/enums/SearchItemType.md @@ -20,7 +20,7 @@ #### Defined in -[lib/search/SearchAPI.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L13) +[lib/search/SearchAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L12) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L11) +[lib/search/SearchAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L10) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L12) +[lib/search/SearchAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L11) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L15) +[lib/search/SearchAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L14) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L14) +[lib/search/SearchAPI.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L13) diff --git a/docs/api/interfaces/Album.md b/docs/api/interfaces/Album.md index e7fa4cf..e8a7562 100644 --- a/docs/api/interfaces/Album.md +++ b/docs/api/interfaces/Album.md @@ -42,7 +42,7 @@ #### Defined in -[lib/types/MediaKind.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L10) +[lib/types/MediaKind.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L10) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[lib/types/Album.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L8) +[lib/types/Album.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L8) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[lib/types/Album.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L11) +[lib/types/Album.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L11) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -[lib/types/Album.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L9) +[lib/types/Album.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L9) ___ @@ -86,7 +86,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L8) +[lib/types/MediaKind.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L8) ___ @@ -96,7 +96,7 @@ ___ #### Defined in -[lib/types/Album.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L7) +[lib/types/Album.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L7) ___ @@ -110,7 +110,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L11) +[lib/types/MediaKind.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L11) ___ @@ -120,7 +120,7 @@ ___ #### Defined in -[lib/types/Album.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L10) +[lib/types/Album.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L10) ___ @@ -134,7 +134,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L6) +[lib/types/MediaKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L6) ___ @@ -144,7 +144,7 @@ ___ #### Defined in -[lib/types/Album.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L6) +[lib/types/Album.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L6) ___ @@ -158,7 +158,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L12) +[lib/types/MediaKind.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L12) ___ @@ -179,7 +179,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L13) +[lib/types/MediaKind.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L13) ___ @@ -193,7 +193,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L9) +[lib/types/MediaKind.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L9) ___ @@ -203,7 +203,7 @@ ___ #### Defined in -[lib/types/Album.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L12) +[lib/types/Album.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L12) ___ @@ -213,7 +213,7 @@ ___ #### Defined in -[lib/types/Album.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L13) +[lib/types/Album.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L13) ___ @@ -223,7 +223,7 @@ ___ #### Defined in -[lib/types/Album.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L5) +[lib/types/Album.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L5) ___ @@ -237,4 +237,4 @@ ___ #### Defined in -[lib/types/MediaKind.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L7) +[lib/types/MediaKind.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L7) diff --git a/docs/api/interfaces/AlbumAPIGetInfoParams.md b/docs/api/interfaces/AlbumAPIGetInfoParams.md index dd0f761..ea71c9a 100644 --- a/docs/api/interfaces/AlbumAPIGetInfoParams.md +++ b/docs/api/interfaces/AlbumAPIGetInfoParams.md @@ -19,7 +19,7 @@ #### Defined in -[lib/album/AlbumAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/album/AlbumAPI.ts#L10) +[lib/album/AlbumAPI.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/album/AlbumAPI.ts#L9) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[lib/album/AlbumAPI.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/album/AlbumAPI.ts#L9) +[lib/album/AlbumAPI.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/album/AlbumAPI.ts#L8) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/album/AlbumAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/album/AlbumAPI.ts#L11) +[lib/album/AlbumAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/album/AlbumAPI.ts#L10) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[lib/album/AlbumAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/album/AlbumAPI.ts#L12) +[lib/album/AlbumAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/album/AlbumAPI.ts#L11) diff --git a/docs/api/interfaces/AlbumHighlightsByTag.md b/docs/api/interfaces/AlbumHighlightsByTag.md index e77cca3..7d1b0c4 100644 --- a/docs/api/interfaces/AlbumHighlightsByTag.md +++ b/docs/api/interfaces/AlbumHighlightsByTag.md @@ -18,7 +18,7 @@ #### Defined in -[lib/types/Tag.ts:23](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L23) +[lib/types/Tag.ts:23](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L23) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[lib/types/Tag.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L21) +[lib/types/Tag.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L21) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[lib/types/Tag.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L22) +[lib/types/Tag.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L22) diff --git a/docs/api/interfaces/AlbumRelease.md b/docs/api/interfaces/AlbumRelease.md index be00bf6..fad71bf 100644 --- a/docs/api/interfaces/AlbumRelease.md +++ b/docs/api/interfaces/AlbumRelease.md @@ -20,7 +20,7 @@ #### Defined in -[lib/types/Album.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L21) +[lib/types/Album.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L21) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[lib/types/Album.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L18) +[lib/types/Album.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L18) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/types/Album.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L20) +[lib/types/Album.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L20) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[lib/types/Album.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L17) +[lib/types/Album.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L17) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[lib/types/Album.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Album.ts#L19) +[lib/types/Album.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Album.ts#L19) diff --git a/docs/api/interfaces/Article.md b/docs/api/interfaces/Article.md index 7797ff7..395f1b3 100644 --- a/docs/api/interfaces/Article.md +++ b/docs/api/interfaces/Article.md @@ -33,7 +33,7 @@ #### Defined in -[lib/types/Article.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L16) +[lib/types/Article.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L16) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[lib/types/Article.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L10) +[lib/types/Article.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L10) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[lib/types/Article.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L9) +[lib/types/Article.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L9) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[lib/types/Article.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L6) +[lib/types/Article.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L6) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[lib/types/Article.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L11) +[lib/types/Article.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L11) ___ @@ -91,7 +91,7 @@ ___ #### Defined in -[lib/types/Article.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L8) +[lib/types/Article.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L8) ___ @@ -101,7 +101,7 @@ ___ #### Defined in -[lib/types/Article.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L20) +[lib/types/Article.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L20) ___ @@ -119,7 +119,7 @@ ___ #### Defined in -[lib/types/Article.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L22) +[lib/types/Article.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L22) ___ @@ -129,7 +129,7 @@ ___ #### Defined in -[lib/types/Article.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L21) +[lib/types/Article.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L21) ___ @@ -139,7 +139,7 @@ ___ #### Defined in -[lib/types/Article.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L5) +[lib/types/Article.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L5) ___ @@ -149,4 +149,4 @@ ___ #### Defined in -[lib/types/Article.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L7) +[lib/types/Article.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L7) diff --git a/docs/api/interfaces/ArticleAPIGetArticleParams.md b/docs/api/interfaces/ArticleAPIGetArticleParams.md index 76b1110..193ccd1 100644 --- a/docs/api/interfaces/ArticleAPIGetArticleParams.md +++ b/docs/api/interfaces/ArticleAPIGetArticleParams.md @@ -19,7 +19,7 @@ #### Defined in -[lib/article/ArticleAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L14) +[lib/article/ArticleAPI.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L13) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L13) +[lib/article/ArticleAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L12) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L15) +[lib/article/ArticleAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L14) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L16) +[lib/article/ArticleAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L15) diff --git a/docs/api/interfaces/ArticleAPIListParams.md b/docs/api/interfaces/ArticleAPIListParams.md index 98453ef..17e0a1c 100644 --- a/docs/api/interfaces/ArticleAPIListParams.md +++ b/docs/api/interfaces/ArticleAPIListParams.md @@ -18,7 +18,7 @@ #### Defined in -[lib/article/ArticleAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L20) +[lib/article/ArticleAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L19) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L21) +[lib/article/ArticleAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L20) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[lib/article/ArticleAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/article/ArticleAPI.ts#L22) +[lib/article/ArticleAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/article/ArticleAPI.ts#L21) diff --git a/docs/api/interfaces/ArticleCategory.md b/docs/api/interfaces/ArticleCategory.md index c2d3b18..2c3047f 100644 --- a/docs/api/interfaces/ArticleCategory.md +++ b/docs/api/interfaces/ArticleCategory.md @@ -17,7 +17,7 @@ #### Defined in -[lib/types/Article.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L30) +[lib/types/Article.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L30) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/types/Article.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L31) +[lib/types/Article.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L31) diff --git a/docs/api/interfaces/ArticleCategorySection.md b/docs/api/interfaces/ArticleCategorySection.md index 1751b33..9912f39 100644 --- a/docs/api/interfaces/ArticleCategorySection.md +++ b/docs/api/interfaces/ArticleCategorySection.md @@ -19,7 +19,7 @@ #### Defined in -[lib/types/Article.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L38) +[lib/types/Article.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L38) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[lib/types/Article.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L35) +[lib/types/Article.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L35) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/types/Article.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L37) +[lib/types/Article.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L37) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[lib/types/Article.ts:36](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L36) +[lib/types/Article.ts:36](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L36) diff --git a/docs/api/interfaces/ArticleList.md b/docs/api/interfaces/ArticleList.md index 689b29b..97003e3 100644 --- a/docs/api/interfaces/ArticleList.md +++ b/docs/api/interfaces/ArticleList.md @@ -19,7 +19,7 @@ #### Defined in -[lib/types/Article.ts:57](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L57) +[lib/types/Article.ts:57](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L57) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[lib/types/Article.ts:60](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L60) +[lib/types/Article.ts:60](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L60) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/types/Article.ts:59](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L59) +[lib/types/Article.ts:59](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L59) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[lib/types/Article.ts:58](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L58) +[lib/types/Article.ts:58](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L58) diff --git a/docs/api/interfaces/ArticleListItem.md b/docs/api/interfaces/ArticleListItem.md index c2d0b4e..1c80376 100644 --- a/docs/api/interfaces/ArticleListItem.md +++ b/docs/api/interfaces/ArticleListItem.md @@ -20,7 +20,7 @@ #### Defined in -[lib/types/Article.ts:67](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L67) +[lib/types/Article.ts:67](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L67) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[lib/types/Article.ts:66](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L66) +[lib/types/Article.ts:66](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L66) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/types/Article.ts:68](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L68) +[lib/types/Article.ts:68](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L68) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[lib/types/Article.ts:65](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L65) +[lib/types/Article.ts:65](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L65) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[lib/types/Article.ts:64](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L64) +[lib/types/Article.ts:64](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L64) diff --git a/docs/api/interfaces/ArticleSection.md b/docs/api/interfaces/ArticleSection.md index a250556..bee7823 100644 --- a/docs/api/interfaces/ArticleSection.md +++ b/docs/api/interfaces/ArticleSection.md @@ -26,7 +26,7 @@ #### Defined in -[lib/types/Article.ts:42](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L42) +[lib/types/Article.ts:42](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L42) ___ @@ -36,7 +36,7 @@ ___ #### Defined in -[lib/types/Article.ts:46](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L46) +[lib/types/Article.ts:46](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L46) ___ @@ -46,7 +46,7 @@ ___ #### Defined in -[lib/types/Article.ts:48](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L48) +[lib/types/Article.ts:48](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L48) ___ @@ -56,4 +56,4 @@ ___ #### Defined in -[lib/types/Article.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Article.ts#L47) +[lib/types/Article.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Article.ts#L47) diff --git a/docs/api/interfaces/Artist.md b/docs/api/interfaces/Artist.md index e9abede..76acf0f 100644 --- a/docs/api/interfaces/Artist.md +++ b/docs/api/interfaces/Artist.md @@ -33,7 +33,7 @@ #### Defined in -[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L3) +[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L3) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[lib/types/Artist.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Artist.ts#L7) +[lib/types/Artist.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Artist.ts#L7) ___ @@ -57,7 +57,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L5) +[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L5) ___ @@ -67,7 +67,7 @@ ___ #### Defined in -[lib/types/Artist.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Artist.ts#L6) +[lib/types/Artist.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Artist.ts#L6) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L6) +[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L6) ___ @@ -95,7 +95,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L2) +[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L2) ___ @@ -105,7 +105,7 @@ ___ #### Defined in -[lib/types/Artist.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Artist.ts#L5) +[lib/types/Artist.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Artist.ts#L5) ___ @@ -119,4 +119,4 @@ ___ #### Defined in -[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L4) +[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L4) diff --git a/docs/api/interfaces/AutoCompleteTag.md b/docs/api/interfaces/AutoCompleteTag.md index 98a7868..c9d6e87 100644 --- a/docs/api/interfaces/AutoCompleteTag.md +++ b/docs/api/interfaces/AutoCompleteTag.md @@ -25,7 +25,7 @@ #### Defined in -[lib/types/Autocomplete.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L8) +[lib/types/Autocomplete.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L8) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/types/Autocomplete.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L3) +[lib/types/Autocomplete.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L3) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[lib/types/Autocomplete.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L7) +[lib/types/Autocomplete.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L7) ___ @@ -63,4 +63,4 @@ ___ #### Defined in -[lib/types/Autocomplete.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L9) +[lib/types/Autocomplete.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L9) diff --git a/docs/api/interfaces/AutocompleteAPIGetSuggestionsParams.md b/docs/api/interfaces/AutocompleteAPIGetSuggestionsParams.md index 1b1ba5d..b49e528 100644 --- a/docs/api/interfaces/AutocompleteAPIGetSuggestionsParams.md +++ b/docs/api/interfaces/AutocompleteAPIGetSuggestionsParams.md @@ -18,7 +18,7 @@ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L14) +[lib/autocomplete/AutocompleteAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L15) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L15) +[lib/autocomplete/AutocompleteAPI.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L16) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[lib/autocomplete/AutocompleteAPI.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/autocomplete/AutocompleteAPI.ts#L13) +[lib/autocomplete/AutocompleteAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/autocomplete/AutocompleteAPI.ts#L14) diff --git a/docs/api/interfaces/AutocompleteItem.md b/docs/api/interfaces/AutocompleteItem.md index dc6ea22..cb94fdb 100644 --- a/docs/api/interfaces/AutocompleteItem.md +++ b/docs/api/interfaces/AutocompleteItem.md @@ -25,7 +25,7 @@ #### Defined in -[lib/types/Autocomplete.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L3) +[lib/types/Autocomplete.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L3) ___ @@ -35,4 +35,4 @@ ___ #### Defined in -[lib/types/Autocomplete.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L2) +[lib/types/Autocomplete.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L2) diff --git a/docs/api/interfaces/AutocompleteLocation.md b/docs/api/interfaces/AutocompleteLocation.md index 71225fb..6bbbe42 100644 --- a/docs/api/interfaces/AutocompleteLocation.md +++ b/docs/api/interfaces/AutocompleteLocation.md @@ -25,7 +25,7 @@ #### Defined in -[lib/types/Autocomplete.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L14) +[lib/types/Autocomplete.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L14) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/types/Autocomplete.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L3) +[lib/types/Autocomplete.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L3) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[lib/types/Autocomplete.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L13) +[lib/types/Autocomplete.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L13) ___ @@ -63,4 +63,4 @@ ___ #### Defined in -[lib/types/Autocomplete.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Autocomplete.ts#L15) +[lib/types/Autocomplete.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Autocomplete.ts#L15) diff --git a/docs/api/interfaces/BandAPIGetDiscographyParams.md b/docs/api/interfaces/BandAPIGetDiscographyParams.md index 7430150..0c550a3 100644 --- a/docs/api/interfaces/BandAPIGetDiscographyParams.md +++ b/docs/api/interfaces/BandAPIGetDiscographyParams.md @@ -17,7 +17,7 @@ #### Defined in -[lib/band/BandAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L15) +[lib/band/BandAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L14) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/band/BandAPI.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L16) +[lib/band/BandAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L15) diff --git a/docs/api/interfaces/BandAPIGetInfoParams.md b/docs/api/interfaces/BandAPIGetInfoParams.md index 265dd58..1c2c67c 100644 --- a/docs/api/interfaces/BandAPIGetInfoParams.md +++ b/docs/api/interfaces/BandAPIGetInfoParams.md @@ -18,7 +18,7 @@ #### Defined in -[lib/band/BandAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L20) +[lib/band/BandAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L19) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[lib/band/BandAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L21) +[lib/band/BandAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L20) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[lib/band/BandAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L22) +[lib/band/BandAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L21) diff --git a/docs/api/interfaces/BandAPIGetLabelArtistsParams.md b/docs/api/interfaces/BandAPIGetLabelArtistsParams.md index 7937f68..f60edd6 100644 --- a/docs/api/interfaces/BandAPIGetLabelArtistsParams.md +++ b/docs/api/interfaces/BandAPIGetLabelArtistsParams.md @@ -17,7 +17,7 @@ #### Defined in -[lib/band/BandAPI.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L27) +[lib/band/BandAPI.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L26) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/band/BandAPI.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/band/BandAPI.ts#L26) +[lib/band/BandAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/band/BandAPI.ts#L25) diff --git a/docs/api/interfaces/BandcampFetchParams.md b/docs/api/interfaces/BandcampFetchParams.md new file mode 100644 index 0000000..1c30f0d --- /dev/null +++ b/docs/api/interfaces/BandcampFetchParams.md @@ -0,0 +1,19 @@ +[bandcamp-fetch](../README.md) / BandcampFetchParams + +# Interface: BandcampFetchParams + +## Table of contents + +### Properties + +- [cookie](BandcampFetchParams.md#cookie) + +## Properties + +### cookie + +• `Optional` **cookie**: ``null`` \| `string` + +#### Defined in + +[lib/BandcampFetch.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/BandcampFetch.ts#L18) diff --git a/docs/api/interfaces/BaseAPIParams.md b/docs/api/interfaces/BaseAPIParams.md new file mode 100644 index 0000000..f29605a --- /dev/null +++ b/docs/api/interfaces/BaseAPIParams.md @@ -0,0 +1,36 @@ +[bandcamp-fetch](../README.md) / BaseAPIParams + +# Interface: BaseAPIParams + +## Hierarchy + +- **`BaseAPIParams`** + + ↳ [`BaseAPIWithImageSupportParams`](BaseAPIWithImageSupportParams.md) + +## Table of contents + +### Properties + +- [cache](BaseAPIParams.md#cache) +- [fetcher](BaseAPIParams.md#fetcher) + +## Properties + +### cache + +• **cache**: [`Cache`](../classes/Cache.md) + +#### Defined in + +[lib/common/BaseAPI.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L6) + +___ + +### fetcher + +• **fetcher**: [`Fetcher`](../classes/Fetcher.md) + +#### Defined in + +[lib/common/BaseAPI.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L5) diff --git a/docs/api/interfaces/BaseAPIWithImageSupportParams.md b/docs/api/interfaces/BaseAPIWithImageSupportParams.md new file mode 100644 index 0000000..39d0d67 --- /dev/null +++ b/docs/api/interfaces/BaseAPIWithImageSupportParams.md @@ -0,0 +1,55 @@ +[bandcamp-fetch](../README.md) / BaseAPIWithImageSupportParams + +# Interface: BaseAPIWithImageSupportParams + +## Hierarchy + +- [`BaseAPIParams`](BaseAPIParams.md) + + ↳ **`BaseAPIWithImageSupportParams`** + +## Table of contents + +### Properties + +- [cache](BaseAPIWithImageSupportParams.md#cache) +- [fetcher](BaseAPIWithImageSupportParams.md#fetcher) +- [imageAPI](BaseAPIWithImageSupportParams.md#imageapi) + +## Properties + +### cache + +• **cache**: [`Cache`](../classes/Cache.md) + +#### Inherited from + +[BaseAPIParams](BaseAPIParams.md).[cache](BaseAPIParams.md#cache) + +#### Defined in + +[lib/common/BaseAPI.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L6) + +___ + +### fetcher + +• **fetcher**: [`Fetcher`](../classes/Fetcher.md) + +#### Inherited from + +[BaseAPIParams](BaseAPIParams.md).[fetcher](BaseAPIParams.md#fetcher) + +#### Defined in + +[lib/common/BaseAPI.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPI.ts#L5) + +___ + +### imageAPI + +• **imageAPI**: [`ImageAPI`](../classes/ImageAPI.md) + +#### Defined in + +[lib/common/BaseAPIWithImageSupport.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/common/BaseAPIWithImageSupport.ts#L5) diff --git a/docs/api/interfaces/DiscoverOptions.md b/docs/api/interfaces/DiscoverOptions.md index 08bb16a..cfc0d4d 100644 --- a/docs/api/interfaces/DiscoverOptions.md +++ b/docs/api/interfaces/DiscoverOptions.md @@ -28,7 +28,7 @@ DiscoveryAPI.getAvailableOptions #### Defined in -[lib/types/Discovery.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L17) +[lib/types/Discovery.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L17) ___ @@ -38,7 +38,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L16) +[lib/types/Discovery.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L16) ___ @@ -48,7 +48,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L11) +[lib/types/Discovery.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L11) ___ @@ -58,7 +58,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L15) +[lib/types/Discovery.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L15) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L12) +[lib/types/Discovery.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L12) ___ @@ -78,7 +78,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L14) +[lib/types/Discovery.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L14) ___ @@ -88,4 +88,4 @@ ___ #### Defined in -[lib/types/Discovery.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L13) +[lib/types/Discovery.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L13) diff --git a/docs/api/interfaces/DiscoverParams.md b/docs/api/interfaces/DiscoverParams.md index 0e06c20..023be07 100644 --- a/docs/api/interfaces/DiscoverParams.md +++ b/docs/api/interfaces/DiscoverParams.md @@ -33,7 +33,7 @@ Value indicating the image format to adopt when constructing image URLs of disco #### Defined in -[lib/types/Discovery.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L37) +[lib/types/Discovery.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L37) ___ @@ -45,7 +45,7 @@ Value indicating the image format to adopt when constructing image URLs of album #### Defined in -[lib/types/Discovery.ts:41](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L41) +[lib/types/Discovery.ts:41](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L41) ___ @@ -55,7 +55,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L33) +[lib/types/Discovery.ts:33](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L33) ___ @@ -65,7 +65,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:32](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L32) +[lib/types/Discovery.ts:32](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L32) ___ @@ -75,7 +75,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L26) +[lib/types/Discovery.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L26) ___ @@ -85,7 +85,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L31) +[lib/types/Discovery.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L31) ___ @@ -95,7 +95,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:28](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L28) +[lib/types/Discovery.ts:28](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L28) ___ @@ -105,7 +105,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L27) +[lib/types/Discovery.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L27) ___ @@ -115,7 +115,7 @@ ___ #### Defined in -[lib/types/Discovery.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L30) +[lib/types/Discovery.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L30) ___ @@ -125,4 +125,4 @@ ___ #### Defined in -[lib/types/Discovery.ts:29](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L29) +[lib/types/Discovery.ts:29](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L29) diff --git a/docs/api/interfaces/DiscoverResult.md b/docs/api/interfaces/DiscoverResult.md index 2c60285..86910fe 100644 --- a/docs/api/interfaces/DiscoverResult.md +++ b/docs/api/interfaces/DiscoverResult.md @@ -22,7 +22,7 @@ List of discovered albums. #### Defined in -[lib/types/Discovery.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L51) +[lib/types/Discovery.ts:51](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L51) ___ @@ -34,7 +34,7 @@ Sanitized params used in the discovery request. #### Defined in -[lib/types/Discovery.ts:59](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L59) +[lib/types/Discovery.ts:59](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L59) ___ @@ -46,4 +46,4 @@ Total number of albums discovered. #### Defined in -[lib/types/Discovery.ts:55](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Discovery.ts#L55) +[lib/types/Discovery.ts:55](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Discovery.ts#L55) diff --git a/docs/api/interfaces/Fan.md b/docs/api/interfaces/Fan.md index 93b9035..645f707 100644 --- a/docs/api/interfaces/Fan.md +++ b/docs/api/interfaces/Fan.md @@ -33,7 +33,7 @@ #### Defined in -[lib/types/Fan.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L10) +[lib/types/Fan.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L10) ___ @@ -47,7 +47,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L3) +[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L3) ___ @@ -57,7 +57,7 @@ ___ #### Defined in -[lib/types/Fan.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L8) +[lib/types/Fan.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L8) ___ @@ -67,7 +67,7 @@ ___ #### Defined in -[lib/types/Fan.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L7) +[lib/types/Fan.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L7) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L5) +[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L5) ___ @@ -95,7 +95,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L6) +[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L6) ___ @@ -109,7 +109,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L2) +[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L2) ___ @@ -119,7 +119,7 @@ ___ #### Defined in -[lib/types/Fan.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L4) +[lib/types/Fan.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L4) ___ @@ -133,7 +133,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L4) +[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L4) ___ @@ -143,7 +143,7 @@ ___ #### Defined in -[lib/types/Fan.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L5) +[lib/types/Fan.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L5) ___ @@ -153,7 +153,7 @@ ___ #### Defined in -[lib/types/Fan.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L6) +[lib/types/Fan.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L6) ___ @@ -163,4 +163,4 @@ ___ #### Defined in -[lib/types/Fan.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L9) +[lib/types/Fan.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L9) diff --git a/docs/api/interfaces/FanAPIGetInfoParams.md b/docs/api/interfaces/FanAPIGetInfoParams.md index aa1263a..40352a9 100644 --- a/docs/api/interfaces/FanAPIGetInfoParams.md +++ b/docs/api/interfaces/FanAPIGetInfoParams.md @@ -17,7 +17,7 @@ #### Defined in -[lib/fan/FanAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L21) +[lib/fan/FanAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L21) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L20) +[lib/fan/FanAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L20) diff --git a/docs/api/interfaces/FanAPIGetItemsParams.md b/docs/api/interfaces/FanAPIGetItemsParams.md index 17a8040..85a5d4c 100644 --- a/docs/api/interfaces/FanAPIGetItemsParams.md +++ b/docs/api/interfaces/FanAPIGetItemsParams.md @@ -17,7 +17,7 @@ #### Defined in -[lib/fan/FanAPI.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L26) +[lib/fan/FanAPI.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L26) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/fan/FanAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanAPI.ts#L25) +[lib/fan/FanAPI.ts:25](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanAPI.ts#L25) diff --git a/docs/api/interfaces/FanContinuationItemsResult.md b/docs/api/interfaces/FanContinuationItemsResult.md index 75398f1..7d3c69e 100644 --- a/docs/api/interfaces/FanContinuationItemsResult.md +++ b/docs/api/interfaces/FanContinuationItemsResult.md @@ -23,7 +23,7 @@ #### Defined in -[lib/fan/FanItemsBaseParser.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanItemsBaseParser.ts#L22) +[lib/fan/FanItemsBaseParser.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanItemsBaseParser.ts#L22) ___ @@ -33,4 +33,4 @@ ___ #### Defined in -[lib/fan/FanItemsBaseParser.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanItemsBaseParser.ts#L21) +[lib/fan/FanItemsBaseParser.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanItemsBaseParser.ts#L21) diff --git a/docs/api/interfaces/FanItemsContinuation.md b/docs/api/interfaces/FanItemsContinuation.md index 7fac193..49f0814 100644 --- a/docs/api/interfaces/FanItemsContinuation.md +++ b/docs/api/interfaces/FanItemsContinuation.md @@ -17,7 +17,7 @@ #### Defined in -[lib/types/Fan.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L14) +[lib/types/Fan.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L14) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/types/Fan.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Fan.ts#L15) +[lib/types/Fan.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Fan.ts#L15) diff --git a/docs/api/interfaces/FanPageItemsResult.md b/docs/api/interfaces/FanPageItemsResult.md index cd1aa62..b312435 100644 --- a/docs/api/interfaces/FanPageItemsResult.md +++ b/docs/api/interfaces/FanPageItemsResult.md @@ -24,7 +24,7 @@ #### Defined in -[lib/fan/FanItemsBaseParser.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanItemsBaseParser.ts#L17) +[lib/fan/FanItemsBaseParser.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanItemsBaseParser.ts#L17) ___ @@ -34,7 +34,7 @@ ___ #### Defined in -[lib/fan/FanItemsBaseParser.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanItemsBaseParser.ts#L15) +[lib/fan/FanItemsBaseParser.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanItemsBaseParser.ts#L15) ___ @@ -44,4 +44,4 @@ ___ #### Defined in -[lib/fan/FanItemsBaseParser.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/fan/FanItemsBaseParser.ts#L16) +[lib/fan/FanItemsBaseParser.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/fan/FanItemsBaseParser.ts#L16) diff --git a/docs/api/interfaces/FetcherParams.md b/docs/api/interfaces/FetcherParams.md new file mode 100644 index 0000000..cc2dcc8 --- /dev/null +++ b/docs/api/interfaces/FetcherParams.md @@ -0,0 +1,30 @@ +[bandcamp-fetch](../README.md) / FetcherParams + +# Interface: FetcherParams + +## Table of contents + +### Properties + +- [cache](FetcherParams.md#cache) +- [cookie](FetcherParams.md#cookie) + +## Properties + +### cache + +• **cache**: [`Cache`](../classes/Cache.md) + +#### Defined in + +[lib/utils/Fetcher.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L12) + +___ + +### cookie + +• `Optional` **cookie**: ``null`` \| `string` + +#### Defined in + +[lib/utils/Fetcher.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/Fetcher.ts#L11) diff --git a/docs/api/interfaces/ImageConstants.md b/docs/api/interfaces/ImageConstants.md index 3f03d17..e2bed12 100644 --- a/docs/api/interfaces/ImageConstants.md +++ b/docs/api/interfaces/ImageConstants.md @@ -17,7 +17,7 @@ #### Defined in -[lib/types/Image.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Image.ts#L10) +[lib/types/Image.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Image.ts#L10) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/types/Image.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Image.ts#L11) +[lib/types/Image.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Image.ts#L11) diff --git a/docs/api/interfaces/ImageFormat.md b/docs/api/interfaces/ImageFormat.md index 0f6570d..e79c079 100644 --- a/docs/api/interfaces/ImageFormat.md +++ b/docs/api/interfaces/ImageFormat.md @@ -20,7 +20,7 @@ #### Defined in -[lib/types/Image.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Image.ts#L6) +[lib/types/Image.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Image.ts#L6) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[lib/types/Image.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Image.ts#L5) +[lib/types/Image.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Image.ts#L5) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/types/Image.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Image.ts#L2) +[lib/types/Image.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Image.ts#L2) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[lib/types/Image.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Image.ts#L3) +[lib/types/Image.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Image.ts#L3) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[lib/types/Image.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Image.ts#L4) +[lib/types/Image.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Image.ts#L4) diff --git a/docs/api/interfaces/Label.md b/docs/api/interfaces/Label.md index a412a4b..bd06f50 100644 --- a/docs/api/interfaces/Label.md +++ b/docs/api/interfaces/Label.md @@ -32,7 +32,7 @@ #### Defined in -[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L3) +[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L3) ___ @@ -46,7 +46,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L5) +[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L5) ___ @@ -56,7 +56,7 @@ ___ #### Defined in -[lib/types/Label.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Label.ts#L6) +[lib/types/Label.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Label.ts#L6) ___ @@ -70,7 +70,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L6) +[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L6) ___ @@ -84,7 +84,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L2) +[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L2) ___ @@ -94,7 +94,7 @@ ___ #### Defined in -[lib/types/Label.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Label.ts#L5) +[lib/types/Label.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Label.ts#L5) ___ @@ -108,4 +108,4 @@ ___ #### Defined in -[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L4) +[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L4) diff --git a/docs/api/interfaces/MediaKind.md b/docs/api/interfaces/MediaKind.md index 3423e68..dd816ee 100644 --- a/docs/api/interfaces/MediaKind.md +++ b/docs/api/interfaces/MediaKind.md @@ -31,7 +31,7 @@ #### Defined in -[lib/types/MediaKind.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L10) +[lib/types/MediaKind.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L10) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L8) +[lib/types/MediaKind.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L8) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L11) +[lib/types/MediaKind.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L11) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L6) +[lib/types/MediaKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L6) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L12) +[lib/types/MediaKind.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L12) ___ @@ -88,7 +88,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L13) +[lib/types/MediaKind.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L13) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L9) +[lib/types/MediaKind.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L9) ___ @@ -108,4 +108,4 @@ ___ #### Defined in -[lib/types/MediaKind.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L7) +[lib/types/MediaKind.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L7) diff --git a/docs/api/interfaces/NameValuePair.md b/docs/api/interfaces/NameValuePair.md index 162983b..44388b2 100644 --- a/docs/api/interfaces/NameValuePair.md +++ b/docs/api/interfaces/NameValuePair.md @@ -29,7 +29,7 @@ #### Defined in -[lib/utils/NameValuePair.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/utils/NameValuePair.ts#L2) +[lib/utils/NameValuePair.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/NameValuePair.ts#L2) ___ @@ -39,4 +39,4 @@ ___ #### Defined in -[lib/utils/NameValuePair.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/utils/NameValuePair.ts#L3) +[lib/utils/NameValuePair.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/NameValuePair.ts#L3) diff --git a/docs/api/interfaces/ReleasesByTag-1.md b/docs/api/interfaces/ReleasesByTag-1.md index f90d61a..439dafb 100644 --- a/docs/api/interfaces/ReleasesByTag-1.md +++ b/docs/api/interfaces/ReleasesByTag-1.md @@ -18,7 +18,7 @@ #### Defined in -[lib/types/Tag.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L47) +[lib/types/Tag.ts:47](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L47) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[lib/types/Tag.ts:46](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L46) +[lib/types/Tag.ts:46](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L46) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[lib/types/Tag.ts:45](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L45) +[lib/types/Tag.ts:45](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L45) diff --git a/docs/api/interfaces/ReleasesByTag.Filter.md b/docs/api/interfaces/ReleasesByTag.Filter.md index 617bb57..9393dac 100644 --- a/docs/api/interfaces/ReleasesByTag.Filter.md +++ b/docs/api/interfaces/ReleasesByTag.Filter.md @@ -19,7 +19,7 @@ #### Defined in -[lib/types/Tag.ts:39](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L39) +[lib/types/Tag.ts:39](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L39) ___ @@ -29,4 +29,4 @@ ___ #### Defined in -[lib/types/Tag.ts:40](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L40) +[lib/types/Tag.ts:40](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L40) diff --git a/docs/api/interfaces/ReleasesByTag.FilterOption.md b/docs/api/interfaces/ReleasesByTag.FilterOption.md index 1bf1b79..e3c8c09 100644 --- a/docs/api/interfaces/ReleasesByTag.FilterOption.md +++ b/docs/api/interfaces/ReleasesByTag.FilterOption.md @@ -27,7 +27,7 @@ #### Defined in -[lib/types/Tag.ts:34](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L34) +[lib/types/Tag.ts:34](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L34) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[lib/utils/NameValuePair.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/utils/NameValuePair.ts#L2) +[lib/utils/NameValuePair.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/NameValuePair.ts#L2) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[lib/types/Tag.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L35) +[lib/types/Tag.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L35) ___ @@ -65,4 +65,4 @@ ___ #### Defined in -[lib/utils/NameValuePair.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/utils/NameValuePair.ts#L3) +[lib/utils/NameValuePair.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/utils/NameValuePair.ts#L3) diff --git a/docs/api/interfaces/SearchAPISearchParams.md b/docs/api/interfaces/SearchAPISearchParams.md index f880bd1..8b76494 100644 --- a/docs/api/interfaces/SearchAPISearchParams.md +++ b/docs/api/interfaces/SearchAPISearchParams.md @@ -19,7 +19,7 @@ #### Defined in -[lib/search/SearchAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L21) +[lib/search/SearchAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L20) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L22) +[lib/search/SearchAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L21) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L20) +[lib/search/SearchAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L19) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[lib/search/SearchAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/search/SearchAPI.ts#L19) +[lib/search/SearchAPI.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/search/SearchAPI.ts#L18) diff --git a/docs/api/interfaces/SearchResultAlbum.md b/docs/api/interfaces/SearchResultAlbum.md index d01cfc2..9d55ec3 100644 --- a/docs/api/interfaces/SearchResultAlbum.md +++ b/docs/api/interfaces/SearchResultAlbum.md @@ -30,7 +30,7 @@ #### Defined in -[lib/types/Search.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L27) +[lib/types/Search.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L27) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/types/Search.ts:29](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L29) +[lib/types/Search.ts:29](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L29) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L10) +[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L10) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L8) +[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L8) ___ @@ -78,7 +78,7 @@ ___ #### Defined in -[lib/types/Search.ts:28](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L28) +[lib/types/Search.ts:28](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L28) ___ @@ -88,7 +88,7 @@ ___ #### Defined in -[lib/types/Search.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L30) +[lib/types/Search.ts:30](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L30) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[lib/types/Search.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L31) +[lib/types/Search.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L31) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[lib/types/Search.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L26) +[lib/types/Search.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L26) ___ @@ -126,4 +126,4 @@ ___ #### Defined in -[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L9) +[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L9) diff --git a/docs/api/interfaces/SearchResultArtist.md b/docs/api/interfaces/SearchResultArtist.md index 1b442d6..41451c5 100644 --- a/docs/api/interfaces/SearchResultArtist.md +++ b/docs/api/interfaces/SearchResultArtist.md @@ -28,7 +28,7 @@ #### Defined in -[lib/types/Search.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L16) +[lib/types/Search.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L16) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L10) +[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L10) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[lib/types/Search.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L15) +[lib/types/Search.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L15) ___ @@ -66,7 +66,7 @@ ___ #### Defined in -[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L8) +[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L8) ___ @@ -76,7 +76,7 @@ ___ #### Defined in -[lib/types/Search.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L17) +[lib/types/Search.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L17) ___ @@ -90,7 +90,7 @@ ___ #### Defined in -[lib/types/Search.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L14) +[lib/types/Search.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L14) ___ @@ -104,4 +104,4 @@ ___ #### Defined in -[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L9) +[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L9) diff --git a/docs/api/interfaces/SearchResultFan.md b/docs/api/interfaces/SearchResultFan.md index f1e6f08..161f6bd 100644 --- a/docs/api/interfaces/SearchResultFan.md +++ b/docs/api/interfaces/SearchResultFan.md @@ -26,7 +26,7 @@ #### Defined in -[lib/types/Search.ts:44](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L44) +[lib/types/Search.ts:44](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L44) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L10) +[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L10) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L8) +[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L8) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[lib/types/Search.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L43) +[lib/types/Search.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L43) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L9) +[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L9) diff --git a/docs/api/interfaces/SearchResultItem.md b/docs/api/interfaces/SearchResultItem.md index 77c3f22..3493608 100644 --- a/docs/api/interfaces/SearchResultItem.md +++ b/docs/api/interfaces/SearchResultItem.md @@ -33,7 +33,7 @@ #### Defined in -[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L10) +[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L10) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L8) +[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L8) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[lib/types/Search.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L7) +[lib/types/Search.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L7) ___ @@ -63,4 +63,4 @@ ___ #### Defined in -[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L9) +[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L9) diff --git a/docs/api/interfaces/SearchResultLabel.md b/docs/api/interfaces/SearchResultLabel.md index b4312ef..33f1d04 100644 --- a/docs/api/interfaces/SearchResultLabel.md +++ b/docs/api/interfaces/SearchResultLabel.md @@ -30,7 +30,7 @@ #### Defined in -[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L10) +[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L10) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/types/Search.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L22) +[lib/types/Search.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L22) ___ @@ -54,7 +54,7 @@ ___ #### Defined in -[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L8) +[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L8) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[lib/types/Search.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L21) +[lib/types/Search.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L21) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L9) +[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L9) diff --git a/docs/api/interfaces/SearchResultTrack.md b/docs/api/interfaces/SearchResultTrack.md index d9ae867..1732562 100644 --- a/docs/api/interfaces/SearchResultTrack.md +++ b/docs/api/interfaces/SearchResultTrack.md @@ -29,7 +29,7 @@ #### Defined in -[lib/types/Search.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L37) +[lib/types/Search.ts:37](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L37) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/types/Search.ts:36](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L36) +[lib/types/Search.ts:36](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L36) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L10) +[lib/types/Search.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L10) ___ @@ -67,7 +67,7 @@ ___ #### Defined in -[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L8) +[lib/types/Search.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L8) ___ @@ -77,7 +77,7 @@ ___ #### Defined in -[lib/types/Search.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L38) +[lib/types/Search.ts:38](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L38) ___ @@ -87,7 +87,7 @@ ___ #### Defined in -[lib/types/Search.ts:39](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L39) +[lib/types/Search.ts:39](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L39) ___ @@ -101,7 +101,7 @@ ___ #### Defined in -[lib/types/Search.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L35) +[lib/types/Search.ts:35](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L35) ___ @@ -115,4 +115,4 @@ ___ #### Defined in -[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L9) +[lib/types/Search.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L9) diff --git a/docs/api/interfaces/SearchResults.md b/docs/api/interfaces/SearchResults.md index d90a350..ba3463b 100644 --- a/docs/api/interfaces/SearchResults.md +++ b/docs/api/interfaces/SearchResults.md @@ -23,7 +23,7 @@ #### Defined in -[lib/types/Search.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L2) +[lib/types/Search.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L2) ___ @@ -33,4 +33,4 @@ ___ #### Defined in -[lib/types/Search.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Search.ts#L3) +[lib/types/Search.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Search.ts#L3) diff --git a/docs/api/interfaces/Show.md b/docs/api/interfaces/Show.md index b46df01..6f65868 100644 --- a/docs/api/interfaces/Show.md +++ b/docs/api/interfaces/Show.md @@ -28,7 +28,7 @@ #### Defined in -[lib/types/Show.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L8) +[lib/types/Show.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L8) ___ @@ -38,7 +38,7 @@ ___ #### Defined in -[lib/types/Show.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L10) +[lib/types/Show.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L10) ___ @@ -48,7 +48,7 @@ ___ #### Defined in -[lib/types/Show.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L16) +[lib/types/Show.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L16) ___ @@ -58,7 +58,7 @@ ___ #### Defined in -[lib/types/Show.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L18) +[lib/types/Show.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L18) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[lib/types/Show.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L5) +[lib/types/Show.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L5) ___ @@ -78,7 +78,7 @@ ___ #### Defined in -[lib/types/Show.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L7) +[lib/types/Show.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L7) ___ @@ -88,7 +88,7 @@ ___ #### Defined in -[lib/types/Show.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L19) +[lib/types/Show.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L19) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[lib/types/Show.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L9) +[lib/types/Show.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L9) ___ @@ -115,7 +115,7 @@ ___ #### Defined in -[lib/types/Show.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L11) +[lib/types/Show.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L11) ___ @@ -125,7 +125,7 @@ ___ #### Defined in -[lib/types/Show.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L17) +[lib/types/Show.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L17) ___ @@ -135,7 +135,7 @@ ___ #### Defined in -[lib/types/Show.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L15) +[lib/types/Show.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L15) ___ @@ -145,7 +145,7 @@ ___ #### Defined in -[lib/types/Show.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L4) +[lib/types/Show.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L4) ___ @@ -155,4 +155,4 @@ ___ #### Defined in -[lib/types/Show.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Show.ts#L6) +[lib/types/Show.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Show.ts#L6) diff --git a/docs/api/interfaces/ShowAPIGetShowParams.md b/docs/api/interfaces/ShowAPIGetShowParams.md index 500b8b1..71cf641 100644 --- a/docs/api/interfaces/ShowAPIGetShowParams.md +++ b/docs/api/interfaces/ShowAPIGetShowParams.md @@ -19,7 +19,7 @@ #### Defined in -[lib/show/ShowAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L12) +[lib/show/ShowAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L11) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[lib/show/ShowAPI.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L13) +[lib/show/ShowAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L12) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/show/ShowAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L14) +[lib/show/ShowAPI.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L13) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[lib/show/ShowAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L11) +[lib/show/ShowAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L10) diff --git a/docs/api/interfaces/ShowAPIListParams.md b/docs/api/interfaces/ShowAPIListParams.md index d60d247..bbfc776 100644 --- a/docs/api/interfaces/ShowAPIListParams.md +++ b/docs/api/interfaces/ShowAPIListParams.md @@ -16,4 +16,4 @@ #### Defined in -[lib/show/ShowAPI.ts:18](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/show/ShowAPI.ts#L18) +[lib/show/ShowAPI.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/show/ShowAPI.ts#L17) diff --git a/docs/api/interfaces/Tag.md b/docs/api/interfaces/Tag.md index 0a95ece..e8ea334 100644 --- a/docs/api/interfaces/Tag.md +++ b/docs/api/interfaces/Tag.md @@ -22,7 +22,7 @@ #### Defined in -[lib/types/Tag.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L12) +[lib/types/Tag.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L12) ___ @@ -32,7 +32,7 @@ ___ #### Defined in -[lib/types/Tag.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L11) +[lib/types/Tag.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L11) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[lib/types/Tag.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L7) +[lib/types/Tag.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L7) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[lib/types/Tag.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L10) +[lib/types/Tag.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L10) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[lib/types/Tag.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L6) +[lib/types/Tag.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L6) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -[lib/types/Tag.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L8) +[lib/types/Tag.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L8) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[lib/types/Tag.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L9) +[lib/types/Tag.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L9) diff --git a/docs/api/interfaces/TagAPIGetAlbumHighlightsParams.md b/docs/api/interfaces/TagAPIGetAlbumHighlightsParams.md index f28edef..8df49d8 100644 --- a/docs/api/interfaces/TagAPIGetAlbumHighlightsParams.md +++ b/docs/api/interfaces/TagAPIGetAlbumHighlightsParams.md @@ -17,7 +17,7 @@ #### Defined in -[lib/tag/TagAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L15) +[lib/tag/TagAPI.ts:15](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L15) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L14) +[lib/tag/TagAPI.ts:14](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L14) diff --git a/docs/api/interfaces/TagAPIGetReleasesParams.md b/docs/api/interfaces/TagAPIGetReleasesParams.md index ea298d3..9f1c245 100644 --- a/docs/api/interfaces/TagAPIGetReleasesParams.md +++ b/docs/api/interfaces/TagAPIGetReleasesParams.md @@ -20,7 +20,7 @@ #### Defined in -[lib/tag/TagAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L22) +[lib/tag/TagAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L22) ___ @@ -30,7 +30,7 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L20) +[lib/tag/TagAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L20) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:23](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L23) +[lib/tag/TagAPI.ts:23](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L23) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L19) +[lib/tag/TagAPI.ts:19](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L19) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[lib/tag/TagAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/tag/TagAPI.ts#L21) +[lib/tag/TagAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/tag/TagAPI.ts#L21) diff --git a/docs/api/interfaces/TagList.md b/docs/api/interfaces/TagList.md index e2ae3ba..c08aed0 100644 --- a/docs/api/interfaces/TagList.md +++ b/docs/api/interfaces/TagList.md @@ -17,7 +17,7 @@ #### Defined in -[lib/types/Tag.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L17) +[lib/types/Tag.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L17) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[lib/types/Tag.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Tag.ts#L16) +[lib/types/Tag.ts:16](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Tag.ts#L16) diff --git a/docs/api/interfaces/Track.md b/docs/api/interfaces/Track.md index 15229d6..c58d6b4 100644 --- a/docs/api/interfaces/Track.md +++ b/docs/api/interfaces/Track.md @@ -35,7 +35,7 @@ #### Defined in -[lib/types/Track.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Track.ts#L9) +[lib/types/Track.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Track.ts#L9) ___ @@ -49,7 +49,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L10) +[lib/types/MediaKind.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L10) ___ @@ -59,7 +59,7 @@ ___ #### Defined in -[lib/types/Track.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Track.ts#L6) +[lib/types/Track.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Track.ts#L6) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L8) +[lib/types/MediaKind.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L8) ___ @@ -87,7 +87,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L11) +[lib/types/MediaKind.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L11) ___ @@ -101,7 +101,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L6) +[lib/types/MediaKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L6) ___ @@ -111,7 +111,7 @@ ___ #### Defined in -[lib/types/Track.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Track.ts#L10) +[lib/types/Track.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Track.ts#L10) ___ @@ -125,7 +125,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L12) +[lib/types/MediaKind.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L12) ___ @@ -146,7 +146,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L13) +[lib/types/MediaKind.ts:13](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L13) ___ @@ -160,7 +160,7 @@ ___ #### Defined in -[lib/types/MediaKind.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L9) +[lib/types/MediaKind.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L9) ___ @@ -170,7 +170,7 @@ ___ #### Defined in -[lib/types/Track.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Track.ts#L7) +[lib/types/Track.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Track.ts#L7) ___ @@ -180,7 +180,7 @@ ___ #### Defined in -[lib/types/Track.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Track.ts#L8) +[lib/types/Track.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Track.ts#L8) ___ @@ -190,7 +190,7 @@ ___ #### Defined in -[lib/types/Track.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/Track.ts#L5) +[lib/types/Track.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/Track.ts#L5) ___ @@ -204,4 +204,4 @@ ___ #### Defined in -[lib/types/MediaKind.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/MediaKind.ts#L7) +[lib/types/MediaKind.ts:7](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/MediaKind.ts#L7) diff --git a/docs/api/interfaces/TrackAPIGetInfoParams.md b/docs/api/interfaces/TrackAPIGetInfoParams.md index 89198b0..8ddf512 100644 --- a/docs/api/interfaces/TrackAPIGetInfoParams.md +++ b/docs/api/interfaces/TrackAPIGetInfoParams.md @@ -19,7 +19,7 @@ #### Defined in -[lib/track/TrackAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/track/TrackAPI.ts#L10) +[lib/track/TrackAPI.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/track/TrackAPI.ts#L9) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[lib/track/TrackAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/track/TrackAPI.ts#L11) +[lib/track/TrackAPI.ts:10](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/track/TrackAPI.ts#L10) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[lib/track/TrackAPI.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/track/TrackAPI.ts#L12) +[lib/track/TrackAPI.ts:11](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/track/TrackAPI.ts#L11) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[lib/track/TrackAPI.ts:9](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/track/TrackAPI.ts#L9) +[lib/track/TrackAPI.ts:8](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/track/TrackAPI.ts#L8) diff --git a/docs/api/interfaces/UserKind.md b/docs/api/interfaces/UserKind.md index d8359db..26f9535 100644 --- a/docs/api/interfaces/UserKind.md +++ b/docs/api/interfaces/UserKind.md @@ -30,7 +30,7 @@ #### Defined in -[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L3) +[lib/types/UserKind.ts:3](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L3) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L5) +[lib/types/UserKind.ts:5](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L5) ___ @@ -50,7 +50,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L6) +[lib/types/UserKind.ts:6](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L6) ___ @@ -60,7 +60,7 @@ ___ #### Defined in -[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L2) +[lib/types/UserKind.ts:2](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L2) ___ @@ -70,4 +70,4 @@ ___ #### Defined in -[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/eace49c/src/lib/types/UserKind.ts#L4) +[lib/types/UserKind.ts:4](https://github.com/patrickkfkan/bandcamp-fetch/blob/19ec315/src/lib/types/UserKind.ts#L4) diff --git a/package-lock.json b/package-lock.json index 2f7f6ac..b7a1bd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,24 @@ { "name": "bandcamp-fetch", - "version": "1.0.0-dev", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bandcamp-fetch", - "version": "1.0.0-dev", + "version": "1.0.2", "license": "MIT", "dependencies": { "bottleneck": "^2.19.5", "cheerio": "^1.0.0-rc.5", + "cookie": "^0.5.0", "eval5": "^1.4.7", "html-entities": "^2.0.2", "node-cache": "^5.1.2", "node-fetch": "^2.6.9" }, "devDependencies": { + "@types/cookie": "^0.5.3", "@types/node": "^14.18.38", "@types/node-fetch": "^2.6.4", "@typescript-eslint/eslint-plugin": "^5.56.0", @@ -255,6 +257,12 @@ "@types/estree": "*" } }, + "node_modules/@types/cookie": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.3.tgz", + "integrity": "sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==", + "dev": true + }, "node_modules/@types/estree": { "version": "0.0.41", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.41.tgz", @@ -765,6 +773,14 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -2619,6 +2635,12 @@ "@types/estree": "*" } }, + "@types/cookie": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.3.tgz", + "integrity": "sha512-SLg07AS9z1Ab2LU+QxzU8RCmzsja80ywjf/t5oqw+4NSH20gIGlhLOrBDm1L3PBWzPa4+wkgFQVZAjE6Ioj2ug==", + "dev": true + }, "@types/estree": { "version": "0.0.41", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.41.tgz", @@ -2971,6 +2993,11 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", diff --git a/package.json b/package.json index 4c81675..a51d999 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "node": ">=14" }, "devDependencies": { + "@types/cookie": "^0.5.3", "@types/node": "^14.18.38", "@types/node-fetch": "^2.6.4", "@typescript-eslint/eslint-plugin": "^5.56.0", @@ -54,6 +55,7 @@ "dependencies": { "bottleneck": "^2.19.5", "cheerio": "^1.0.0-rc.5", + "cookie": "^0.5.0", "eval5": "^1.4.7", "html-entities": "^2.0.2", "node-cache": "^5.1.2", diff --git a/src/index.ts b/src/index.ts index 811b0a2..cbcca27 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,7 @@ -import AlbumAPI, { LimiterAlbumAPI } from './lib/album/AlbumAPI'; -import ArticleAPI, { LimiterArticleAPI } from './lib/article/ArticleAPI'; -import BandAPI, { LimiterBandAPI } from './lib/band/BandAPI'; -import DiscoveryAPI, { LimiterDiscoveryAPI } from './lib/discovery/DiscoveryAPI'; -import FanAPI, { LimiterFanAPI } from './lib/fan/FanAPI'; -import ImageAPI, { LimiterImageAPI } from './lib/image/ImageAPI'; -import ShowAPI, { LimiterShowAPI } from './lib/show/ShowAPI'; -import TagAPI, { LimiterTagAPI } from './lib/tag/TagAPI'; -import TrackAPI, { LimiterTrackAPI } from './lib/track/TrackAPI'; -import SearchAPI, { LimiterSearchAPI } from './lib/search/SearchAPI'; -import AutocompleteAPI, { LimiterAutocompleteAPI } from './lib/autocomplete/AutocompleteAPI'; -import Limiter from './lib/utils/Limiter'; -import { CacheDataType, Cache as CacheImpl } from './lib/utils/Cache'; +import BandcampFetch from './lib/BandcampFetch'; +export { default as BaseAPI } from './lib/common/BaseAPI'; +export { default as BaseAPIWithImageSupport } from './lib/common/BaseAPIWithImageSupport'; export { default as AlbumAPI } from './lib/album/AlbumAPI'; export { default as ArticleAPI } from './lib/article/ArticleAPI'; export { default as BandAPI } from './lib/band/BandAPI'; @@ -24,6 +14,8 @@ export { default as TrackAPI } from './lib/track/TrackAPI'; export { default as SearchAPI } from './lib/search/SearchAPI'; export { default as AutocompleteAPI } from './lib/autocomplete/AutocompleteAPI'; +export * from './lib/common/BaseAPI'; +export * from './lib/common/BaseAPIWithImageSupport'; export * from './lib/album/AlbumAPI'; export * from './lib/discovery/DiscoveryAPI'; export * from './lib/image/ImageAPI'; @@ -51,7 +43,12 @@ export * from './lib/types/Track'; export * from './lib/types/UserKind'; export * from './lib/types/Search'; export * from './lib/types/Autocomplete'; -export { CacheDataType } from './lib/utils/Cache'; + +export { default as Cache } from './lib/utils/Cache'; +export * from './lib/utils/Cache'; +export { default as Fetcher } from './lib/utils/Fetcher'; +export * from './lib/utils/Fetcher'; +export { default as Limiter } from './lib/utils/Limiter'; export { default as Album } from './lib/types/Album'; export { default as Article } from './lib/types/Article'; @@ -65,45 +62,7 @@ export { default as Track } from './lib/types/Track'; export { default as UserKind } from './lib/types/UserKind'; export { default as NameValuePair } from './lib/utils/NameValuePair'; -export class Cache { - static clear(type?: CacheDataType) { - CacheImpl.clear(type); - } +export { default as BandcampFetch } from './lib/BandcampFetch'; +export * from './lib/BandcampFetch'; - static setTTL(type: CacheDataType, ttl: number) { - CacheImpl.setTTL(type, ttl); - } - - static setMaxPages(maxPages: number) { - CacheImpl.setMaxEntries(CacheDataType.Page, maxPages); - } -} - -export default { - album: AlbumAPI, - track: TrackAPI, - discovery: DiscoveryAPI, - image: ImageAPI, - band: BandAPI, - tag: TagAPI, - article: ArticleAPI, - show: ShowAPI, - fan: FanAPI, - search: SearchAPI, - autocomplete: AutocompleteAPI, - limiter: { - album: LimiterAlbumAPI, - track: LimiterTrackAPI, - discovery: LimiterDiscoveryAPI, - image: LimiterImageAPI, - band: LimiterBandAPI, - tag: LimiterTagAPI, - article: LimiterArticleAPI, - show: LimiterShowAPI, - fan: LimiterFanAPI, - search: LimiterSearchAPI, - autocomplete: LimiterAutocompleteAPI, - updateSettings: Limiter.updateSettings.bind(Limiter) - }, - cache: Cache -}; +export default new BandcampFetch(); diff --git a/src/lib/BandcampFetch.ts b/src/lib/BandcampFetch.ts new file mode 100644 index 0000000..c8d46ae --- /dev/null +++ b/src/lib/BandcampFetch.ts @@ -0,0 +1,142 @@ +import Bottleneck from 'bottleneck'; +import AlbumAPI, { LimiterAlbumAPI } from './album/AlbumAPI'; +import ArticleAPI, { LimiterArticleAPI } from './article/ArticleAPI'; +import AutocompleteAPI, { LimiterAutocompleteAPI } from './autocomplete/AutocompleteAPI'; +import BandAPI, { LimiterBandAPI } from './band/BandAPI'; +import DiscoveryAPI, { LimiterDiscoveryAPI } from './discovery/DiscoveryAPI'; +import FanAPI, { LimiterFanAPI } from './fan/FanAPI'; +import ImageAPI, { LimiterImageAPI } from './image/ImageAPI'; +import SearchAPI, { LimiterSearchAPI } from './search/SearchAPI'; +import ShowAPI, { LimiterShowAPI } from './show/ShowAPI'; +import TagAPI, { LimiterTagAPI } from './tag/TagAPI'; +import TrackAPI, { LimiterTrackAPI } from './track/TrackAPI'; +import Cache, { CacheDataType } from './utils/Cache'; +import Fetcher from './utils/Fetcher'; +import Limiter from './utils/Limiter'; + +export interface BandcampFetchParams { + cookie?: string | null; +} + +export default class BandcampFetch { + + #cookie?: string | null; + #fetcher: Fetcher; + #cache: Cache; + #wrappedCache: CacheWrapper; + #limiter: Limiter; + + readonly album: AlbumAPI; + readonly track: TrackAPI; + readonly discovery: DiscoveryAPI; + readonly image: ImageAPI; + readonly band: BandAPI; + readonly tag: TagAPI; + readonly article: ArticleAPI; + readonly show: ShowAPI; + readonly fan: FanAPI; + readonly search: SearchAPI; + readonly autocomplete: AutocompleteAPI; + + readonly limiter: { + readonly album: LimiterAlbumAPI; + readonly track: LimiterTrackAPI; + readonly discovery: LimiterDiscoveryAPI; + readonly image: LimiterImageAPI; + readonly band: LimiterBandAPI; + readonly tag: LimiterTagAPI; + readonly article: LimiterArticleAPI; + readonly show: LimiterShowAPI; + readonly fan: LimiterFanAPI; + readonly search: LimiterSearchAPI; + readonly autocomplete: LimiterAutocompleteAPI; + updateSettings: (options?: Bottleneck.ConstructorOptions) => void; + }; + + constructor(params?: BandcampFetchParams) { + this.#cookie = params?.cookie; + this.#cache = new Cache({ + [CacheDataType.Constants]: 3600, + [CacheDataType.Page]: 300 + }, { page: 10 }); + this.#wrappedCache = new CacheWrapper(this.#cache); + this.#fetcher = new Fetcher({ + cookie: this.#cookie, + cache: this.#cache + }); + this.#limiter = new Limiter(); + + const baseAPIParams = { + fetcher: this.#fetcher, + cache: this.#cache, + limiter: this.#limiter + }; + this.image = new ImageAPI(baseAPIParams); + + const baseAPIWithImageSupportParams = { + ...baseAPIParams, + imageAPI: this.image + }; + + this.album = new AlbumAPI(baseAPIWithImageSupportParams); + this.track = new TrackAPI(baseAPIWithImageSupportParams); + this.discovery = new DiscoveryAPI(baseAPIWithImageSupportParams); + this.image = new ImageAPI(baseAPIParams); + this.band = new BandAPI(baseAPIWithImageSupportParams); + this.tag = new TagAPI(baseAPIWithImageSupportParams); + this.article = new ArticleAPI(baseAPIWithImageSupportParams); + this.show = new ShowAPI(baseAPIWithImageSupportParams); + this.fan = new FanAPI(baseAPIWithImageSupportParams); + this.search = new SearchAPI(baseAPIWithImageSupportParams); + this.autocomplete = new AutocompleteAPI(baseAPIParams); + + this.limiter = { + album: new LimiterAlbumAPI(baseAPIWithImageSupportParams), + track: new LimiterTrackAPI(baseAPIWithImageSupportParams), + discovery: new LimiterDiscoveryAPI(baseAPIWithImageSupportParams), + image: new LimiterImageAPI(baseAPIParams), + band: new LimiterBandAPI(baseAPIWithImageSupportParams), + tag: new LimiterTagAPI(baseAPIWithImageSupportParams), + article: new LimiterArticleAPI(baseAPIWithImageSupportParams), + show: new LimiterShowAPI(baseAPIWithImageSupportParams), + fan: new LimiterFanAPI(baseAPIWithImageSupportParams), + search: new LimiterSearchAPI(baseAPIWithImageSupportParams), + autocomplete: new LimiterAutocompleteAPI(baseAPIParams), + updateSettings: this.#limiter.updateSettings.bind(this.#limiter) + }; + } + + setCookie(value?: string | null) { + this.#cookie = value; + this.#fetcher.setCookie(value); + } + + get cookie() { + return this.#cookie; + } + + get cache() { + return this.#wrappedCache; + } +} + +export class CacheWrapper { + + #cache: Cache; + + constructor(cache: Cache) { + this.#cache = cache; + } + + clear(type?: CacheDataType) { + this.#cache.clear(type); + } + + setTTL(type: CacheDataType, ttl: number) { + this.#cache.setTTL(type, ttl); + } + + setMaxPages(maxPages: number) { + this.#cache.setMaxEntries(CacheDataType.Page, maxPages); + } +} diff --git a/src/lib/album/AlbumAPI.ts b/src/lib/album/AlbumAPI.ts index 43d5ec2..1a9024f 100644 --- a/src/lib/album/AlbumAPI.ts +++ b/src/lib/album/AlbumAPI.ts @@ -1,9 +1,8 @@ import Album from '../types/Album'; import { ImageFormat } from '../types/Image'; -import ImageAPI from '../image/ImageAPI'; -import { fetchPage } from '../utils/Fetch'; import AlbumInfoParser from './AlbumInfoParser'; import Limiter from '../utils/Limiter'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; export interface AlbumAPIGetInfoParams { albumUrl: string; @@ -12,22 +11,31 @@ export interface AlbumAPIGetInfoParams { includeRawData?: boolean; } -export default class AlbumAPI { - static async getInfo(params: AlbumAPIGetInfoParams): Promise { - const imageConstants = await ImageAPI.getConstants(); +export default class AlbumAPI extends BaseAPIWithImageSupport { + + async getInfo(params: AlbumAPIGetInfoParams): Promise { + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, - albumImageFormat: await ImageAPI.getFormat(params.albumImageFormat, 9), - artistImageFormat: await ImageAPI.getFormat(params.artistImageFormat, 21), + albumImageFormat: await this.imageAPI.getFormat(params.albumImageFormat, 9), + artistImageFormat: await this.imageAPI.getFormat(params.artistImageFormat, 21), includeRawData: params.includeRawData !== undefined ? params.includeRawData : false }; - const html = await fetchPage(params.albumUrl); + const html = await this.fetch(params.albumUrl); return AlbumInfoParser.parseInfo(html, opts); } } export class LimiterAlbumAPI extends AlbumAPI { - static async getInfo(params: AlbumAPIGetInfoParams): Promise { - return Limiter.schedule(() => super.getInfo(params)); + + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; + } + + async getInfo(params: AlbumAPIGetInfoParams): Promise { + return this.#limiter.schedule(() => super.getInfo(params)); } } diff --git a/src/lib/article/ArticleAPI.ts b/src/lib/article/ArticleAPI.ts index 5310406..254ec18 100644 --- a/src/lib/article/ArticleAPI.ts +++ b/src/lib/article/ArticleAPI.ts @@ -1,8 +1,7 @@ -import ImageAPI from '../image/ImageAPI'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; import Article, { ArticleCategorySection, ArticleList } from '../types/Article'; import { ImageFormat } from '../types/Image'; import { URLS } from '../utils/Constants'; -import { fetchPage } from '../utils/Fetch'; import Limiter from '../utils/Limiter'; import { normalizeUrl } from '../utils/Parse'; import ArticleCategoryParser from './ArticleCategoryParser'; @@ -22,45 +21,52 @@ export interface ArticleAPIListParams { page?: number; } -export default class ArticleAPI { +export default class ArticleAPI extends BaseAPIWithImageSupport { - static async getCategories(): Promise { - const html = await fetchPage(URLS.DAILY); + async getCategories(): Promise { + const html = await this.fetch(URLS.DAILY); return ArticleCategoryParser.parseCategories(html); } - static async getArticle(params: ArticleAPIGetArticleParams): Promise
{ - const imageConstants = await ImageAPI.getConstants(); + async getArticle(params: ArticleAPIGetArticleParams): Promise
{ + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, - albumImageFormat: await ImageAPI.getFormat(params.albumImageFormat, 9), - artistImageFormat: await ImageAPI.getFormat(params.artistImageFormat, 21), + albumImageFormat: await this.imageAPI.getFormat(params.albumImageFormat, 9), + artistImageFormat: await this.imageAPI.getFormat(params.artistImageFormat, 21), includeRawData: !!params.includeRawData }; - const html = await fetchPage(params.articleUrl); + const html = await this.fetch(params.articleUrl); return ArticleParser.parseArticle(html, opts); } - static async list(params?: ArticleAPIListParams): Promise { + async list(params?: ArticleAPIListParams): Promise { let url = params?.categoryUrl ? params.categoryUrl : normalizeUrl('latest', URLS.DAILY); if (params?.page) { url += `?page=${params.page}`; } const opts = { - imageFormat: await ImageAPI.getFormat(params?.imageFormat) + imageFormat: await this.imageAPI.getFormat(params?.imageFormat) }; - const html = await fetchPage(url); + const html = await this.fetch(url); return ArticleListParser.parseList(html, opts); } } export class LimiterArticleAPI extends ArticleAPI { - static async getCategories(): Promise { - return Limiter.schedule(() => super.getCategories()); + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async getArticle(params: ArticleAPIGetArticleParams): Promise
{ - return Limiter.schedule(() => super.getArticle(params)); + async getCategories(): Promise { + return this.#limiter.schedule(() => super.getCategories()); + } + + async getArticle(params: ArticleAPIGetArticleParams): Promise
{ + return this.#limiter.schedule(() => super.getArticle(params)); } } diff --git a/src/lib/autocomplete/AutocompleteAPI.ts b/src/lib/autocomplete/AutocompleteAPI.ts index 8b23ef0..e7ba1d2 100644 --- a/src/lib/autocomplete/AutocompleteAPI.ts +++ b/src/lib/autocomplete/AutocompleteAPI.ts @@ -1,8 +1,9 @@ import { URLS } from '../utils/Constants'; -import { FetchMethod, fetchPage } from '../utils/Fetch'; import { AutoCompleteTag, AutocompleteLocation } from '../types/Autocomplete'; import AutocompleteResultsParser from './AutocompleteResultsParser'; import Limiter from '../utils/Limiter'; +import BaseAPI, { BaseAPIParams } from '../common/BaseAPI'; +import { FetchMethod } from '../utils/Fetcher'; export enum AutocompleteItemType { Tag = 'Tag', @@ -15,12 +16,12 @@ export interface AutocompleteAPIGetSuggestionsParams { limit?: number; } -export default class AutocompleteAPI { +export default class AutocompleteAPI extends BaseAPI { - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Location }): Promise; - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Tag }): Promise; - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise; - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise { + getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Location }): Promise; + getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Tag }): Promise; + getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise; + getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise { if (params.itemType === AutocompleteItemType.Tag) { return this.getAutocompleteTags(params); } @@ -31,37 +32,44 @@ export default class AutocompleteAPI { /** * @internal */ - protected static async getAutocompleteTags(params: AutocompleteAPIGetSuggestionsParams) { + protected async getAutocompleteTags(params: AutocompleteAPIGetSuggestionsParams) { const payload = { search_term: params.query, count: params.limit || 5 }; - const json = await fetchPage(URLS.AUTOCOMPLETE.TAG, true, FetchMethod.POST, payload); + const json = await this.fetch(URLS.AUTOCOMPLETE.TAG, true, FetchMethod.POST, payload); return AutocompleteResultsParser.parseTags(json); } /** * @internal */ - protected static async getAutocompleteLocations(params: AutocompleteAPIGetSuggestionsParams) { + protected async getAutocompleteLocations(params: AutocompleteAPIGetSuggestionsParams) { const payload = { q: params.query, n: params.limit || 5, geocoder_fallback: true }; - const json = await fetchPage(URLS.AUTOCOMPLETE.LOCATION, true, FetchMethod.POST, payload); + const json = await this.fetch(URLS.AUTOCOMPLETE.LOCATION, true, FetchMethod.POST, payload); return AutocompleteResultsParser.parseLocations(json); } } export class LimiterAutocompleteAPI extends AutocompleteAPI { - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Location; }): Promise; - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Tag; }): Promise; - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise; - static getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise { - return Limiter.schedule(() => super.getSuggestions(params)); + #limiter: Limiter; + + constructor(params: BaseAPIParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; + } + + getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Location; }): Promise; + getSuggestions(params: AutocompleteAPIGetSuggestionsParams & { itemType: AutocompleteItemType.Tag; }): Promise; + getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise; + getSuggestions(params: AutocompleteAPIGetSuggestionsParams): Promise { + return this.#limiter.schedule(() => super.getSuggestions(params)); } } diff --git a/src/lib/band/BandAPI.ts b/src/lib/band/BandAPI.ts index 74393f3..8193c16 100644 --- a/src/lib/band/BandAPI.ts +++ b/src/lib/band/BandAPI.ts @@ -1,10 +1,9 @@ -import ImageAPI from '../image/ImageAPI'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; import Album from '../types/Album'; import Artist from '../types/Artist'; import { ImageFormat } from '../types/Image'; import Label, { LabelArtist } from '../types/Label'; import Track from '../types/Track'; -import { fetchPage } from '../utils/Fetch'; import Limiter from '../utils/Limiter'; import { normalizeUrl } from '../utils/Parse'; import BandInfoParser from './BandInfoParser'; @@ -27,40 +26,40 @@ export interface BandAPIGetLabelArtistsParams { imageFormat?: string | number | ImageFormat; } -export default class BandAPI { +export default class BandAPI extends BaseAPIWithImageSupport { - static async getDiscography(params: BandAPIGetDiscographyParams): Promise> { - const imageConstants = await ImageAPI.getConstants(); + async getDiscography(params: BandAPIGetDiscographyParams): Promise> { + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, bandUrl: params.bandUrl, - imageFormat: await ImageAPI.getFormat(params.imageFormat, 9) + imageFormat: await this.imageAPI.getFormat(params.imageFormat, 9) }; - const html = await fetchPage(normalizeUrl('music', params.bandUrl)); + const html = await this.fetch(normalizeUrl('music', params.bandUrl)); return DiscographyParser.parseDiscography(html, opts); } - static async getInfo(params: BandAPIGetInfoParams): Promise { + async getInfo(params: BandAPIGetInfoParams): Promise { const opts = { bandUrl: params.bandUrl, - imageFormat: await ImageAPI.getFormat(params.imageFormat, 21) + imageFormat: await this.imageAPI.getFormat(params.imageFormat, 21) }; - const url = this.getUrl(params.bandUrl); - const html = await fetchPage(url); + const url = BandAPI.getUrl(params.bandUrl); + const html = await this.fetch(url); const result = BandInfoParser.parseInfo(html, opts); // Return if result is complete - if (this.isInfoComplete(result)) { + if (BandAPI.isInfoComplete(result)) { return result; } // Info lacking name or label (for artist) - try getting them from music page - const musicUrl = this.getUrl(params.bandUrl, 'music'); - const musicHtml = await fetchPage(musicUrl); + const musicUrl = BandAPI.getUrl(params.bandUrl, 'music'); + const musicHtml = await this.fetch(musicUrl); const info = BandInfoParser.parseInfo(musicHtml, opts); - this.fillInfo(result, info); + BandAPI.fillInfo(result, info); // Return if result is complete - if (this.isInfoComplete(result)) { + if (BandAPI.isInfoComplete(result)) { return result; } @@ -70,9 +69,9 @@ export default class BandAPI { if (discogItems[0]) { const url = discogItems[0]?.url; if (url) { - const html = await fetchPage(url); + const html = await this.fetch(url); const info = BandInfoParser.parseInfo(html, opts); - this.fillInfo(result, info); + BandAPI.fillInfo(result, info); } } @@ -83,13 +82,13 @@ export default class BandAPI { return result; } - static async getLabelArtists(params: BandAPIGetLabelArtistsParams): Promise { + async getLabelArtists(params: BandAPIGetLabelArtistsParams): Promise { const opts = { labelUrl: params.labelUrl, - imageFormat: await ImageAPI.getFormat(params.imageFormat) + imageFormat: await this.imageAPI.getFormat(params.imageFormat) }; - const html = await fetchPage(normalizeUrl('artists', params.labelUrl)); + const html = await this.fetch(normalizeUrl('artists', params.labelUrl)); return LabelArtistsParser.parseLabelArtists(html, opts); } @@ -132,15 +131,22 @@ export default class BandAPI { export class LimiterBandAPI extends BandAPI { - static async getDiscography(params: BandAPIGetDiscographyParams): Promise<(Album | Track)[]> { - return Limiter.schedule(() => super.getDiscography(params)); + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async getInfo(params: BandAPIGetInfoParams): Promise { - return Limiter.schedule(() => super.getInfo(params)); + async getDiscography(params: BandAPIGetDiscographyParams): Promise<(Album | Track)[]> { + return this.#limiter.schedule(() => super.getDiscography(params)); } - static async getLabelArtists(params: BandAPIGetLabelArtistsParams): Promise { - return Limiter.schedule(() => super.getLabelArtists(params)); + async getInfo(params: BandAPIGetInfoParams): Promise { + return this.#limiter.schedule(() => super.getInfo(params)); + } + + async getLabelArtists(params: BandAPIGetLabelArtistsParams): Promise { + return this.#limiter.schedule(() => super.getLabelArtists(params)); } } diff --git a/src/lib/common/BaseAPI.ts b/src/lib/common/BaseAPI.ts new file mode 100644 index 0000000..6c1dba8 --- /dev/null +++ b/src/lib/common/BaseAPI.ts @@ -0,0 +1,28 @@ +import Cache from '../utils/Cache'; +import Fetcher, { FetchMethod } from '../utils/Fetcher'; + +export interface BaseAPIParams { + fetcher: Fetcher; + cache: Cache; +} + +export default abstract class BaseAPI { + + #fetcher: Fetcher; + #cache: Cache; + + constructor(params: BaseAPIParams) { + this.#fetcher = params.fetcher; + this.#cache = params.cache; + } + + protected fetch(url: string, jsonResponse: true, method?: FetchMethod, payload?: Record): Promise; + protected fetch(url: string, jsonResponse?: boolean, method?: FetchMethod, payload?: Record): Promise; + protected fetch(url: string, jsonResponse?: boolean, method?: FetchMethod, payload?: Record) { + return this.#fetcher.fetch(url, jsonResponse, method, payload); + } + + protected get cache() { + return this.#cache; + } +} diff --git a/src/lib/common/BaseAPIWithImageSupport.ts b/src/lib/common/BaseAPIWithImageSupport.ts new file mode 100644 index 0000000..d48bd2c --- /dev/null +++ b/src/lib/common/BaseAPIWithImageSupport.ts @@ -0,0 +1,20 @@ +import ImageAPI from '../image/ImageAPI'; +import BaseAPI, { BaseAPIParams } from './BaseAPI'; + +export interface BaseAPIWithImageSupportParams extends BaseAPIParams { + imageAPI: ImageAPI; +} + +export default abstract class BaseAPIWithImageSupport extends BaseAPI { + + #imageAPI: ImageAPI; + + constructor(params: BaseAPIWithImageSupportParams) { + super(params); + this.#imageAPI = params.imageAPI; + } + + get imageAPI() { + return this.#imageAPI; + } +} diff --git a/src/lib/discovery/DiscoveryAPI.ts b/src/lib/discovery/DiscoveryAPI.ts index 9a3e6b4..11a5e20 100644 --- a/src/lib/discovery/DiscoveryAPI.ts +++ b/src/lib/discovery/DiscoveryAPI.ts @@ -1,8 +1,8 @@ -import ImageAPI from '../image/ImageAPI'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; import { DiscoverOptions, DiscoverParams, DiscoverResult } from '../types/Discovery'; -import { Cache, CacheDataType } from '../utils/Cache'; +import { CacheDataType } from '../utils/Cache'; import { URLS } from '../utils/Constants'; -import { FetchMethod, fetchPage } from '../utils/Fetch'; +import { FetchMethod } from '../utils/Fetcher'; import Limiter from '../utils/Limiter'; import NameValuePair from '../utils/NameValuePair'; import DiscoverOptionsParser from './DiscoverOptionsParser'; @@ -19,16 +19,16 @@ interface DiscoverRequestPayload { w?: number; // Time } -export default class DiscoveryAPI { +export default class DiscoveryAPI extends BaseAPIWithImageSupport { - static async getAvailableOptions(): Promise { - return Cache.getOrSet(CacheDataType.Constants, 'discoverOptions', async () => { - const html = await fetchPage(URLS.SITE_URL); + async getAvailableOptions(): Promise { + return this.cache.getOrSet(CacheDataType.Constants, 'discoverOptions', async () => { + const html = await this.fetch(URLS.SITE_URL); return DiscoverOptionsParser.parseOptions(html); }); } - static async sanitizeDiscoverParams(params?: DiscoverParams): Promise { + async sanitizeDiscoverParams(params?: DiscoverParams): Promise { const options = await this.getAvailableOptions(); const _getOptionValue = (optArr: NameValuePair[], value?: T, defaultIndex = 0) => { @@ -73,12 +73,12 @@ export default class DiscoveryAPI { return sanitized; } - static async discover(params?: DiscoverParams): Promise { - const imageConstants = await ImageAPI.getConstants(); + async discover(params?: DiscoverParams): Promise { + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, - albumImageFormat: await ImageAPI.getFormat(params?.albumImageFormat, 9), - artistImageFormat: await ImageAPI.getFormat(params?.artistImageFormat, 21) + albumImageFormat: await this.imageAPI.getFormat(params?.albumImageFormat, 9), + artistImageFormat: await this.imageAPI.getFormat(params?.artistImageFormat, 21) }; const sanitizedParams = await this.sanitizeDiscoverParams(params); @@ -92,8 +92,8 @@ export default class DiscoveryAPI { delete sanitizedParams.subgenre; } - const payload = this.getDiscoverRequestPayload(sanitizedParams); - const json = await fetchPage(URLS.DISCOVER_URL, true, FetchMethod.GET, payload); + const payload = DiscoveryAPI.getDiscoverRequestPayload(sanitizedParams); + const json = await this.fetch(URLS.DISCOVER_URL, true, FetchMethod.GET, payload); return DiscoverResultParser.parseDiscoverResult(json, opts, resultParams); } @@ -131,15 +131,22 @@ export default class DiscoveryAPI { export class LimiterDiscoveryAPI extends DiscoveryAPI { - static async getAvailableOptions(): Promise { - return Limiter.schedule(() => super.getAvailableOptions()); + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async sanitizeDiscoverParams(params: DiscoverParams): Promise { - return Limiter.schedule(() => super.sanitizeDiscoverParams(params)); + async getAvailableOptions(): Promise { + return this.#limiter.schedule(() => super.getAvailableOptions()); } - static async discover(params: DiscoverParams): Promise { - return Limiter.schedule(() => super.discover(params)); + async sanitizeDiscoverParams(params: DiscoverParams): Promise { + return this.#limiter.schedule(() => super.sanitizeDiscoverParams(params)); + } + + async discover(params: DiscoverParams): Promise { + return this.#limiter.schedule(() => super.discover(params)); } } diff --git a/src/lib/fan/FanAPI.ts b/src/lib/fan/FanAPI.ts index c42fa5d..e0e74bd 100644 --- a/src/lib/fan/FanAPI.ts +++ b/src/lib/fan/FanAPI.ts @@ -1,8 +1,7 @@ -import ImageAPI from '../image/ImageAPI'; import Fan, { FanItemsContinuation } from '../types/Fan'; import { ImageFormat } from '../types/Image'; import { URLS } from '../utils/Constants'; -import { FetchError, FetchMethod, fetchPage } from '../utils/Fetch'; +import { FetchError, FetchMethod } from '../utils/Fetcher'; import { FanContinuationItemsResult, FanItemParseOptions, FanPageItemsResult } from './FanItemsBaseParser'; import FanCollectionParser from './FanCollectionParser'; import FanFollowingParser from './FanFollowingParser'; @@ -13,6 +12,7 @@ import Track from '../types/Track'; import UserKind from '../types/UserKind'; import Tag from '../types/Tag'; import Limiter from '../utils/Limiter'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; export { FanPageItemsResult, FanContinuationItemsResult }; @@ -36,20 +36,20 @@ export interface FanAPIGetItemsFullParams extends FanAPIGetItemsParams { parseContinuationFn: (json: any, continuation: FanItemsContinuation, opts: FanItemParseOptions) => FanContinuationItemsResult; } -export default class FanAPI { +export default class FanAPI extends BaseAPIWithImageSupport { - static async getInfo(params: FanAPIGetInfoParams): Promise { - const imageConstants = await ImageAPI.getConstants(); - const fanPageUrl = this.getFanPageUrl(params.username); + async getInfo(params: FanAPIGetInfoParams): Promise { + const imageConstants = await this.imageAPI.getConstants(); + const fanPageUrl = FanAPI.getFanPageUrl(params.username); const opts = { imageBaseUrl: imageConstants.baseUrl, - imageFormat: await ImageAPI.getFormat(params.imageFormat, 20) + imageFormat: await this.imageAPI.getFormat(params.imageFormat, 20) }; - const html = await fetchPage(fanPageUrl); + const html = await this.fetch(fanPageUrl); return FanInfoParser.parseInfo(html, opts); } - static async getCollection(params: FanAPIGetItemsParams) { + async getCollection(params: FanAPIGetItemsParams) { return await this.getItems({ ...params, defaultImageFormat: 9, @@ -59,7 +59,7 @@ export default class FanAPI { }); } - static async getWishlist(params: FanAPIGetItemsParams) { + async getWishlist(params: FanAPIGetItemsParams) { return await this.getItems({ ...params, defaultImageFormat: 9, @@ -69,7 +69,7 @@ export default class FanAPI { }); } - static async getFollowingArtistsAndLabels(params: FanAPIGetItemsParams) { + async getFollowingArtistsAndLabels(params: FanAPIGetItemsParams) { return await this.getItems({ ...params, defaultImageFormat: 21, @@ -79,7 +79,7 @@ export default class FanAPI { }); } - static async getFollowingGenres(params: FanAPIGetItemsParams) { + async getFollowingGenres(params: FanAPIGetItemsParams) { return await this.getItems({ ...params, defaultImageFormat: 3, @@ -92,17 +92,17 @@ export default class FanAPI { /** * @internal */ - protected static async getItems(params: FanAPIGetItemsFullParams): Promise | FanContinuationItemsResult> { + protected async getItems(params: FanAPIGetItemsFullParams): Promise | FanContinuationItemsResult> { const { target, imageFormat, defaultImageFormat, continuationUrl } = params; - const imageConstants = await ImageAPI.getConstants(); + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, - imageFormat: await ImageAPI.getFormat(imageFormat, defaultImageFormat) + imageFormat: await this.imageAPI.getFormat(imageFormat, defaultImageFormat) }; - if (!this.isContinuation(target)) { - const fanPageUrl = this.getFanPageUrl(target as string); - const html = await fetchPage(fanPageUrl); + if (!FanAPI.isContinuation(target)) { + const fanPageUrl = FanAPI.getFanPageUrl(target as string); + const html = await this.fetch(fanPageUrl); return params.parsePageFn(html, opts); } @@ -117,7 +117,7 @@ export default class FanAPI { older_than_token: continuation.token, count: 20 }; - const json = await fetchPage(continuationUrl, true, FetchMethod.POST, payload); + const json = await this.fetch(continuationUrl, true, FetchMethod.POST, payload); return params.parseContinuationFn(json, continuation, opts); } @@ -138,23 +138,30 @@ export default class FanAPI { export class LimiterFanAPI extends FanAPI { - static async getInfo(params: FanAPIGetInfoParams): Promise { - return Limiter.schedule(() => super.getInfo(params)); + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async getCollection(params: FanAPIGetItemsParams): Promise> | FanContinuationItemsResult>> { - return Limiter.schedule(() => super.getCollection(params)); + async getInfo(params: FanAPIGetInfoParams): Promise { + return this.#limiter.schedule(() => super.getInfo(params)); } - static async getWishlist(params: FanAPIGetItemsParams): Promise> | FanContinuationItemsResult>> { - return Limiter.schedule(() => super.getWishlist(params)); + async getCollection(params: FanAPIGetItemsParams): Promise> | FanContinuationItemsResult>> { + return this.#limiter.schedule(() => super.getCollection(params)); } - static async getFollowingArtistsAndLabels(params: FanAPIGetItemsParams): Promise | FanContinuationItemsResult> { - return Limiter.schedule(() => super.getFollowingArtistsAndLabels(params)); + async getWishlist(params: FanAPIGetItemsParams): Promise> | FanContinuationItemsResult>> { + return this.#limiter.schedule(() => super.getWishlist(params)); } - static async getFollowingGenres(params: FanAPIGetItemsParams): Promise | FanContinuationItemsResult> { - return Limiter.schedule(() => super.getFollowingGenres(params)); + async getFollowingArtistsAndLabels(params: FanAPIGetItemsParams): Promise | FanContinuationItemsResult> { + return this.#limiter.schedule(() => super.getFollowingArtistsAndLabels(params)); + } + + async getFollowingGenres(params: FanAPIGetItemsParams): Promise | FanContinuationItemsResult> { + return this.#limiter.schedule(() => super.getFollowingGenres(params)); } } diff --git a/src/lib/image/ImageAPI.ts b/src/lib/image/ImageAPI.ts index 4e0e724..2f10801 100644 --- a/src/lib/image/ImageAPI.ts +++ b/src/lib/image/ImageAPI.ts @@ -1,7 +1,7 @@ +import BaseAPI, { BaseAPIParams } from '../common/BaseAPI'; import { ImageConstants, ImageFormat } from '../types/Image'; -import { Cache, CacheDataType } from '../utils/Cache'; +import { CacheDataType } from '../utils/Cache'; import { URLS } from '../utils/Constants'; -import { fetchPage } from '../utils/Fetch'; import Limiter from '../utils/Limiter'; import ImageParser from './ImageParser'; @@ -12,19 +12,19 @@ export enum ImageFormatFilter { Bio = 'bio' } -export default class ImageAPI { +export default class ImageAPI extends BaseAPI { /** * @internal */ - static async getConstants(): Promise { - return Cache.getOrSet(CacheDataType.Constants, 'imageConstants', async () => { - const html = await fetchPage(URLS.SITE_URL); + async getConstants(): Promise { + return this.cache.getOrSet(CacheDataType.Constants, 'imageConstants', async () => { + const html = await this.fetch(URLS.SITE_URL); return ImageParser.parseImageConstants(html); }); } - static async getFormat(target?: string | number | ImageFormat, fallbackId?: number): Promise { + async getFormat(target?: string | number | ImageFormat, fallbackId?: number): Promise { if (target && typeof target === 'object' && target.id !== undefined && target.name) { return target; } @@ -44,7 +44,7 @@ export default class ImageAPI { return null; } - static async getFormats(filter?: ImageFormatFilter): Promise { + async getFormats(filter?: ImageFormatFilter): Promise { const constants = await this.getConstants(); if (filter === ImageFormatFilter.Album) { return constants.formats.filter( (c) => c.name.startsWith('art_') ); @@ -59,11 +59,18 @@ export default class ImageAPI { export class LimiterImageAPI extends ImageAPI { - static async getFormats(filter?: ImageFormatFilter | undefined): Promise { - return Limiter.schedule(() => super.getFormats(filter)); + #limiter: Limiter; + + constructor(params: BaseAPIParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async getFormat(target?: string | number | ImageFormat | undefined, fallbackId?: number | undefined): Promise { - return Limiter.schedule(() => super.getFormat(target, fallbackId)); + async getFormats(filter?: ImageFormatFilter | undefined): Promise { + return this.#limiter.schedule(() => super.getFormats(filter)); + } + + async getFormat(target?: string | number | ImageFormat | undefined, fallbackId?: number | undefined): Promise { + return this.#limiter.schedule(() => super.getFormat(target, fallbackId)); } } diff --git a/src/lib/search/SearchAPI.ts b/src/lib/search/SearchAPI.ts index 8595d90..b55dd74 100644 --- a/src/lib/search/SearchAPI.ts +++ b/src/lib/search/SearchAPI.ts @@ -1,11 +1,10 @@ import { URL } from 'url'; -import ImageAPI from '../image/ImageAPI'; import { ImageFormat } from '../types/Image'; import { URLS } from '../utils/Constants'; -import { fetchPage } from '../utils/Fetch'; import SearchResultsParser from './SearchResultsParser'; import { SearchResultAlbum, SearchResultAny, SearchResultArtist, SearchResultFan, SearchResultLabel, SearchResultTrack, SearchResults } from '../types/Search'; import Limiter from '../utils/Limiter'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; export enum SearchItemType { All = 'All', @@ -22,43 +21,43 @@ export interface SearchAPISearchParams { artistImageFormat?: string | number | ImageFormat; } -export default class SearchAPI { +export default class SearchAPI extends BaseAPIWithImageSupport { - static async all(params: SearchAPISearchParams) { + async all(params: SearchAPISearchParams) { return this.search({ ...params, itemType: SearchItemType.All }); } - static async artistsAndLabels(params: SearchAPISearchParams) { + async artistsAndLabels(params: SearchAPISearchParams) { return this.search({ ...params, itemType: SearchItemType.ArtistsAndLabels }); } - static async albums(params: SearchAPISearchParams) { + async albums(params: SearchAPISearchParams) { return this.search({ ...params, itemType: SearchItemType.Albums }); } - static async tracks(params: SearchAPISearchParams) { + async tracks(params: SearchAPISearchParams) { return this.search({ ...params, itemType: SearchItemType.Tracks }); } - static async fans(params: SearchAPISearchParams) { + async fans(params: SearchAPISearchParams) { return this.search({ ...params, itemType: SearchItemType.Fans }); } /** * @internal */ - protected static async search(params: SearchAPISearchParams & { itemType: SearchItemType.ArtistsAndLabels }): Promise>; - protected static async search(params: SearchAPISearchParams & { itemType: SearchItemType.Albums }): Promise>; - protected static async search(params: SearchAPISearchParams & { itemType: SearchItemType.Tracks }): Promise>; - protected static async search(params: SearchAPISearchParams & { itemType: SearchItemType.Fans }): Promise>; - protected static async search(params: SearchAPISearchParams & { itemType: SearchItemType.All }): Promise>; - protected static async search(params: SearchAPISearchParams & { itemType: SearchItemType }): Promise { + protected async search(params: SearchAPISearchParams & { itemType: SearchItemType.ArtistsAndLabels }): Promise>; + protected async search(params: SearchAPISearchParams & { itemType: SearchItemType.Albums }): Promise>; + protected async search(params: SearchAPISearchParams & { itemType: SearchItemType.Tracks }): Promise>; + protected async search(params: SearchAPISearchParams & { itemType: SearchItemType.Fans }): Promise>; + protected async search(params: SearchAPISearchParams & { itemType: SearchItemType.All }): Promise>; + protected async search(params: SearchAPISearchParams & { itemType: SearchItemType }): Promise { const opts = { itemType: params.itemType || SearchItemType.All, - albumImageFormat: await ImageAPI.getFormat(params.albumImageFormat, 9), - artistImageFormat: await ImageAPI.getFormat(params.artistImageFormat, 21) + albumImageFormat: await this.imageAPI.getFormat(params.albumImageFormat, 9), + artistImageFormat: await this.imageAPI.getFormat(params.artistImageFormat, 21) }; - const html = await fetchPage(this.getSearchUrl(params)); + const html = await this.fetch(SearchAPI.getSearchUrl(params)); return SearchResultsParser.parseResults(html, opts); } @@ -90,23 +89,30 @@ export default class SearchAPI { export class LimiterSearchAPI extends SearchAPI { - static async all(params: SearchAPISearchParams): Promise> { - return Limiter.schedule(() => super.all(params)); + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async artistsAndLabels(params: SearchAPISearchParams): Promise> { - return Limiter.schedule(() => super.artistsAndLabels(params)); + async all(params: SearchAPISearchParams): Promise> { + return this.#limiter.schedule(() => super.all(params)); } - static async albums(params: SearchAPISearchParams): Promise> { - return Limiter.schedule(() => super.albums(params)); + async artistsAndLabels(params: SearchAPISearchParams): Promise> { + return this.#limiter.schedule(() => super.artistsAndLabels(params)); } - static async tracks(params: SearchAPISearchParams): Promise> { - return Limiter.schedule(() => super.tracks(params)); + async albums(params: SearchAPISearchParams): Promise> { + return this.#limiter.schedule(() => super.albums(params)); } - static async fans(params: SearchAPISearchParams): Promise> { - return Limiter.schedule(() => super.fans(params)); + async tracks(params: SearchAPISearchParams): Promise> { + return this.#limiter.schedule(() => super.tracks(params)); + } + + async fans(params: SearchAPISearchParams): Promise> { + return this.#limiter.schedule(() => super.fans(params)); } } diff --git a/src/lib/show/ShowAPI.ts b/src/lib/show/ShowAPI.ts index bcf2aa2..84cdb41 100644 --- a/src/lib/show/ShowAPI.ts +++ b/src/lib/show/ShowAPI.ts @@ -1,8 +1,7 @@ -import ImageAPI from '../image/ImageAPI'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; import { ImageFormat } from '../types/Image'; import Show from '../types/Show'; import { URLS } from '../utils/Constants'; -import { fetchPage } from '../utils/Fetch'; import Limiter from '../utils/Limiter'; import ShowListParser from './ShowListParser'; import ShowParser from './ShowParser'; @@ -18,39 +17,46 @@ export interface ShowAPIListParams { imageFormat?: string | number | ImageFormat; } -export default class ShowAPI { +export default class ShowAPI extends BaseAPIWithImageSupport { - static async getShow(params: ShowAPIGetShowParams): Promise { - const imageConstants = await ImageAPI.getConstants(); + async getShow(params: ShowAPIGetShowParams): Promise { + const imageConstants = await this.imageAPI.getConstants(); const opts = { showUrl: params.showUrl, imageBaseUrl: imageConstants.baseUrl, - albumImageFormat: await ImageAPI.getFormat(params.albumImageFormat, 9), - artistImageFormat: await ImageAPI.getFormat(params.artistImageFormat, 21), - showImageFormat: await ImageAPI.getFormat(params.showImageFormat, 25) + albumImageFormat: await this.imageAPI.getFormat(params.albumImageFormat, 9), + artistImageFormat: await this.imageAPI.getFormat(params.artistImageFormat, 21), + showImageFormat: await this.imageAPI.getFormat(params.showImageFormat, 25) }; - const html = await fetchPage(params.showUrl); + const html = await this.fetch(params.showUrl); return ShowParser.parseShow(html, opts); } - static async list(params?: ShowAPIListParams) { - const imageConstants = await ImageAPI.getConstants(); + async list(params?: ShowAPIListParams) { + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, - imageFormat: await ImageAPI.getFormat(params?.imageFormat, 25) + imageFormat: await this.imageAPI.getFormat(params?.imageFormat, 25) }; - const json = await fetchPage(URLS.SHOWS, true); + const json = await this.fetch(URLS.SHOWS, true); return ShowListParser.parseList(json, opts); } } export class LimiterShowAPI extends ShowAPI { - static async getShow(params: ShowAPIGetShowParams): Promise { - return Limiter.schedule(() => super.getShow(params)); + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async list(params?: ShowAPIListParams | undefined): Promise { - return Limiter.schedule(() => super.list(params)); + async getShow(params: ShowAPIGetShowParams): Promise { + return this.#limiter.schedule(() => super.getShow(params)); + } + + async list(params?: ShowAPIListParams | undefined): Promise { + return this.#limiter.schedule(() => super.list(params)); } } diff --git a/src/lib/tag/TagAPI.ts b/src/lib/tag/TagAPI.ts index 572e793..caeb1b3 100644 --- a/src/lib/tag/TagAPI.ts +++ b/src/lib/tag/TagAPI.ts @@ -1,8 +1,8 @@ -import ImageAPI from '../image/ImageAPI'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; import { ImageFormat } from '../types/Image'; import Tag, { AlbumHighlightsByTag, ReleasesByTag, TagList } from '../types/Tag'; import { URLS } from '../utils/Constants'; -import { FetchMethod, fetchPage } from '../utils/Fetch'; +import { FetchMethod } from '../utils/Fetcher'; import Limiter from '../utils/Limiter'; import { ParseError, normalizeUrl, splitUrl } from '../utils/Parse'; import AlbumHighlightsByTagParser from './AlbumHighlightsByTagParser'; @@ -23,40 +23,40 @@ export interface TagAPIGetReleasesParams { page?: number; } -export default class TagAPI { +export default class TagAPI extends BaseAPIWithImageSupport { - static async list(): Promise { - const html = await fetchPage(normalizeUrl('tags')); + async list(): Promise { + const html = await this.fetch(normalizeUrl('tags')); return TagListParser.parseTags(html); } - static async getInfo(tagUrl: string): Promise { - const html = await fetchPage(tagUrl); + async getInfo(tagUrl: string): Promise { + const html = await this.fetch(tagUrl); return TagInfoParser.parseInfo(html, tagUrl); } - static async getAlbumHighlights(params: TagAPIGetAlbumHighlightsParams): Promise { - const imageConstants = await ImageAPI.getConstants(); + async getAlbumHighlights(params: TagAPIGetAlbumHighlightsParams): Promise { + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, - imageFormat: await ImageAPI.getFormat(params.imageFormat, 9) + imageFormat: await this.imageAPI.getFormat(params.imageFormat, 9) }; - const html = await fetchPage(params.tagUrl); + const html = await this.fetch(params.tagUrl); return AlbumHighlightsByTagParser.parseHighlights(html, opts); } - static async getReleasesAvailableFilters(tagUrl: string): Promise { + async getReleasesAvailableFilters(tagUrl: string): Promise { const filterValueNames = await this.getReleaseFilterValueNames(tagUrl); - const html = await fetchPage(tagUrl); + const html = await this.fetch(tagUrl); return ReleasesByTagParser.parseFilters(html, filterValueNames); } - static async getReleases(params: TagAPIGetReleasesParams): Promise { - const imageConstants = await ImageAPI.getConstants(); + async getReleases(params: TagAPIGetReleasesParams): Promise { + const imageConstants = await this.imageAPI.getConstants(); const opts = { imageBaseUrl: imageConstants.baseUrl, - imageFormat: await ImageAPI.getFormat(params.imageFormat, 9) + imageFormat: await this.imageAPI.getFormat(params.imageFormat, 9) }; const _getDefaultFilters = async (tagUrl: string) => { @@ -117,21 +117,21 @@ export default class TagAPI { page: params.page || 1 }; - const json = await fetchPage(URLS.DIG_DEEPER, true, FetchMethod.POST, postData); + const json = await this.fetch(URLS.DIG_DEEPER, true, FetchMethod.POST, postData); return ReleasesByTagParser.parseReleases(json, opts); } /** * @internal */ - protected static async getReleaseFilterValueNames(tagUrl: string) { + protected async getReleaseFilterValueNames(tagUrl: string) { const url = `${tagUrl}?tab=all_releases`; - const html = await fetchPage(url); + const html = await this.fetch(url); const path = ReleasesByTagParser.parseHubJSPath(html); if (!path) { throw new ParseError(`Failed to obtain Hub JS path from ${url}`, html); } - const js = await fetchPage(path); + const js = await this.fetch(path); try { return ReleasesByTagParser.parseHubJSFilterValueNames(js); } @@ -143,23 +143,30 @@ export default class TagAPI { export class LimiterTagAPI extends TagAPI { - static async list(): Promise { - return Limiter.schedule(() => super.list()); + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; } - static async getInfo(tagUrl: string): Promise { - return Limiter.schedule(() => super.getInfo(tagUrl)); + async list(): Promise { + return this.#limiter.schedule(() => super.list()); } - static async getAlbumHighlights(params: TagAPIGetAlbumHighlightsParams): Promise { - return Limiter.schedule(() => super.getAlbumHighlights(params)); + async getInfo(tagUrl: string): Promise { + return this.#limiter.schedule(() => super.getInfo(tagUrl)); } - static async getReleasesAvailableFilters(tagUrl: string): Promise { - return Limiter.schedule(() => super.getReleasesAvailableFilters(tagUrl)); + async getAlbumHighlights(params: TagAPIGetAlbumHighlightsParams): Promise { + return this.#limiter.schedule(() => super.getAlbumHighlights(params)); } - static async getReleases(params: TagAPIGetReleasesParams): Promise { - return Limiter.schedule(() => super.getReleases(params)); + async getReleasesAvailableFilters(tagUrl: string): Promise { + return this.#limiter.schedule(() => super.getReleasesAvailableFilters(tagUrl)); + } + + async getReleases(params: TagAPIGetReleasesParams): Promise { + return this.#limiter.schedule(() => super.getReleases(params)); } } diff --git a/src/lib/track/TrackAPI.ts b/src/lib/track/TrackAPI.ts index 4de6d88..e3ef659 100644 --- a/src/lib/track/TrackAPI.ts +++ b/src/lib/track/TrackAPI.ts @@ -1,7 +1,6 @@ -import ImageAPI from '../image/ImageAPI'; +import BaseAPIWithImageSupport, { BaseAPIWithImageSupportParams } from '../common/BaseAPIWithImageSupport'; import { ImageFormat } from '../types/Image'; import Track from '../types/Track'; -import { fetchPage } from '../utils/Fetch'; import Limiter from '../utils/Limiter'; import TrackInfoParser from './TrackInfoParser'; @@ -12,23 +11,30 @@ export interface TrackAPIGetInfoParams { includeRawData?: boolean; } -export default class TrackAPI { - static async getInfo(params: TrackAPIGetInfoParams): Promise { - const imageConstants = await ImageAPI.getConstants(); +export default class TrackAPI extends BaseAPIWithImageSupport { + async getInfo(params: TrackAPIGetInfoParams): Promise { + const imageConstants = await this.imageAPI.getConstants(); const opts = { trackUrl: params.trackUrl, imageBaseUrl: imageConstants.baseUrl, - albumImageFormat: await ImageAPI.getFormat(params.albumImageFormat, 9), - artistImageFormat: await ImageAPI.getFormat(params.artistImageFormat, 21), + albumImageFormat: await this.imageAPI.getFormat(params.albumImageFormat, 9), + artistImageFormat: await this.imageAPI.getFormat(params.artistImageFormat, 21), includeRawData: params.includeRawData !== undefined ? params.includeRawData : false }; - const html = await fetchPage(params.trackUrl); + const html = await this.fetch(params.trackUrl); return TrackInfoParser.parseInfo(html, opts); } } export class LimiterTrackAPI extends TrackAPI { - static async getInfo(params: TrackAPIGetInfoParams): Promise { - return Limiter.schedule(() => super.getInfo(params)); + + #limiter: Limiter; + + constructor(params: BaseAPIWithImageSupportParams & { limiter: Limiter }) { + super(params); + this.#limiter = params.limiter; + } + async getInfo(params: TrackAPIGetInfoParams): Promise { + return this.#limiter.schedule(() => super.getInfo(params)); } } diff --git a/src/lib/utils/Cache.ts b/src/lib/utils/Cache.ts index 3022357..af36e71 100644 --- a/src/lib/utils/Cache.ts +++ b/src/lib/utils/Cache.ts @@ -5,7 +5,7 @@ export enum CacheDataType { Constants = 'Constants' } -class CacheImpl { +export default class Cache { #ttl: Record; #maxEntries: Record; #cache: NodeCache; @@ -92,8 +92,3 @@ class CacheImpl { return value; } } - -export const Cache = new CacheImpl({ - [CacheDataType.Constants]: 3600, - [CacheDataType.Page]: 300 -}, { page: 10 }); diff --git a/src/lib/utils/Fetch.ts b/src/lib/utils/Fetch.ts deleted file mode 100644 index d2bd49f..0000000 --- a/src/lib/utils/Fetch.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { URL } from 'url'; -import fetch from 'node-fetch'; -import { Cache, CacheDataType } from './Cache'; - -export enum FetchMethod { - GET = 'GET', - POST = 'POST' -} - -export function fetchPage(url: string, jsonResponse: true, method?: FetchMethod, payload?: Record): Promise; -export function fetchPage(url: string, jsonResponse?: boolean, method?: FetchMethod, payload?: Record): Promise; -export function fetchPage(url: string, jsonResponse?: boolean, method?: FetchMethod, payload?: Record) { - if (jsonResponse === undefined) { - jsonResponse = false; - } - return Cache.getOrSet(CacheDataType.Page, getCacheKey(url, jsonResponse, payload), async () => { - if (method === undefined) { - method = FetchMethod.GET; - } - let response; - if (method === FetchMethod.GET) { - const urlObj = new URL(url); - if (payload) { - for (const [ key, value ] of Object.entries(payload)) { - urlObj.searchParams.set(key, value); - } - } - try { - response = await fetch(urlObj.toString()); - } - catch (error) { - throw new FetchError(error); - } - } - else { - const init = { - method: 'POST', - body: payload ? JSON.stringify(payload) : undefined, - headers: { 'Content-Type': 'application/x-www-form-urlencoded' } - }; - try { - response = await fetch(url, init); - } - catch (error) { - throw new FetchError(error); - } - } - if (response.status === 429) { - throw new FetchError({ - message: '429 Too Many Requests', - code: 429 - }); - } - if (jsonResponse) { - return response.json(); - } - return response.text(); - }); -} - -function getCacheKey(url: string, jsonResponse: boolean, payload?: Record): string { - return url + (jsonResponse ? ':json' : ':html') + - (payload ? `:${JSON.stringify(payload)}` : ''); -} - -export class FetchError extends Error { - code?: number; - - constructor(payload: any) { - super(); - if (payload?.message) { - this.message = payload.message; - } - if (payload?.code) { - this.code = payload.code; - } - if (payload?.stack) { - this.stack = payload.stack; - } - } -} diff --git a/src/lib/utils/Fetcher.ts b/src/lib/utils/Fetcher.ts new file mode 100644 index 0000000..ec70085 --- /dev/null +++ b/src/lib/utils/Fetcher.ts @@ -0,0 +1,118 @@ +import { URL } from 'url'; +import fetch, { Request, RequestInit } from 'node-fetch'; +import Cache, { CacheDataType } from './Cache'; + +export enum FetchMethod { + GET = 'GET', + POST = 'POST' +} + +export interface FetcherParams { + cookie?: string | null; + cache: Cache; +} + +export default class Fetcher { + + #cookie?: string | null; + #cache: Cache; + + constructor(params: FetcherParams) { + this.#cache = params.cache; + this.setCookie(params.cookie); + } + + setCookie(value?: string | null) { + this.#cookie = value; + const valueChanged = ((this.#cookie || null) !== (value || null)); + if (valueChanged) { + this.#cache.clear(); + } + } + + get cookie() { + return this.#cookie; + } + + fetch(url: string, jsonResponse: true, method?: FetchMethod, payload?: Record): Promise; + fetch(url: string, jsonResponse?: boolean, method?: FetchMethod, payload?: Record): Promise; + fetch(url: string, jsonResponse?: boolean, method?: FetchMethod, payload?: Record) { + if (jsonResponse === undefined) { + jsonResponse = false; + } + return this.#cache.getOrSet(CacheDataType.Page, getCacheKey(url, jsonResponse, payload), async () => { + if (method === undefined) { + method = FetchMethod.GET; + } + let response; + if (method === FetchMethod.GET) { + const urlObj = new URL(url); + if (payload) { + for (const [ key, value ] of Object.entries(payload)) { + urlObj.searchParams.set(key, value); + } + } + try { + const request = new Request(urlObj.toString()); + if (this.#cookie) { + request.headers.set('Cookie', this.#cookie); + } + response = await fetch(request); + } + catch (error) { + throw new FetchError(error); + } + } + else { + const init: RequestInit = { + method: 'POST', + body: payload ? JSON.stringify(payload) : undefined + }; + const request = new Request(url); + request.headers.set('Content-Type', 'application/x-www-form-urlencoded'); + if (this.#cookie) { + request.headers.set('Cookie', this.#cookie); + } + try { + response = await fetch(request, init); + } + catch (error) { + throw new FetchError(error); + } + } + if (response.status === 429) { + throw new FetchError({ + message: '429 Too Many Requests', + code: 429 + }); + } + if (jsonResponse) { + return response.json(); + } + return response.text(); + }); + } + +} + +function getCacheKey(url: string, jsonResponse: boolean, payload?: Record): string { + return url + (jsonResponse ? ':json' : ':html') + + (payload ? `:${JSON.stringify(payload)}` : ''); +} + +export class FetchError extends Error { + code?: number; + + constructor(payload: any) { + super(); + if (payload?.message) { + this.message = payload.message; + } + if (payload?.code) { + this.code = payload.code; + } + if (payload?.stack) { + this.stack = payload.stack; + } + } +} diff --git a/src/lib/utils/Limiter.ts b/src/lib/utils/Limiter.ts index cb90693..7218838 100644 --- a/src/lib/utils/Limiter.ts +++ b/src/lib/utils/Limiter.ts @@ -1,16 +1,21 @@ import Bottleneck from 'bottleneck'; -const _limiter = new Bottleneck({ - maxConcurrent: 5, - minTime: 200 -}); - export default class Limiter { - static updateSettings(options?: Bottleneck.ConstructorOptions) { - _limiter.updateSettings(options); + + #limiter: Bottleneck; + + constructor() { + this.#limiter = new Bottleneck({ + maxConcurrent: 5, + minTime: 200 + }); } - static schedule(fn: () => PromiseLike): Promise { - return _limiter.schedule(fn); + updateSettings(options?: Bottleneck.ConstructorOptions) { + this.#limiter.updateSettings(options); + } + + schedule(fn: () => PromiseLike): Promise { + return this.#limiter.schedule(fn); } }