mclogs
Version:
TypeScript library for the mclo.gs API
39 lines (38 loc) • 1.31 kB
TypeScript
import { CreatePasteResponse, InsightsResponse, StorageLimitsResponse } from './responses';
/**
* The main class for interacting with the mclo.gs API
*/
export declare class MCLogs {
/**
* Create a new paste on mclo.gs
* @param content The content of the log file
* @returns {Promise<CreatePasteResponse>}
* @example const data = await mclogs.create('Hello, world!');
* console.log(data.url);
*/
create(content: string): Promise<CreatePasteResponse>;
/**
* Get the raw content of a paste
* @param id The ID of the paste
* @returns {Promise<string>}
* @example const raw = await mclogs.getRaw('qLHAQBz');
* console.log(raw);
*/
getRaw(id: string): Promise<string>;
/**
* Get insights for a paste
* @param id The ID of the paste
* @returns {Promise<InsightsResponse>}
* @example const insights = await mclogs.getInsights('bs47Bij');
* console.log(insights.analysis);
*/
getInsights(id: string): Promise<InsightsResponse>;
/**
* Get storage limits for mclo.gs
* @returns {Promise<StorageLimitsResponse>}
* @example const limits = await mclogs.getStorageLimits();
* console.log(limits);
*/
getStorageLimits(): Promise<StorageLimitsResponse>;
private request;
}