Class: Dropcam::Screenshot
Instance Attribute Summary collapse
-
#camera ⇒ Object
Returns the value of attribute camera.
Attributes inherited from Base
Instance Method Summary collapse
- #current(width = 1200) ⇒ Object
- #image_at_time(timestamp, width = 1200) ⇒ Object
-
#initialize(name) ⇒ Screenshot
constructor
A new instance of Screenshot.
Methods inherited from Base
Constructor Details
#initialize(name) ⇒ Screenshot
Returns a new instance of Screenshot.
6 7 8 9 10 |
# File 'lib/dropcam/screenshot.rb', line 6 def initialize(name) @camera = camera @name = name @current_value = value end |
Instance Attribute Details
#camera ⇒ Object
Returns the value of attribute camera.
5 6 7 |
# File 'lib/dropcam/screenshot.rb', line 5 def camera @camera end |
Instance Method Details
#current(width = 1200) ⇒ Object
12 13 14 |
# File 'lib/dropcam/screenshot.rb', line 12 def current(width=1200) return image_at_time(nil, width) end |
#image_at_time(timestamp, width = 1200) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/dropcam/screenshot.rb', line 16 def image_at_time(, width=1200) params = {"uuid"=>@camera.uuid, "width" => width} params["time"] = if response = get(::IMAGE_PATH, params, @camera., true) return response end |