UNPKG

vk-io

Version:

Modern VK API SDK for Node.js

107 lines (106 loc) 2.86 kB
import { Attachment, AttachmentFactoryOptions } from './attachment'; import { AttachmentType, kSerializeData } from '../../utils/constants'; export interface IVideoAttachmentPayload { id: number; owner_id: number; access_key?: string; repeat?: number; can_add?: number; can_edit?: number; processing?: number; live?: number; upcoming?: number; is_favorite?: number; title?: string; description?: string; duration?: number; date?: number; adding_date?: number; views?: number; comments?: number; player?: string; platform?: string; } export type VideoAttachmentOptions = AttachmentFactoryOptions<IVideoAttachmentPayload>; export declare class VideoAttachment extends Attachment<IVideoAttachmentPayload, AttachmentType.VIDEO | 'video'> { /** * Constructor */ constructor(options: VideoAttachmentOptions); /** * Load attachment payload */ loadAttachmentPayload(): Promise<void>; /** * Checks whether the video is repeatable */ get isRepeat(): boolean | undefined; /** * Checks that the user can add a video to himself */ get isCanAdd(): boolean | undefined; /** * Checks if the user can edit the video */ get isCanEdit(): boolean | undefined; /** * Checks whether the video is being processed */ get isProcessing(): boolean | undefined; /** * Checks whether the video is a broadcast */ get isBroadcast(): boolean | undefined; /** * Checks whether the video is a broadcast */ get isUpcoming(): boolean | undefined; /** * Checks is bookmarked current user */ get isFavorited(): boolean | undefined; /** * Returns the title */ get title(): string | undefined; /** * Returns the description */ get description(): string | undefined; /** * Returns the duration */ get duration(): number | undefined; /** * Returns the date when this video was created */ get createdAt(): number | undefined; /** * Returns the date when this video was added */ get addedAt(): number | undefined; /** * Returns the count views */ get viewsCount(): number | undefined; /** * Returns the count comments */ get commentsCount(): number | undefined; /** * Returns the URL of the page with the player */ get player(): string | undefined; /** * Returns the name of the platform (for video recordings added from external sites) */ get platformName(): string | undefined; /** * Checks for a boolean value in the property */ protected checkBooleanInProperty(name: string): boolean | undefined; /** * Returns the custom data */ [kSerializeData](): object; }