def getPerms(photo)
photo = photo.id if photo.class == Flickr::Photo
res = @flickr.call_method('flickr.photos.getPerms',
'photo_id' => photo)
perms = res.elements['/perms']
att = perms.attributes
phid = att['id']
photo = (photo.class == Flickr::Photo) ? photo :
(@flickr.photo_cache_lookup(phid) ||
Flickr::Photo.new(@flickr,phid))
photo.ispublic = (att['ispublic'].to_i == 1)
photo.isfriend = (att['isfriend'].to_i == 1)
photo.isfamily = (att['isfamily'].to_i == 1)
photo.permcomment = att['permcomment'].to_i
photo.permaddmeta = att['permaddmeta'].to_i
return photo
end