class Eyeson::Snapshot

Get room snapshots

Attributes

id[R]
url[R]

Public Class Methods

find(snapshot_id) click to toggle source
# File lib/eyeson/snapshot.rb, line 18
def self.find(snapshot_id)
  response = Eyeson.get("/snapshots/#{snapshot_id}")
  links    = response['links']
  raise NotFound if links.nil?
  Snapshot.new snapshot_id, links['download']
end
new(id, url) click to toggle source
# File lib/eyeson/snapshot.rb, line 9
def initialize(id, url)
  @id = id
  @url = url
end

Public Instance Methods

delete() click to toggle source
# File lib/eyeson/snapshot.rb, line 14
def delete
  Eyeson.delete "/snapshots/#{id}"
end