seam 2.160.0 → 2.161.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9ac3e0c9cb925b018222545bcee3b309b2ff98db71a6475235a2d78cee404c0
4
- data.tar.gz: 3c1ae4fb9af5eae7103e2994a9c9e7b5073090932b89beec66dea6eaaee5b31b
3
+ metadata.gz: 7cc9d1dfaecd365b64e591da220ce5063278d507c6e0e44bde36c826dcfb66ba
4
+ data.tar.gz: 70afc25cd775515ffd34e040a5515a5ee2d1359279a90ab8ac09ce0b6ed17338
5
5
  SHA512:
6
- metadata.gz: 12634a54049fc148d9426f8cd7a022f2e0f6cf4d126a4cbb69bd3427fe79e5aa973c56cc99eae40b77259bd37ea51e52c8fe87799c3b501a7c4b836f1ba2269d
7
- data.tar.gz: 34828e2361372b547ff08e97840a70d96b4a9a328d60c60b7f1c019708af1fb1a3d3a20d5dc2623ceb53188dbf0d376c57255e3379f75359a0086e53ed9790df
6
+ metadata.gz: 8c27d9dcee2e2d54358134660ee38476479fb7fbb78242a424bba593a95d1d8b19a83b03d193d92d5020f9d9b16459d687d29a43e4fc634b978c36f00df67734
7
+ data.tar.gz: 33c02f6c6856b7e24b634f91131d72e7bc689c0577881cb2b712c47e3e54e74f7a64ae611330cd823f51ab2c08002189e05be238b87a02b3267e9cfd3c71fa1b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seam (2.160.0)
4
+ seam (2.161.0)
5
5
  faraday (~> 2.7)
6
6
  faraday-retry (~> 2.2)
7
7
  svix (~> 1.30)
@@ -171,7 +171,7 @@ CHECKSUMS
171
171
  rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
172
172
  rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
173
173
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
174
- seam (2.160.0)
174
+ seam (2.161.0)
175
175
  simplecov (1.1.1) sha256=25825ef13f0b2e74694d769817dad6ab8e90131dabdaa666e522fea105521e78
176
176
  simplecov-console (0.9.5) sha256=b1108bcfff5f210143e2b8301698c367b01586f20d25a73e95475a5df6fc6ff6
177
177
  standard (1.56.0) sha256=ae2af4d9669589162ac69ed5ef59dcf9f346d4afc81f7e62b84339310dfcb787
@@ -308,7 +308,7 @@ module Seam
308
308
  date_accessor :created_at
309
309
  end
310
310
 
311
- # Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
311
+ # Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
312
312
  class InsufficientPermissions < Errors
313
313
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
314
314
  # @return [String]
@@ -78,7 +78,7 @@ module Seam
78
78
  date_accessor :created_at
79
79
  end
80
80
 
81
- # Indicates that Seam's integration user does not have sufficient permissions on the provider's system backing this [access control system](https://www.seam.co/docs/low-level-apis/access-systems). Access cannot be managed until permissions are restored. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
81
+ # Indicates that the provider's system backing this [access control system](https://www.seam.co/docs/low-level-apis/access-systems) is not letting Seam act on it, so access cannot be managed until this is resolved. The error message says which of two causes applies. Either Seam's integration user does not have sufficient permissions on the provider's system, or has been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. Or the provider account or site does not have a valid subscription with the provider: set up or renew that subscription with the provider.
82
82
  class InsufficientPermissions < Errors
83
83
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
84
84
  # @return [String]
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Resources
5
+ # Represents the WebRTC SDP answer that starts streaming video from a camera for a live view session.
6
+ class CameraLiveViewAnswer < BaseResource
7
+ # WebRTC SDP answer for the offer, limited to 64 KiB of UTF-8 data.
8
+ # @return [String]
9
+ attr_accessor :sdp_answer
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Resources
5
+ # Represents a short-lived live view session for a single camera. Use the session ID and token to start a WebRTC stream and to stop the session.
6
+ class CameraLiveViewSession < BaseResource
7
+ # ID of the camera live view session.
8
+ # @return [String]
9
+ attr_accessor :camera_live_view_session_id
10
+ # ID of the camera.
11
+ # @return [String]
12
+ attr_accessor :device_id
13
+ # Token that authorizes the offer and stop requests for this session.
14
+ # @return [String]
15
+ attr_accessor :token
16
+
17
+ # Date and time at which the live view session expires.
18
+ # @return [Time]
19
+ date_accessor :expires_at
20
+ end
21
+ end
22
+ end
@@ -75,7 +75,7 @@ module Seam
75
75
  date_accessor :created_at
