UNPKG

hatena-fotolife-api

Version:

Hatena::Fotolife API wrapper for Node.js (unofficial)

45 lines (44 loc) 1.19 kB
declare type FotolifeOptions = FotolifeOptionsOAuth | FotolifeOptionsWSSE; interface FotolifeOptionsOAuth { accessToken: string; accessTokenSecret: string; consumerKey: string; consumerSecret: string; type: "oauth"; } interface FotolifeOptionsWSSE { apikey: string; type?: "wsse"; username: string; } declare class Fotolife { private static BASE_URL; private _type; private _username; private _apikey; private _consumerKey; private _consumerSecret; private _accessToken; private _accessTokenSecret; constructor(options: FotolifeOptions); create({ file, folder: folderOrUndefined, generator: generatorOrUndefined, title: titleOrUndefined, type: typeOrUndefined, }: { file: string; folder?: string; generator?: string; title?: string; type?: string; }): Promise<any>; update({ id, title, }: { id: number; title: string; }): Promise<any>; destroy({ id, }: { id: number; }): Promise<any>; show({ id, }: { id: number; }): Promise<any>; index(): Promise<any>; private _request; } export { Fotolife, FotolifeOptions };