UNPKG

pixeldrainjs

Version:

A NodeJS Wrapper for the pixeldrain.com API

43 lines (42 loc) 1.34 kB
import { PixeldrainFileInformation, PixeldrainFileInterface } from "../../interfaces/file/fileinterfaces"; import { PixeldrainService } from "../../services/pixeldrainservice"; export declare class PixeldrainFile implements PixeldrainFileInterface { id: string; name: string; size: number; views: number; bandwidth_used: number; bandwidth_used_paid: number; downloads: number; date_upload: Date; date_last_view: Date; mime_type: string; thumbnail_href: string; hash_sha256: string; can_edit: boolean; description: string; private pixeldrainService; /** * Creates an instance of PixeldrainFile. * @param {PixeldrainFileInformation} data File Information * @param {PixeldrainService} pixeldrainService Pixeldrain API Service * @memberof PixeldrainFile */ constructor(data: PixeldrainFileInformation, pixeldrainService: PixeldrainService); /** * Deletes the file * * @return {*} {Promise<void>} * @memberof PixeldrainFile */ delete(): Promise<void>; /** * Downloads the File * * @param {string} path Location to be downloaded * @return {*} {Promise<void>} * @memberof PixeldrainFile */ download(path: string): Promise<void>; downloadThumbnail(path: string): Promise<void>; }