Monday, November 08, 2010 at 12:01 AM.

system.verbs.apps.metaWeblog.editPost

on editPost (title="", link="", description="", adrstruct=nil, postId=0, username=nil, password=nil, blogId=nil, flPublish=true, adrdata=@metaWeblog.data) {
	<<Changes
		<<6/9/02; 12:01:28 PM by DW
			<<Created.
	local (url, struct);
	metaWeblog.init ();
	bundle { //set defaults
		if username == nil {
			username = user.metaWeblog.username};
		if password == nil {
			password = string (user.metaWeblog.password)};
		if blogId == nil {
			blogId = user.metaWeblog.blogId}};
	url = "xmlrpc://" + adrdata^.server + ":" + adrdata^.port + adrdata^.rpcPath;
	if adrstruct == nil {
		adrstruct = @struct;
		new (tabletype, adrstruct)};
	if title != "" {
		adrstruct^.title = title};
	if link != "" {
		adrstruct^.link = link};
	adrstruct^.description = description; //description must be present, according to the Radio implementation
	return ([url].metaWeblog.editPost (postId, username, password, adrstruct^, flPublish))};
bundle { //test code
	local (struct);
	new (tabletype, @struct);
	struct.categories = {"Michegas", "Mind Bombs"};
	dialog.alert (editPost (postId: 1330, description:"I am working on Frontier/Radio glue for the MetaWeblog API. At first I thought it wasn't needed, but then I got to a place where I wanted the distinction betweeen using the Blogger API and the MetaWeblog API to be minimal, so it was time to build a parallel way of calling the MWA. That's what these glue scripts are for.", link:"http://www.xmlrpc.com/metaWeblogApi", adrstruct:@struct))}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.