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

3.4 KiB

bandcamp-fetch / StreamAPI

Class: StreamAPI

Hierarchy

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new StreamAPI(params)

Parameters

Name Type
params BaseAPIParams

Inherited from

BaseAPI.constructor

Defined in

lib/common/BaseAPI.ts:15

Accessors

cache

Protected get cache(): Cache

Returns

Cache

Inherited from

BaseAPI.cache

Defined in

lib/common/BaseAPI.ts:27

Methods

fetch

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

Parameters

Name Type
url string
jsonResponse false
method HEAD
payload? undefined

Returns

Promise<Response>

Inherited from

BaseAPI.fetch

Defined in

lib/common/BaseAPI.ts:20

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

Parameters

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

Returns

Promise<any>

Inherited from

BaseAPI.fetch

Defined in

lib/common/BaseAPI.ts:21

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

Parameters

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

Returns

Promise<string>

Inherited from

BaseAPI.fetch

Defined in

lib/common/BaseAPI.ts:22


refresh

refresh(url): Promise<null | string>

Parameters

Name Type
url string

Returns

Promise<null | string>

Defined in

lib/stream/StreamAPI.ts:21


test

test(url): Promise<StreamTestResult>

Parameters

Name Type
url string

Returns

Promise<StreamTestResult>

Defined in

lib/stream/StreamAPI.ts:13