mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 11:32:27 +00:00
* feat(Player.ts): append `cver` to deciphered URLs * refactor(Actions.ts): remove redundant `getVideoInfo` function This is leftover code from previous versions. It had many problems and it is no longer required. * fix(Kids.ts): remove unneeded `await` keywords * dev: add more endpoints * chore: update deps * refactor: separate endpoints into files * dev: improve types * dev: add more endpoints * refactor: put clients in a separate directory inside `core` * chore: lint * refactor: move mixins and managers to separate folders * chore: fix tests * dev: add `CreateVideoEndpoint` * chore: clean up * chore: lint * chore: add some comments * chore: remove unnecessary test * dev: add `playlist/CreateEndpoint` * dev: add `playlist/DeleteEndpoint` * dev: add `browse/EditPlaylistEndpoint` * fix(parser): add a few checks to avoid parsing errors
21 lines
514 B
TypeScript
21 lines
514 B
TypeScript
import type { INextRequest, NextEndpointOptions } from '../../types/index.js';
|
|
|
|
export const PATH = '/next';
|
|
|
|
/**
|
|
* Builds a `/next` request payload.
|
|
* @param opts - The options to use.
|
|
* @returns The payload.
|
|
*/
|
|
export function build(opts: NextEndpointOptions): INextRequest {
|
|
return {
|
|
...{
|
|
videoId: opts.video_id,
|
|
playlistId: opts.playlist_id,
|
|
params: opts.params,
|
|
playlistIndex: opts.playlist_index,
|
|
client: opts.client,
|
|
continuation: opts.continuation
|
|
}
|
|
};
|
|
} |