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

system.verbs.apps.amazon.listmaniaSearch

on listmaniaSearch (listmaniaId, page=1, flDetails=false) {
	<<Changes
		<<9/9/02; 9:34:50 PM by JES
			<<Created. Do an "listmania" search on Amazon's database, and return the result.
			<<Parameters:
				<<listmaniaId -- the ID number of the list to search
					<<From Amazon's developer docs:
						<<Another interesting feature that you can generate in XML are Amazon.com Listmania! lists. Listmania! lists are created by Amazon.com customers, and usually appear in the right-hand margin of a search results page. They comprise a group of products centered around a theme, such as "The scariest horror novels of all time" or "DVDs with the best car chases". 
						<<To call up a specific list in XML, you must first find that list's ID number. Simply travel to the page that contains the list that you are interested in, and look for the list's 13 character ID in web page's URI. (It appears after the "list-browse/-/" string). For example, in this URI: 
						<<http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/34TRCFE5HC23M/ 
						<<the list ID would be "34TRCFE5HC23M". 
				<<productline -- the name of the product line to search
				<<page -- the page of results to return
					<<results are paged, since there may be *many* results. Default is to return the 1st page
				<<flDetails -- if true, the full results including sales ranking and reviews is returned. if false, then only catalog information is returned. default is false.
	local (type = "lite");
	if flDetails {
		type = "heavy"};
	local (t); new (tableType, @t);
	t.lm_id = listmaniaId;
	t.page = string (page);
	t.type = type;
	return (amazon.call (nameOf (this^), t))};
bundle { //test code
	scratchpad.result = listmaniaSearch ("34TRCFE5HC23M");
	edit (@scratchpad.result)}



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.