Class: Dropcam::Cuepoint

Inherits:
CuepointBase show all
Defined in:
lib/dropcam/cuepoint.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#cookies, #session_token

Instance Method Summary collapse

Methods inherited from CuepointBase

#all, #cuepoint

Methods inherited from Base

#delete, #get, #post

Constructor Details

#initialize(camera, details) ⇒ Cuepoint

Returns a new instance of Cuepoint.



8
9
10
11
12
13
14
# File 'lib/dropcam/cuepoint.rb', line 8

def initialize(camera,details)
  super(camera)
  @id = details["id"]
  @note = details["note"]
  @type = details["type"]
  @time = details["time"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/dropcam/cuepoint.rb', line 6

def id
  @id
end

#noteObject (readonly)

Returns the value of attribute note.



6
7
8
# File 'lib/dropcam/cuepoint.rb', line 6

def note
  @note
end

#timeObject (readonly)

Returns the value of attribute time.



6
7
8
# File 'lib/dropcam/cuepoint.rb', line 6

def time
  @time
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/dropcam/cuepoint.rb', line 6

def type
  @type
end

Instance Method Details

#image_archive(number_of_frames, width) ⇒ Object



20
21
22
# File 'lib/dropcam/cuepoint.rb', line 20

def image_archive(number_of_frames, width) 
  ClipArchive.new(@camera).image_archive(self.id, number_of_frames, width)
end

#mp4(number_of_frames, width) ⇒ Object



16
17
18
# File 'lib/dropcam/cuepoint.rb', line 16

def mp4(number_of_frames, width) 
  ClipArchive.new(@camera).get_mp4(self.id, number_of_frames, width)
end