UNPKG

vk-io

Version:

Modern VK API SDK for Node.js

68 lines (67 loc) 1.72 kB
import { Attachment, AttachmentFactoryOptions } from './attachment'; import { AttachmentType, kSerializeData } from '../../utils/constants'; export interface IAudioAttachmentPayload { id: number; owner_id: number; access_key?: string; is_hq?: number; lyrics_id?: number; album_id?: number; genre_id?: number; title?: string; artist?: string; duration?: number; date?: number; url?: string; } export type AudioAttachmentOptions = AttachmentFactoryOptions<IAudioAttachmentPayload>; export declare class AudioAttachment extends Attachment<IAudioAttachmentPayload, AttachmentType.AUDIO | 'audio'> { /** * Constructor */ constructor(options: AudioAttachmentOptions); /** * Load attachment payload */ loadAttachmentPayload(): Promise<void>; /** * Checks whether audio is in high quality */ get isHq(): boolean | undefined; /** * Returns the ID of the lyric */ get lyricsId(): number | undefined; /** * Returns the ID of the album */ get albumId(): number | undefined; /** * Returns the ID of the genre */ get genreId(): number | undefined; /** * Returns the title */ get title(): string | undefined; /** * Returns the artist */ get artist(): string | undefined; /** * Returns the duration */ get duration(): number | undefined; /** * Returns the date object when this audio was created */ get createdAt(): number | undefined; /** * Returns the URL of the audio */ get url(): string | undefined; /** * Returns the custom data */ [kSerializeData](): object; }