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

on editPost (postid, username, password, struct, publish) {
		<<3/13/02; 8:11:48 PM by DW
	on neuter (s) {
		return (radio.weblog.bloggerApi.neuterMacros (s))};
	radio.weblog.bloggerApi.checkUser (client, true, username, password);
	local (adrblog = radio.weblog.init ());
	local (adrpost = @adrblog^.posts.[string.padwithzeros (postid, 8)]);
	local (posttext = neuter (struct.description)); (posttext, adrpost:adrpost);
	radio.weblog.metaWeblogApi.copyFromStruct (@struct, adrpost);
	if publish {
		radio.weblog.metaWeblogApi.publishPost (adrpost)};
	return (true)}
<<bundle //test code
	<<local (struct, client = "")
	<<bundle //set up struct
		<<new (tabletype, @struct)
		<<struct.title = "Playing with a new API"
		<< = ""
		<<struct.description = string.upper ("Now that we have Links and Titles, everyone wants an XML-RPC interface that includes that. If all goes well, we should have such an interface that does that, and a bunch more.")
	<<editPost (1060,,, struct, true)

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.