Wordpress API Primer (V - MetaWeblog API)
April 3rd, 2007 | Architecture | InternetOut of the three supported API, MetaWeblog API documentation is the only one that has not moved - it is located here.
The main difference between MetaWeblog & Blogger API is that MetaWeblog extends the Blogger API by passing a struct for the post rather than just a string for the content.
The explanation on the spec page has one confusing point: it mentioned that the struct contains the elements defined in RSS 2.0 - this can be read as that struct has the same XML markup as RSS 2.0. This is NOT the case. The struct still has the same XML markup in XMLRPC, but it can have member with the names of link, title, description, etc.
The main methods are:
- metaWeblog.newPost (blogid, username, password, struct, publish) returns string (postid) - supersede blogger.newPost
- metaWeblog.editPost (postid, username, password, struct, publish) returns boolean - supersede blogger.editPost
- metaWeblog.getPost (postid, username, password) returns struct - return a post by its ID
- metaWeblog.newMediaObject (blogid, username, password, struct) returns struct - uploads a base64 encoded file (in the struct of name, type, bits) onto the server, returning an URL
- metaWeblog.getCategories (blogid, username, password) returns struct - returns a list of defined categories
- metaWeblog.getRecentPosts (blogid, username, password, numberOfPosts) returns array of structs - returns a list of the recent posts.

Digg This!
Reddit!
Del.icio.us!
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment