2023-06-10 16:52:27 +02:00
|
|
|
[bandcamp-fetch](../README.md) / ArticleAPI
|
|
|
|
|
|
|
|
# Class: ArticleAPI
|
|
|
|
|
|
|
|
## Hierarchy
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
- [`BaseAPIWithImageSupport`](BaseAPIWithImageSupport.md)
|
2023-06-10 16:52:27 +02:00
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
↳ **`ArticleAPI`**
|
|
|
|
|
|
|
|
↳↳ [`LimiterArticleAPI`](LimiterArticleAPI.md)
|
2023-06-10 16:52:27 +02:00
|
|
|
|
|
|
|
## Table of contents
|
|
|
|
|
|
|
|
### Constructors
|
|
|
|
|
|
|
|
- [constructor](ArticleAPI.md#constructor)
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
### Accessors
|
|
|
|
|
|
|
|
- [cache](ArticleAPI.md#cache)
|
|
|
|
- [imageAPI](ArticleAPI.md#imageapi)
|
|
|
|
|
2023-06-10 16:52:27 +02:00
|
|
|
### Methods
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
- [fetch](ArticleAPI.md#fetch)
|
2023-06-10 16:52:27 +02:00
|
|
|
- [getArticle](ArticleAPI.md#getarticle)
|
|
|
|
- [getCategories](ArticleAPI.md#getcategories)
|
|
|
|
- [list](ArticleAPI.md#list)
|
|
|
|
|
|
|
|
## Constructors
|
|
|
|
|
|
|
|
### constructor
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
• **new ArticleAPI**(`params`)
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| :------ | :------ |
|
|
|
|
| `params` | [`BaseAPIWithImageSupportParams`](../interfaces/BaseAPIWithImageSupportParams.md) |
|
|
|
|
|
|
|
|
#### Inherited from
|
|
|
|
|
|
|
|
[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[constructor](BaseAPIWithImageSupport.md#constructor)
|
|
|
|
|
|
|
|
#### Defined in
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/common/BaseAPIWithImageSupport.ts:12](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/common/BaseAPIWithImageSupport.ts#L12)
|
2023-10-28 14:55:26 +02:00
|
|
|
|
|
|
|
## Accessors
|
|
|
|
|
|
|
|
### cache
|
|
|
|
|
|
|
|
• `Protected` `get` **cache**(): [`Cache`](Cache.md)
|
|
|
|
|
|
|
|
#### Returns
|
|
|
|
|
|
|
|
[`Cache`](Cache.md)
|
|
|
|
|
|
|
|
#### Inherited from
|
|
|
|
|
|
|
|
BaseAPIWithImageSupport.cache
|
|
|
|
|
|
|
|
#### Defined in
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/common/BaseAPI.ts:27](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/common/BaseAPI.ts#L27)
|
2023-10-28 14:55:26 +02:00
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
### imageAPI
|
|
|
|
|
|
|
|
• `get` **imageAPI**(): [`ImageAPI`](ImageAPI.md)
|
|
|
|
|
|
|
|
#### Returns
|
|
|
|
|
|
|
|
[`ImageAPI`](ImageAPI.md)
|
|
|
|
|
|
|
|
#### Inherited from
|
|
|
|
|
|
|
|
BaseAPIWithImageSupport.imageAPI
|
|
|
|
|
|
|
|
#### Defined in
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/common/BaseAPIWithImageSupport.ts:17](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/common/BaseAPIWithImageSupport.ts#L17)
|
2023-06-10 16:52:27 +02:00
|
|
|
|
|
|
|
## Methods
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
### fetch
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
▸ `Protected` **fetch**(`url`, `jsonResponse`, `method`, `payload?`): `Promise`<`Response`\>
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| :------ | :------ |
|
|
|
|
| `url` | `string` |
|
|
|
|
| `jsonResponse` | ``false`` |
|
|
|
|
| `method` | [`HEAD`](../enums/FetchMethod.md#head) |
|
|
|
|
| `payload?` | `undefined` |
|
|
|
|
|
|
|
|
#### Returns
|
|
|
|
|
|
|
|
`Promise`<`Response`\>
|
|
|
|
|
|
|
|
#### Inherited from
|
|
|
|
|
|
|
|
[BaseAPIWithImageSupport](BaseAPIWithImageSupport.md).[fetch](BaseAPIWithImageSupport.md#fetch)
|
|
|
|
|
|
|
|
#### Defined in
|
|
|
|
|
|
|
|
[lib/common/BaseAPI.ts:20](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/common/BaseAPI.ts#L20)
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
▸ `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
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/common/BaseAPI.ts:21](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/common/BaseAPI.ts#L21)
|
2023-10-28 14:55:26 +02:00
|
|
|
|
|
|
|
▸ `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
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/common/BaseAPI.ts:22](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/common/BaseAPI.ts#L22)
|
2023-10-28 14:55:26 +02:00
|
|
|
|
|
|
|
___
|
|
|
|
|
2023-06-10 16:52:27 +02:00
|
|
|
### getArticle
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
▸ **getArticle**(`params`): `Promise`<[`Article`](../interfaces/Article.md)\>
|
2023-06-10 16:52:27 +02:00
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| :------ | :------ |
|
|
|
|
| `params` | [`ArticleAPIGetArticleParams`](../interfaces/ArticleAPIGetArticleParams.md) |
|
|
|
|
|
|
|
|
#### Returns
|
|
|
|
|
|
|
|
`Promise`<[`Article`](../interfaces/Article.md)\>
|
|
|
|
|
|
|
|
#### Defined in
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/article/ArticleAPI.ts:31](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/article/ArticleAPI.ts#L31)
|
2023-06-10 16:52:27 +02:00
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
### getCategories
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
▸ **getCategories**(): `Promise`<[`ArticleCategorySection`](../interfaces/ArticleCategorySection.md)[]\>
|
2023-06-10 16:52:27 +02:00
|
|
|
|
|
|
|
#### Returns
|
|
|
|
|
|
|
|
`Promise`<[`ArticleCategorySection`](../interfaces/ArticleCategorySection.md)[]\>
|
|
|
|
|
|
|
|
#### Defined in
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/article/ArticleAPI.ts:26](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/article/ArticleAPI.ts#L26)
|
2023-06-10 16:52:27 +02:00
|
|
|
|
|
|
|
___
|
|
|
|
|
|
|
|
### list
|
|
|
|
|
2023-10-28 14:55:26 +02:00
|
|
|
▸ **list**(`params?`): `Promise`<[`ArticleList`](../interfaces/ArticleList.md)\>
|
2023-06-10 16:52:27 +02:00
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
| Name | Type |
|
|
|
|
| :------ | :------ |
|
|
|
|
| `params?` | [`ArticleAPIListParams`](../interfaces/ArticleAPIListParams.md) |
|
|
|
|
|
|
|
|
#### Returns
|
|
|
|
|
|
|
|
`Promise`<[`ArticleList`](../interfaces/ArticleList.md)\>
|
|
|
|
|
|
|
|
#### Defined in
|
|
|
|
|
2023-10-29 18:25:17 +01:00
|
|
|
[lib/article/ArticleAPI.ts:43](https://github.com/patrickkfkan/bandcamp-fetch/blob/7bb1899/src/lib/article/ArticleAPI.ts#L43)
|