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

on getRecentPosts (blogid, username, password, numberOfPosts) {
		<<11/21/02; 8:53:52 PM by JES
			<<Created. Return an array of the most recent posts. Per recommendation from Brent Simmons:$2366
	radio.weblog.bloggerApi.checkUser (client, false, username, password);
	local (adrblog = radio.weblog.init ());
	local (adrposts = @adrblog^.posts);
	local (returnArray = {});
	local (i, ctposts = sizeOf (adrposts^), ct = 0);
	for i = ctposts downto 1 {
		local (adrpost = @adrposts^[i]);
		local (postid = nameOf (adrpost^));
		returnArray = returnArray + {radio.weblog.metaWeblogApi.rpcHandlers.getPost (postid, username, password)};
		if ct == numberOfPosts {
	return (returnArray)}
<<bundle //testing
	<<local (t);new (tableType, @t)
	<<t.client = ""
	<<scratchpad.posts = callScript (this, {"home", "", "", 10}, @t)

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.