Class: MetaWeblog

MetaWeblog

new MetaWeblog(options)

Parameters:
Name Type Description
options Object | String Server options to make the HTTP request to. Either a URI string (e.g. 'http://localhost:9090') or an object
Properties
Name Type Description
url String
host String
port String
Source:

Methods

deletePost(appKey, postid, username, password, publish) → {Promise.<(Boolean|Error)>}

Deletes a post.
Parameters:
Name Type Description
appKey String
postid String
username String
password String
publish Boolean
Source:
Returns:
success or error
Type
Promise.<(Boolean|Error)>

editPost(postid, username, password, post, publish) → {Promise.<(Boolean|Error)>}

Updates a post by id.
Parameters:
Name Type Description
postid String
username String
password String
post Post
publish Boolean
Source:
Returns:
success or error
Type
Promise.<(Boolean|Error)>

getCategories(blogid, username, password) → {Promise.<(Array.<CategoryInfo>|Error)>}

Retrieves a list of valid categories.
Parameters:
Name Type Description
blogid String
username String
password String
Source:
Returns:
Type
Promise.<(Array.<CategoryInfo>|Error)>

getPost(postid, username, password) → {Promise.<(Post|Error)>}

Gets a post by id.
Parameters:
Name Type Description
postid String
username String
password String
Source:
Returns:
Type
Promise.<(Post|Error)>

getRecentPosts(blogid, username, password, numberOfPosts) → {Promise.<(Array.<Post>|Error)>}

Retrieves a list of the most recent posts.
Parameters:
Name Type Description
blogid String
username String
password String
numberOfPosts Number
Source:
Returns:
Type
Promise.<(Array.<Post>|Error)>

getUsersBlogs(appKey, username, password) → {Promise.<(Array.<BlogInfo>|Error)>}

Returns information on all the blogs of a given user.
Parameters:
Name Type Description
appKey String
username String
password String
Source:
Returns:
Type
Promise.<(Array.<BlogInfo>|Error)>

newMediaObject(blogid, username, password, mediaObject) → {Promise.<(MediaObject|Error)>}

Uploads a new file.
Parameters:
Name Type Description
blogid String
username String
password String
mediaObject MediaObject
Source:
Returns:
Type
Promise.<(MediaObject|Error)>

newPost(blogid, username, password, post, publish) → {Promise.<(Number|Error)>}

Makes a new post.
Parameters:
Name Type Description
blogid String
username String
password String
post Post
publish Boolean
Source:
Returns:
post id or error
Type
Promise.<(Number|Error)>