76
76
  end
77
77
 
78
- # Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
78
+ # Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
79
79
  class InsufficientPermissions < Errors
80
80
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
81
81
  # @return [String]
@@ -1023,6 +1023,18 @@ module Seam
1023
1023
  attr_accessor :timezone_raw_offset_ms
1024
1024
  end
1025
1025
 
1026
+ class ReolinkMetadata < BaseResource
1027
+ # Firmware version reported by the camera.
1028
+ # @return [String, nil]
1029
+ attr_accessor :firmware_version
1030
+ # Hardware version reported by the camera.
1031
+ # @return [String, nil]
1032
+ attr_accessor :hardware_version
1033
+ # Model reported by the Reolink camera.
1034
+ # @return [String, nil]
1035
+ attr_accessor :model
1036
+ end
1037
+
1026
1038
  class RingMetadata < BaseResource
1027
1039
  # Device ID for a Ring device.
1028
1040
  # @return [String, nil]
@@ -1889,6 +1901,9 @@ module Seam
1889
1901
  # Metadata for an Omnitec device.
1890
1902
  # @return [OmnitecMetadata, nil]
1891
1903
  resource_accessor :omnitec_metadata, OmnitecMetadata
1904
+ # Metadata for a Reolink camera.
1905
+ # @return [ReolinkMetadata, nil]
1906
+ resource_accessor :reolink_metadata, ReolinkMetadata
1892
1907
  # Metadata for a Ring device.
1893
1908
  # @return [RingMetadata, nil]
1894
1909
  resource_accessor :ring_metadata, RingMetadata
@@ -2716,6 +2731,9 @@ module Seam
2716
2731
  # Indicates whether the device supports simulating removal in a sandbox.
2717
2732
  # @return [Boolean, nil]
2718
2733
  attr_accessor :can_simulate_removal
2734
+ # Indicates whether the camera supports streaming live video through a camera live view session.
2735
+ # @return [Boolean, nil]
2736
+ attr_accessor :can_stream_live_video
2719
2737
  # Indicates whether the thermostat can be turned off.
2720
2738
  # @return [Boolean, nil]
2721
2739
  attr_accessor :can_turn_off_hvac
@@ -2789,6 +2807,7 @@ module Seam
2789
2807
  # - `ring_camera`
2790
2808
  # - `tapo_camera`
2791
2809
  # - `arlo_camera`
2810
+ # - `reolink_camera`
2792
2811
  attr_accessor :device_type
2793
2812
  # Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices.
2794
2813
  # @return [String]
@@ -60,6 +60,9 @@ module Seam
60
60
  # Indicates whether the device supports simulating removal in a sandbox.
61
61
  # @return [Boolean, nil]
62
62
  attr_accessor :can_simulate_removal
63
+ # Indicates whether the camera supports streaming live video through a camera live view session.
64
+ # @return [Boolean, nil]
65
+ attr_accessor :can_stream_live_video
63
66
  # Indicates whether the thermostat can be turned off.
64
67
  # @return [Boolean, nil]
65
68
  attr_accessor :can_turn_off_hvac
@@ -128,6 +131,7 @@ module Seam
128
131
  # - `ring`
129
132
  # - `tapo`
130
133
  # - `arlo`
134
+ # - `reolink`
131
135
  # - `ical`
132
136
  # - `lodgify`
133
137
  # - `hostaway`
@@ -4866,6 +4866,9 @@ module Seam
4866
4866
  # URL to a thumbnail image captured at the time of activation.
4867
4867
  # @return [String, nil]
4868
4868
  attr_accessor :image_url
4869
+ # IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one.
4870
+ # @return [Array<String>]
4871
+ attr_accessor :media_ids
4869
4872
  # Sub-type of motion detected, if available.
4870
4873
  # @return [String, nil]
4871
4874
  # Known values:
@@ -4918,6 +4921,9 @@ module Seam
4918
4921
  # URL to a thumbnail image captured at the time the doorbell was pressed.
4919
4922
  # @return [String, nil]
4920
4923
  attr_accessor :image_url
4924
+ # IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one.
4925
+ # @return [Array<String>]
4926
+ attr_accessor :media_ids
4921
4927
  # URL to a short video clip captured at the time the doorbell was pressed.
