/// // Type definitions for metaweblog-api // Project: https://github.com/uhavemyword/metaweblog-api // Definitions by: Peng Chen declare class MetaWeblog { constructor(uri: string); getUsersBlogs(appKey: string, username: string, password: string): Promise; getRecentPosts(blogid: string, username: string, password: string, numberOfPosts: number): Promise; getCategories(blogid: string, username: string, password: string): Promise; getPost(postid: string, username: string, password: string): Promise; editPost(postid: string, username: string, password: string, post: MetaWeblog.Post, publish: boolean): Promise; newPost(blogid: string, username: string, password: string, post: MetaWeblog.Post, publish: boolean): Promise; deletePost(appKey: string, postid: string, username: string, password: string, publish: boolean): Promise; newMediaObject(blogid: string, username: string, password: string, mediaObject: MetaWeblog.MediaObject): Promise; } declare namespace MetaWeblog { interface BlogInfo { blogid: string; url: string; blogName: string; } interface Post { description: string; title: string; categories?: string[]; dateCreated?: Date; link?: string; permalink?: string; postid?: string; source?: Source; userid?: string; } interface CategoryInfo { description: string; htmlUrl: string; rssUrl: string; title: string; categoryid: string; } interface MediaObject { name: string; type: string; bits: Buffer; } interface Source { name?: string; url?: string; } interface Error { faultCode: string; faultString: string; } } export = MetaWeblog;