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


on getPublicList (userid, adrcontactstable) {
		<<11/6/07; 7:03:48 AM by DW
			<<Get the indicated user's public contact list.
	local (mystruct);
	new (tabletype, adrcontactstable);
	new (tabletype, @mystruct);
	mystruct.api_key =;
	mystruct.user_id = userid;
	local (s = [].flickr.contacts.getPublicList (mystruct), xstruct);
	s = xml.entitydecode (s, flAlphaEntities:true);
	xml.compile (s, @xstruct);
	<<scratchpad.xstruct = xstruct
	local (adrcontacts = xml.getaddress (@xstruct, "contacts"), adrcontact);
	for adrcontact in adrcontacts {
		if nameof (adrcontact^) endswith "contact" {
			local (adratts = @adrcontact^.["/atts"]);
			local (adrsub = @adrcontactstable^.[adratts^.username]);
			new (tabletype, adrsub);
			adrsub^.id = adratts^.nsid}}}
<<bundle //test code
	<<local (id = Flickr.people.findByUsername ("fredwilson"))
	<<getpubliclist (id, @scratchpad.contacts)
	<<edit (@scratchpad.contacts)

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.