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

on getSizes (id, adrinfo=nil) {
		<<11/11/07; 10:05:32 AM by DW
			<<Send along the authorization token, if the user has authorized us.
		<<8/22/07; 4:48:45 PM by DW
	local (mystruct);
	new (tabletype, @mystruct);
	mystruct.api_key =;
	mystruct.photo_id = id;
	if defined ( {
		mystruct.auth_token =;
		Flickr.signStruct (@mystruct)};
	local (s = [] (mystruct), xstruct);
	s = string.replaceall (s, """, "\"");
	xml.compile (s, @xstruct);
	<<scratchpad.sizesstruct = xstruct
	if adrinfo != nil {
		local (adrsizes = xml.getaddress (@xstruct, "sizes"), adrsize);
		new (tabletype, adrinfo);
		for adrsize in adrsizes {
			if nameof (adrsize^) endswith "size" {
				local (adratts = @adrsize^.["/atts"]);
				adrinfo^.[adratts^.label] = adratts^}}}};
bundle { //test code
	getSizes ("1166257196", adrinfo:@scratchpad.picturesizeinfo)}

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.