4922
4928
  # @return [String, nil]
4923
4929
  attr_accessor :video_url
@@ -12,6 +12,8 @@ require_relative "acs_system"
12
12
  require_relative "acs_user"
13
13
  require_relative "action_attempt"
14
14
  require_relative "batch"
15
+ require_relative "camera_live_view_answer"
16
+ require_relative "camera_live_view_session"
15
17
  require_relative "client_session"
16
18
  require_relative "connect_webview"
17
19
  require_relative "connected_account"
@@ -20,6 +22,7 @@ require_relative "device"
20
22
  require_relative "device_provider"
21
23
  require_relative "event"
22
24
  require_relative "instant_key"
25
+ require_relative "media"
23
26
  require_relative "noise_threshold"
24
27
  require_relative "pagination"
25
28
  require_relative "phone"
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Resources
5
+ # Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta.
6
+ class Media < BaseResource
7
+ # MIME type of the media, such as `video/mp4` or `image/jpeg`.
8
+ # @return [String, nil]
9
+ attr_accessor :content_type
10
+ # ID of the device that captured the media.
11
+ # @return [String, nil]
12
+ attr_accessor :device_id
13
+ # ID of the event that the media belongs to.
14
+ # @return [String, nil]
15
+ attr_accessor :event_id
16
+ # ID of the media.
17
+ # @return [String]
18
+ attr_accessor :media_id
19
+ # Type of the media: a video clip or a still image.
20
+ # @return [String]
21
+ # Known values:
22
+ # - `video`
23
+ # - `image`
24
+ attr_accessor :media_type
25
+ # Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it.
26
+ # @return [String]
27
+ # Known values:
28
+ # - `pending`
29
+ # - `available`
30
+ # - `unavailable`
31
+ # - `failed`
32
+ attr_accessor :status
33
+ # Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL.
34
+ # @return [String, nil]
35
+ attr_accessor :url
36
+ # Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline.
37
+ # @return [String, nil]
38
+ # Known values:
39
+ # - `h264`
40
+ # - `hevc`
41
+ attr_accessor :video_codec
42
+ # ID of the workspace that contains the media.
43
+ # @return [String]
44
+ attr_accessor :workspace_id
45
+
46
+ # Date and time at which the media was created.
47
+ # @return [Time]
48
+ date_accessor :created_at
49
+
50
+ # Date and time at which the media stops being available. Null when Seam does not know when the media expires.
51
+ # @return [Time, nil]
52
+ date_accessor :expires_at
53
+ end
54
+ end
55
+ end
@@ -310,7 +310,7 @@ module Seam
310
310
  date_accessor :created_at
311
311
  end
312
312
 
313
- # Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
313
+ # Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
314
314
  class InsufficientPermissions < Errors
315
315
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
316
316
  # @return [String]
@@ -48,7 +48,7 @@ module Seam
48
48
  date_accessor :created_at
49
49
  end
50
50
 
51
- # Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
51
+ # Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
52
52
  class InsufficientPermissions < Errors
53
53
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
54
54
  # @return [String]
@@ -991,6 +991,9 @@ module Seam
991
991
  # Indicates whether the device supports simulating removal in a sandbox.
992
992
  # @return [Boolean, nil]
993
993
  attr_accessor :can_simulate_removal
994
+ # Indicates whether the camera supports streaming live video through a camera live view session.
995
+ # @return [Boolean, nil]
996
+ attr_accessor :can_stream_live_video
994
997
  # Indicates whether the thermostat can be turned off.
995
998
  # @return [Boolean, nil]
996
999
  attr_accessor :can_turn_off_hvac
@@ -1064,6 +1067,7 @@ module Seam
1064
1067
  # - `ring_camera`
1065
1068
  # - `tapo_camera`
1066
1069
  # - `arlo_camera`
1070
+ # - `reolink_camera`
1067
1071
  attr_accessor :device_type
1068
1072
  # Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices.
