mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 11:02:10 +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
18 lines
519 B
TypeScript
18 lines
519 B
TypeScript
import type { ICreateCommentRequest, CreateCommentEndpointOptions } from '../../../types/index.js';
|
|
|
|
export const PATH = '/comment/create_comment';
|
|
|
|
/**
|
|
* Builds a `/comment/create_comment` request payload.
|
|
* @param options - The options to use.
|
|
* @returns The payload.
|
|
*/
|
|
export function build(options: CreateCommentEndpointOptions): ICreateCommentRequest {
|
|
return {
|
|
commentText: options.comment_text,
|
|
createCommentParams: options.create_comment_params,
|
|
...{
|
|
client: options.client
|
|
}
|
|
};
|
|
} |