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

system.verbs.builtins.radio.weblog.bloggerApi.rpcHandlers.getPost

on getPost (appkey, postid, username, password) {
	<<Changes
		<<11/20/02; 4:55:54 PM by JES
			<<On MacOS, convert content to Latin text before returning. Entity-encode high-ascii characters.
		<<1/22/02; 5:30:35 PM by DW
			<<Created.
	radio.weblog.bloggerApi.checkUser (client, false, username, password);
	local (adrblog = radio.weblog.init ());
	local (adrpost = @adrblog^.posts.[string.padwithzeros (postid, 8)]);
	
	on encode (s) {
		s = xml.entityEncode (s, false);
		return (s)};
	
	local (returnedtable);
	new (tabletype, @returnedtable);
	returnedtable.userid = user.radio.prefs.usernum;
	returnedtable.dateCreated = adrpost^.when;
	returnedtable.content = string (adrpost^.text);
	if system.environment.isMac {
		returnedtable.content = latinToMac.macToLatin (returnedtable.content)};
	returnedtable.content = encode (returnedtable.content);
	returnedtable.postid = postid;
	return (returnedtable)}



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.