mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
21 lines
514 B
TypeScript
21 lines
514 B
TypeScript
import type { INextRequest, NextEndpointOptions } from '../../types/index.ts';
|
|
|
|
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
|
|
}
|
|
};
|
|
} |