15 16 17 18
# File 'lib/myvr/api/photos.rb', line 15 def photo(id) data = get_object("/v1/photos/#{ id }/") MyVR::Photo.new(data) end
11 12 13
# File 'lib/myvr/api/photos.rb', line 11 def photos @photos ||= photos! end
4 5 6 7 8 9
# File 'lib/myvr/api/photos.rb', line 4 def photos! data = get_objects("/v1/photos/") data.map do |photo| MyVR::Photo.new(photo) end end