# File lib/flickr/tags.rb, line 4 def getListPhoto(photo) photo = photo.id if photo.class == Flickr::Photo res = @flickr.call_method('flickr.tags.getListPhoto', 'photo_id'=>photo) xml = res.root phid = xml.attributes['id'] photo = (photo.class == Flickr::Photo) ? photo : (@flickr.photo_cache_lookup(phid) || Flickr::Photo.new(@flickr,phid)) if xml.elements['tags'] tags = [] xml.elements['tags'].each_element do |el| tags << Flickr::Tag.from_xml(el,photo) end end photo.tags = tags return tags end