1069
1073
  # @return [String]
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Clients
5
+ class Cameras
6
+ def initialize(client:, defaults:)
7
+ @client = client
8
+ @defaults = defaults
9
+ end
10
+
11
+ def live_views
12
+ @live_views ||= Seam::Clients::CamerasLiveViews.new(client: @client, defaults: @defaults)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Clients
5
+ class CamerasLiveViews
6
+ def initialize(client:, defaults:)
7
+ @client = client
8
+ @defaults = defaults
9
+ end
10
+
11
+ # Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session.
12
+ #
13
+ # Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`.
14
+ # @param device_id [String] ID of the camera to view.
15
+ # @param duration_seconds [Integer, nil] Number of seconds for which the live view session is valid, up to 600.
16
+ # @param include_audio [Boolean, nil] Indicates whether to include the camera's audio.
17
+ # @return [Seam::Resources::CameraLiveViewSession] OK
18
+ def create(device_id:, duration_seconds: nil, include_audio: nil)
19
+ res = @client.post("/cameras/live_views/create", {device_id: device_id, duration_seconds: duration_seconds, include_audio: include_audio}.compact)
20
+
21
+ Seam::Resources::CameraLiveViewSession.load_from_response(res.body["camera_live_view_session"])
22
+ end
23
+
24
+ # Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`.
25
+ #
26
+ # Camera live view is in beta. To enable it for your workspace, contact Seam support.
27
+ # @param camera_live_view_session_id [String] ID of the camera live view session.
28
+ # @param sdp_offer [String] WebRTC SDP offer from the viewer, limited to 64 KiB of UTF-8 data.
29
+ # @param token [String] Token returned when the camera live view session was created.
30
+ # @return [Seam::Resources::CameraLiveViewAnswer] OK
31
+ def offer(camera_live_view_session_id:, sdp_offer:, token:)
32
+ res = @client.post("/cameras/live_views/offer", {camera_live_view_session_id: camera_live_view_session_id, sdp_offer: sdp_offer, token: token}.compact)
33
+
34
+ Seam::Resources::CameraLiveViewAnswer.load_from_response(res.body["camera_live_view_answer"])
35
+ end
36
+
37
+ # Stops a camera live view session that the current client session owns.
38
+ #
39
+ # Camera live view is in beta. To enable it for your workspace, contact Seam support.
40
+ # @param camera_live_view_session_id [String] ID of the camera live view session.
41
+ # @param token [String] Token returned when the camera live view session was created.
42
+ # @return [nil] OK
43
+ def stop(camera_live_view_session_id:, token:)
44
+ @client.post("/cameras/live_views/stop", {camera_live_view_session_id: camera_live_view_session_id, token: token}.compact)
45
+
46
+ nil
47
+ end
48
+ end
49
+ end
50
+ end
@@ -14,7 +14,7 @@ module Seam
14
14
  # @param customer_id [String, nil] Customer ID that you want to associate with the new client session.
15
15
  # @param customer_key [String, nil] Customer key that you want to associate with the new client session.
16
16
  # @param expires_at [Time, nil] Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
17
- # @param user_identifier_key [String, nil] Your user ID for the user for whom you want to create a client session.
17
+ # @param user_identifier_key [String, nil] Your user ID for the user for whom you want to create a client session. When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session.
18
18
  # @param user_identity_id [String, nil] ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session.
19
19
  # @param user_identity_ids [Array<String>, nil] IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
20
20
  # @deprecated user_identity_ids: Use `user_identity_id` instead.
@@ -48,7 +48,7 @@ module Seam
48
48
  # @param connect_webview_ids [Array<String>, nil] IDs of the [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session).
49
49
  # @param connected_account_ids [Array<String>, nil] IDs of the [connected accounts](https://www.seam.co/docs/api/connected_accounts/object) that you want to associate with the client session (or that are already associated with the existing client session).
50
50
  # @param expires_at [Time, nil] Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it.
51
- # @param user_identifier_key [String, nil] Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session).
51
+ # @param user_identifier_key [String, nil] Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session). When you authenticate with a publishable key, the `user_identifier_key` must be a high-entropy secret that only the user knows, such as a UUIDv4 or a salted hash. Do not use an email address, name, phone number, or other guessable value, because anyone who knows the `user_identifier_key` can retrieve the client session.
52
52
  # @param user_identity_id [String, nil] ID of the [user identity](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session).
53
53
  # @param user_identity_ids [Array<String>, nil] IDs of the [user identities](https://www.seam.co/docs/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
54
54
  # @deprecated user_identity_ids: Use `user_identity_id`.
@@ -16,6 +16,8 @@ require_relative "acs_entrances"
16
16
  require_relative "acs_systems"
17
17
  require_relative "acs_users"
18
18
  require_relative "action_attempts"
