Module: MyVR::API::Photos

Included in:
Client
Defined in:
lib/myvr/api/photos.rb

Instance Method Summary collapse

Instance Method Details

#photo(id) ⇒ Object



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

#photosObject



11
12
13
# File 'lib/myvr/api/photos.rb', line 11

def photos
  @photos ||= photos!
end

#photos!Object



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