MetaWeblog API, an XML-RPC interface for weblog publishing that's supported by Archipelago, Blojsom, Radio Userland, Manila, Moveable Type, NetNewsWire, Python Desktop Server, and Zoe.
In addition to incorporating some omitted methods from the Blogger API, I'd like to suggest that the MetaWeblog API implement some of the features of XmlStorageSystem, the XML-RPC API used to publish a weblog on a community server such as the Radio Community Server or Python Community Server.
The goal would be a completely tool-agnostic weblog protocol that can be used to create and publish a weblog without ever using any other software. It could take Really Simple Discoverability even further -- a new user would only need to select a username and password before creating a weblog. Everything else could be handled by a tool through the API.
I've tried to limit this to features that are already implemented in one of the aforementioned APIs (with one exception at the end).
Though it's OK to discuss this here, the best place to hash out the API is the MetaWeblog-API mailing list.
1. Implement the undocumented methods offered in the Blogger API, which Mike Amundsen has documented, and the new MetaWeblog API methods in current use.
metaWeblog.getRecentPosts(blogid, username, password, numberOfPosts) returns struct
The return value is a string array of postid values. Blogger only returned up to 20 posts in this manner, but it would be nice for backup purposes if 0 could be specified as the numberOfPosts argument to receive the entire weblog.
metaWeblog.deletePost(postid, username, password) returns boolean
The return value indicates success (true) or failure (false).
metaWeblog.newMediaObject(blogid, username, password, struct) returns struct
The struct must contain at least three elements, name, type and bits.
name is a string, it may be used to determine the name of the file that stores the object, or to display it in a list of objects. It determines how the weblog refers to the object. If the name is the same as an existing object stored in the weblog, it may replace the existing object.
type is a string, it indicates the type of the object, it's a standard MIME type, like audio/mpeg or image/jpeg or video/quicktime.
bits is a base64-encoded binary value containing the content of the object.
The struct may contain other elements, which may or may not be stored by the content management system.
If newMediaObject fails, it throws an error. If it succeeds, it returns a struct, which must contain at least one element, url, which is the url through which the object can be accessed. It must be either an FTP or HTTP url.
metaWeblog.getCategories (blogid, username, password) returns struct
The struct returned contains one struct for each category, containing the following elements: description, htmlUrl and rssUrl.
This call allows editing tools to offer category-routing as a feature.
2. Implement some methods based on features of XmlStorageSystem.
metaWeblog.registerUser(username, password, email, useragent, contactinfo) returns string
The return value is the blogid of the new weblog (if successful) or "false" otherwise. The useragent argument is optional; it identifies the software used. The contactinfo argument is a struct containing optional contact information for the user (as strings): name, streetaddress1, streetaddress2, city, state, zip, phone, fax, alternateemail.
metaWeblog.getServerCapabilities(username, password) returns struct
The struct returned by the method contains:
legalFileExtensions, a array of file extensions that may be uploaded to the weblog
maxFileSize, a number, the maximum file size
maxBytesPerUser, a number, the maximum number of bytes allowed per user
ctBytesInUse, the number of bytes in use by the indicated user
upstreamFolderUrl, a string, the URL of the folder containing the files
allowNewMembers, a boolean, indicating whether new members currently can be registered (true) or not (false) The struct also can contain additional optional elements such as the URL of a comment server and other implementation-specific features.
metaWeblog.mailPasswordToUser(username) returns true
Sends the password associated with that username to the e-mail address associated with the account. Always returns true, whether or not the username is valid.
metaWeblog.saveMultipleFiles(username, password, relativepathList, fileTextList) returns struct
A method to publish one or more files to the same location as the weblog (or its subfolders).
relativePathList is a array of strings, each of which identifies the location of the corresponding file in the fileTextList, relative to the top level of the user's HTTP-accessible directory. The path is slash-separated, and may or may not start with a slash. Example: sounds/clock.mp3.
fileTextList is an array of strings, containing the text to be stored in a file.
saveMultipleFiles returns a struct containing urlList, a array of HTTP urls corresponding to the files that were saved. If there was an error saving the file its url in urlList is the empty string.
If there was an error preventing files from being saved, the struct contains flError, which indicates there was an error, and message, which provides human readable text explaining the error.
metaWeblog.deleteMultipleFiles(username, password, relativepathList, fileTextList) returns struct
Like saveMultipleFiles, except that it deletes files instead of saving them.
3. Implement one additional method.
metaWeblog.deregisterUser(username, password, email) returns boolean
A method to remove a weblog entirely from publication -- implementors can choose whether this deletes the site or simply makes it inaccessible. The return value is true if successful or false otherwise.