mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-15 18:42:11 +00:00
chore: add proper documentation (#763)
* chore: generate API ref using `typedoc` * chore: declutter readme and add links to ytjs.dev * chore: clean up
This commit is contained in:
71
docs/api/classes/HTTPClient.md
Normal file
71
docs/api/classes/HTTPClient.md
Normal file
@@ -0,0 +1,71 @@
|
||||
[youtubei.js](../README.md) / HTTPClient
|
||||
|
||||
# Class: HTTPClient
|
||||
|
||||
## Constructors
|
||||
|
||||
### new HTTPClient()
|
||||
|
||||
> **new HTTPClient**(`session`, `cookie`?, `fetch`?): [`HTTPClient`](HTTPClient.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **session**: [`Session`](Session.md)
|
||||
|
||||
• **cookie?**: `string`
|
||||
|
||||
• **fetch?**
|
||||
|
||||
#### Returns
|
||||
|
||||
[`HTTPClient`](HTTPClient.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/HTTPClient.ts:23](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/HTTPClient.ts#L23)
|
||||
|
||||
## Accessors
|
||||
|
||||
### fetch\_function
|
||||
|
||||
> `get` **fetch\_function**(): (`input`, `init`?) => `Promise`\<`Response`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Function`
|
||||
|
||||
[MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch)
|
||||
|
||||
##### Parameters
|
||||
|
||||
• **input**: `URL` \| `RequestInfo`
|
||||
|
||||
• **init?**: `RequestInit`
|
||||
|
||||
##### Returns
|
||||
|
||||
`Promise`\<`Response`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/HTTPClient.ts:29](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/HTTPClient.ts#L29)
|
||||
|
||||
## Methods
|
||||
|
||||
### fetch()
|
||||
|
||||
> **fetch**(`input`, `init`?): `Promise`\<`Response`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **input**: `string` \| `URL` \| `Request`
|
||||
|
||||
• **init?**: `RequestInit` & [`HTTPClientInit`](../interfaces/HTTPClientInit.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`Response`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/utils/HTTPClient.ts:33](https://github.com/LuanRT/YouTube.js/blob/eb21af33db708f0355f4fb15881f5d4fabc7b06c/src/utils/HTTPClient.ts#L33)
|
||||
Reference in New Issue
Block a user