19
+ require_relative "cameras"
20
+ require_relative "cameras_live_views"
19
21
  require_relative "client_sessions"
20
22
  require_relative "connect_webviews"
21
23
  require_relative "connected_accounts"
@@ -28,6 +30,7 @@ require_relative "events"
28
30
  require_relative "instant_keys"
29
31
  require_relative "locks"
30
32
  require_relative "locks_simulate"
33
+ require_relative "media"
31
34
  require_relative "noise_sensors"
32
35
  require_relative "noise_sensors_noise_thresholds"
33
36
  require_relative "noise_sensors_simulate"
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Clients
5
+ class Media
6
+ def initialize(client:, defaults:)
7
+ @client = client
8
+ @defaults = defaults
9
+ end
10
+
11
+ # Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta.
12
+ # @param media_id [String] ID of the media that you want to get.
13
+ # @param format [String, nil] Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video.
14
+ # @return [Seam::Resources::Media] OK
15
+ def get(media_id:, format: nil)
16
+ res = @client.get("/media/get", {media_id: media_id, format: format}.compact)
17
+
18
+ Seam::Resources::Media.load_from_response(res.body["media"])
19
+ end
20
+ end
21
+ end
22
+ end
@@ -22,6 +22,10 @@ module Seam
22
22
  @action_attempts ||= Seam::Clients::ActionAttempts.new(client: @client, defaults: @defaults)
23
23
  end
24
24
 
25
+ def cameras
26
+ @cameras ||= Seam::Clients::Cameras.new(client: @client, defaults: @defaults)
27
+ end
28
+
25
29
  def client_sessions
26
30
  @client_sessions ||= Seam::Clients::ClientSessions.new(client: @client, defaults: @defaults)
27
31
  end
@@ -54,6 +58,10 @@ module Seam
54
58
  @locks ||= Seam::Clients::Locks.new(client: @client, defaults: @defaults)
55
59
  end
56
60
 
61
+ def media
62
+ @media ||= Seam::Clients::Media.new(client: @client, defaults: @defaults)
63
+ end
64
+
57
65
  def noise_sensors
58
66
  @noise_sensors ||= Seam::Clients::NoiseSensors.new(client: @client, defaults: @defaults)
59
67
  end
data/lib/seam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Seam
4
- VERSION = "2.160.0"
4
+ VERSION = "2.161.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seam
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.160.0
4
+ version: 2.161.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seam Labs, Inc.
@@ -213,6 +213,8 @@ files:
213
213
  - lib/seam/resources/acs_user.rb
214
214
  - lib/seam/resources/action_attempt.rb
215
215
  - lib/seam/resources/batch.rb
216
+ - lib/seam/resources/camera_live_view_answer.rb
217
+ - lib/seam/resources/camera_live_view_session.rb
216
218
  - lib/seam/resources/client_session.rb
217
219
  - lib/seam/resources/connect_webview.rb
218
220
  - lib/seam/resources/connected_account.rb
@@ -222,6 +224,7 @@ files:
222
224
  - lib/seam/resources/event.rb
223
225
  - lib/seam/resources/index.rb
224
226
  - lib/seam/resources/instant_key.rb
227
+ - lib/seam/resources/media.rb
225
228
  - lib/seam/resources/noise_threshold.rb
226
229
  - lib/seam/resources/pagination.rb
227
230
  - lib/seam/resources/phone.rb
@@ -252,6 +255,8 @@ files:
252
255
  - lib/seam/routes/acs_systems.rb
253
256
  - lib/seam/routes/acs_users.rb
254
257
  - lib/seam/routes/action_attempts.rb
258
+ - lib/seam/routes/cameras.rb
259
+ - lib/seam/routes/cameras_live_views.rb
255
260
  - lib/seam/routes/client_sessions.rb
256
261
  - lib/seam/routes/connect_webviews.rb
257
262
  - lib/seam/routes/connected_accounts.rb
@@ -265,6 +270,7 @@ files:
265
270
  - lib/seam/routes/instant_keys.rb
266
271
  - lib/seam/routes/locks.rb
267
272
  - lib/seam/routes/locks_simulate.rb
273
+ - lib/seam/routes/media.rb
268
274
  - lib/seam/routes/noise_sensors.rb
269
275
  - lib/seam/routes/noise_sensors_noise_thresholds.rb
270
276
  - lib/seam/routes/noise_sensors_simulate.rb