BrightSign BrightScript 3.0 Reference Manual User Manual
Page 26

21
Function GetInterestingnessPhotoList(http as Object, page=1 As Integer) As Object
print "page=";page
http.SetUrl("http://api.flickr.com/services/rest/?method=flickr.interestingness.getList&a
pi_key=YOURKEYGOESHERE&page="+mid(stri(page),2))
xml=http.GetToString()
rsp=CreateObject("roXMLElement")
if not rsp.Parse(xml) then stop
return helperPhotoListFromXML(http, rsp.photos.photo)
'rsp.GetBody().Peek().GetBody())
End Function
Function helperPhotoListFromXML(http As Object, xmllist As Object,
owner=invalid As dynamic) As Object
photolist=CreateObject("roList")
for each photo in xmllist
photolist.Push(newPhotoFromXML(http, photo, owner))
end for
return photolist