alula-ruby 1.9.9 → 1.9.11
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 +4 -4
- data/VERSION.md +2 -0
- data/lib/alula/procedures/camera_get_rec_config_proc.rb +1 -5
- data/lib/alula/procedures/camera_get_svr_config_proc.rb +1 -5
- data/lib/alula/procedures/camera_set_rec_config_proc.rb +24 -9
- data/lib/alula/procedures/camera_set_svr_config_proc.rb +7 -5
- data/lib/alula/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f010ddbce82b3847631382e487cc1f9f8af49dcce8fad463186f57522d4d482a
|
4
|
+
data.tar.gz: 274290d154f94c8a533d5c23dff8e60249c268f4f192cffb294a60c1e96bdbea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 817956a2ef5d2d00fd03c67df0dfb02daa9a87c3a7dc1bd6b481616ba303c00febc3083242ed70159a1a205c760a4c79ebb4c46691b31bdc245deeb588f281bf
|
7
|
+
data.tar.gz: 43dfafec207e88331db814806ad312d8572b6a9c246ff043a6c7c0ace8221b87d6d30c31612ce251ef52188d4ab9c5c6416b85f3cd8991a46f2ae50ae03c8d95
|
data/VERSION.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
| Version | Date | Description |
|
4
4
|
| ------- | ------------| --------------------------------------------------------------------------- |
|
5
|
+
| v1.9.11 | 2024-08-22 | Fixing incorrect payload format for set recording config proc |
|
6
|
+
| v1.9.10 | 2024-08-15 | Overriding RPC response for camera config and server config procs |
|
5
7
|
| v1.9.9 | 2024-08-15 | Giving camera server config call a payload field, updated response data for svrConfig + recConfig |
|
6
8
|
| v1.9.8 | 2024-08-14 | Allow force for get camera wifi |
|
7
9
|
| v1.9.7 | 2024-08-13 | Update base RPC class to handle response |
|
@@ -3,16 +3,12 @@
|
|
3
3
|
module Alula
|
4
4
|
class CameraGetRecordingConfigProc < Alula::RpcResource
|
5
5
|
class Response < Alula::RpcResponse
|
6
|
-
attr_accessor :
|
6
|
+
attr_accessor :result
|
7
7
|
|
8
8
|
def initialize(response)
|
9
9
|
super(response)
|
10
10
|
@result = response.data.dig('data', 'data')
|
11
11
|
end
|
12
|
-
|
13
|
-
def ok?
|
14
|
-
super && @cmd == 'getRecordConfig'
|
15
|
-
end
|
16
12
|
end
|
17
13
|
|
18
14
|
def self.call(serial_number:)
|
@@ -3,16 +3,12 @@
|
|
3
3
|
module Alula
|
4
4
|
class CameraGetServerConfigProc < Alula::RpcResource
|
5
5
|
class Response < Alula::RpcResponse
|
6
|
-
attr_accessor :
|
6
|
+
attr_accessor :result
|
7
7
|
|
8
8
|
def initialize(response)
|
9
9
|
super(response)
|
10
10
|
@result = response.data.dig('data', 'data')
|
11
11
|
end
|
12
|
-
|
13
|
-
def ok?
|
14
|
-
super && @cmd == 'getSvrConfig'
|
15
|
-
end
|
16
12
|
end
|
17
13
|
|
18
14
|
def self.call(serial_number:)
|
@@ -1,22 +1,37 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# rubocop:disable Metrics/MethodLength
|
3
4
|
module Alula
|
4
5
|
class CameraSetRecordingConfigProc < Alula::RpcResource
|
5
6
|
class Response < Alula::RpcResponse
|
6
|
-
|
7
|
+
attr_accessor :result
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
def initialize(response)
|
10
|
+
super(response)
|
11
|
+
@result = response.data['data']
|
12
|
+
@cmd = response
|
13
|
+
end
|
14
|
+
end
|
13
15
|
|
16
|
+
def self.call(serial_number:, record_mode:, pre_seconds:, post_seconds:)
|
14
17
|
request(
|
15
18
|
http_method: :post,
|
16
|
-
path: "/v1/device/#{serial_number}/recordConfig",
|
17
|
-
payload:
|
18
|
-
|
19
|
+
path: "/video/v1/device/#{serial_number}/recordConfig",
|
20
|
+
payload: {
|
21
|
+
event: {
|
22
|
+
recordMode: record_mode,
|
23
|
+
preSeconds: pre_seconds.to_i,
|
24
|
+
postSeconds: post_seconds.to_i
|
25
|
+
},
|
26
|
+
allday: {
|
27
|
+
mode: 'NULL'
|
28
|
+
}
|
29
|
+
},
|
30
|
+
handler: Response,
|
31
|
+
wrap: false
|
19
32
|
)
|
20
33
|
end
|
21
34
|
end
|
22
35
|
end
|
36
|
+
|
37
|
+
# rubocop:enable Metrics/MethodLength
|
@@ -3,17 +3,19 @@
|
|
3
3
|
module Alula
|
4
4
|
class CameraSetServerConfigProc < Alula::RpcResource
|
5
5
|
class Response < Alula::RpcResponse
|
6
|
+
attr_accessor :result
|
7
|
+
|
8
|
+
def initialize(response)
|
9
|
+
super(response)
|
10
|
+
@result = response.data['data']
|
11
|
+
end
|
6
12
|
end
|
7
13
|
|
8
14
|
def self.call(serial_number:, should_use_s3:)
|
9
|
-
payload = {
|
10
|
-
"shouldUseS3": should_use_s3
|
11
|
-
}
|
12
|
-
|
13
15
|
request(
|
14
16
|
http_method: :post,
|
15
17
|
path: "/video/v1/device/#{serial_number}/svrConfig",
|
16
|
-
payload:
|
18
|
+
payload: { shouldUseS3: should_use_s3 },
|
17
19
|
handler: Response
|
18
20
|
)
|
19
21
|
end
|
data/lib/alula/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alula-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Titus Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|