Class: NestConnect::Device::Camera
- Inherits:
-
Object
- Object
- NestConnect::Device::Camera
- Defined in:
- lib/nest_connect/devices/camera.rb
Instance Attribute Summary collapse
-
#activity_zones ⇒ Object
readonly
Returns the value of attribute activity_zones.
-
#app_url ⇒ Object
readonly
Returns the value of attribute app_url.
-
#device_id ⇒ Object
readonly
Returns the value of attribute device_id.
-
#is_audio_input_enabled ⇒ Object
readonly
Returns the value of attribute is_audio_input_enabled.
-
#is_online ⇒ Object
readonly
Returns the value of attribute is_online.
-
#is_public_share_enabled ⇒ Object
readonly
Returns the value of attribute is_public_share_enabled.
-
#is_streaming ⇒ Object
Returns the value of attribute is_streaming.
-
#is_video_history_enabled ⇒ Object
readonly
Returns the value of attribute is_video_history_enabled.
-
#last_event ⇒ Object
readonly
Returns the value of attribute last_event.
-
#last_is_online_change ⇒ Object
readonly
Returns the value of attribute last_is_online_change.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#name_long ⇒ Object
readonly
Returns the value of attribute name_long.
-
#public_share_url ⇒ Object
readonly
Returns the value of attribute public_share_url.
-
#snapshot_url ⇒ Object
readonly
Returns the value of attribute snapshot_url.
-
#software_version ⇒ Object
readonly
Returns the value of attribute software_version.
-
#structure_id ⇒ Object
readonly
Returns the value of attribute structure_id.
-
#web_url ⇒ Object
readonly
Returns the value of attribute web_url.
-
#where_id ⇒ Object
readonly
Returns the value of attribute where_id.
-
#where_name ⇒ Object
readonly
Returns the value of attribute where_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_class: NestConnect::API::Devices::Camera, **args) ⇒ Camera
constructor
A new instance of Camera.
- #reload ⇒ Object
Constructor Details
#initialize(api_class: NestConnect::API::Devices::Camera, **args) ⇒ Camera
Returns a new instance of Camera.
8 9 10 11 12 13 |
# File 'lib/nest_connect/devices/camera.rb', line 8 def initialize(api_class: NestConnect::API::Devices::Camera, **args) @api_class = api_class args.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#activity_zones ⇒ Object (readonly)
Returns the value of attribute activity_zones.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def activity_zones @activity_zones end |
#app_url ⇒ Object (readonly)
Returns the value of attribute app_url.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def app_url @app_url end |
#device_id ⇒ Object (readonly)
Returns the value of attribute device_id.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def device_id @device_id end |
#is_audio_input_enabled ⇒ Object (readonly)
Returns the value of attribute is_audio_input_enabled.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def is_audio_input_enabled @is_audio_input_enabled end |
#is_online ⇒ Object (readonly)
Returns the value of attribute is_online.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def is_online @is_online end |
#is_public_share_enabled ⇒ Object (readonly)
Returns the value of attribute is_public_share_enabled.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def is_public_share_enabled @is_public_share_enabled end |
#is_streaming ⇒ Object
Returns the value of attribute is_streaming.
42 43 44 |
# File 'lib/nest_connect/devices/camera.rb', line 42 def is_streaming @is_streaming end |
#is_video_history_enabled ⇒ Object (readonly)
Returns the value of attribute is_video_history_enabled.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def is_video_history_enabled @is_video_history_enabled end |
#last_event ⇒ Object (readonly)
Returns the value of attribute last_event.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def last_event @last_event end |
#last_is_online_change ⇒ Object (readonly)
Returns the value of attribute last_is_online_change.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def last_is_online_change @last_is_online_change end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def name @name end |
#name_long ⇒ Object (readonly)
Returns the value of attribute name_long.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def name_long @name_long end |
#public_share_url ⇒ Object (readonly)
Returns the value of attribute public_share_url.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def public_share_url @public_share_url end |
#snapshot_url ⇒ Object (readonly)
Returns the value of attribute snapshot_url.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def snapshot_url @snapshot_url end |
#software_version ⇒ Object (readonly)
Returns the value of attribute software_version.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def software_version @software_version end |
#structure_id ⇒ Object (readonly)
Returns the value of attribute structure_id.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def structure_id @structure_id end |
#web_url ⇒ Object (readonly)
Returns the value of attribute web_url.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def web_url @web_url end |
#where_id ⇒ Object (readonly)
Returns the value of attribute where_id.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def where_id @where_id end |
#where_name ⇒ Object (readonly)
Returns the value of attribute where_name.
21 22 23 |
# File 'lib/nest_connect/devices/camera.rb', line 21 def where_name @where_name end |
Class Method Details
.from_hash_collection(hash) ⇒ Object
4 5 6 |
# File 'lib/nest_connect/devices/camera.rb', line 4 def self.from_hash_collection(hash) hash.values.map { |value| new(value) } end |
Instance Method Details
#reload ⇒ Object
15 16 17 18 19 |
# File 'lib/nest_connect/devices/camera.rb', line 15 def reload api_runner.get.body.each do |key, value| instance_variable_set("@#{key}", value) end end |