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

system.verbs.builtins.radio.weblog.metaWeblogApi.rpcHandlers.getCategories

on getCategories (blogid, username, password) {
	<<Changes
		<<11/20/02; 5:03:22 PM by JES
			<<Entity-encode high-ascii characters in the category name and description.
		<<3/15/02; 8:02:31 AM by DW
			<<Created. Return a struct of structs, each describing a category.
	radio.weblog.bloggerApi.checkUser (client, false, username, password);
	local (adrblog = radio.weblog.init ());
	local (returnedcats);
	new (tabletype, @returnedcats);
	for adrcat in @adrblog^.categories {
		local (name = nameOf (adrcat^));
		name = xml.entityEncode (name, false);
		local (adrreturnedcat = @returnedcats.[name]);
		new (tabletype, adrreturnedcat);
		adrreturnedcat^.description = adrcat^.description;
		xml.entityEncode (adrreturnedcat^.description, false);
		adrreturnedcat^.htmlUrl = adrcat^.htmlUrl;
		adrreturnedcat^.rssUrl = adrcat^.rssUrl};
	return (returnedcats)}
<<bundle //test code
	<<local (client = "127.0.0.1")
	<<scratchpad.struct = getCategories ("home", user.radio.prefs.security.remoteUsername, user.radio.prefs.security.remotePassword)



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.