pixeldrainjs
Version:
A NodeJS Wrapper for the pixeldrain.com API
24 lines (23 loc) • 933 B
TypeScript
import { PixeldrainFile } from "./components/file/file";
import { PixeldrainFileUploadOptions } from "./interfaces/file/fileuploadinterfaces";
import { PixeldrainService } from "./services/pixeldrainservice";
export declare class PixelDrain {
pixeldrainService: PixeldrainService;
constructor(APIKey?: string);
/**
* Retrieves file information from the API and returns it as a PixeldrainFile Object
*
* @param {string} id File ID
* @return {*} {Promise<PixeldrainFile>}
* @memberof PixelDrain
*/
getFile(id: string): Promise<PixeldrainFile>;
/**
* Uploads a file to pixeldrain. A File can either be uploaded anonymously or under a user account
*
* @param {PixeldrainFileUploadOptions} file File Information
* @return {*} {Promise<PixeldrainFile>}
* @memberof PixelDrain
*/
uploadFile(file: PixeldrainFileUploadOptions): Promise<PixeldrainFile>;
}