alula-ruby 1.9.9 → 1.9.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 862f2ea01185662b9fe69c4a124cae5319bf239e20093c310aff126099837bec
4
- data.tar.gz: c93506e0d79bec648766cf8f9ef984e0faf51e7cf7c675b712d9e8ebe3911449
3
+ metadata.gz: 0c183648594029b78deb52c39a19ce56a6994cf9d0a6fab8412167b84fc36b90
4
+ data.tar.gz: d5265a92310f1124ba478fc9d28d884df620bcd12d2cf2b9479e0da3b83551c7
5
5
  SHA512:
6
- metadata.gz: 694b237a5d7430b5115d765339953f973a86d0fd54437590cc7aafb70b9dbd122f2c28082d259769c01849fc2cfc19a3f59a1262e7f4c2514add4d5fe74febdf
7
- data.tar.gz: 9f51666dda26193152508e567f57305ab5315470e6d0e0a5256bb5b50c2243bdf48e27b1bbc46dc00cf817efdeaf4c6bd11b514edec9b2f3ec27763c3f5eff7d
6
+ metadata.gz: e6836c01a595c7f22c6e8c5b9ee7ca1cb2695be63875b9246bc2c0933bd79dfcbecbae478bc7fea850881e8bf143ed6c2afe954fcbe09dce8d62cd743a9fa47d
7
+ data.tar.gz: 606dc02ec990d037efeb54e255b43a3e6cc788c4cc3356d096c3f98a701a97d05f63be63e821e83708fc7478feb4a98378819e36060c97adcd2ad73cce6b4eda
data/VERSION.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  | Version | Date | Description |
4
4
  | ------- | ------------| --------------------------------------------------------------------------- |
5
+ | v1.9.10 | 2024-08-14 | Overriding RPC response for camera config and server config procs |
5
6
  | v1.9.9 | 2024-08-15 | Giving camera server config call a payload field, updated response data for svrConfig + recConfig |
6
7
  | v1.9.8 | 2024-08-14 | Allow force for get camera wifi |
7
8
  | 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 :cmd, :result
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 :cmd, :result
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:)
@@ -3,18 +3,20 @@
3
3
  module Alula
4
4
  class CameraSetRecordingConfigProc < Alula::RpcResource
5
5
  class Response < Alula::RpcResponse
6
- end
6
+ attr_accessor :result
7
7
 
8
- def self.call(event:, allday:)
9
- payload = {
10
- "event": event,
11
- "allday": allday
12
- }
8
+ def initialize(response)
9
+ super(response)
10
+ @result = response.data['data']
11
+ @cmd = response
12
+ end
13
+ end
13
14
 
15
+ def self.call(event:)
14
16
  request(
15
17
  http_method: :post,
16
18
  path: "/v1/device/#{serial_number}/recordConfig",
17
- payload: payload,
19
+ payload: { event:, allday: { mode: 'NULL' } },
18
20
  handler: Response
19
21
  )
20
22
  end
@@ -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: payload,
18
+ payload: { shouldUseS3: should_use_s3 },
17
19
  handler: Response
18
20
  )
19
21
  end
data/lib/alula/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alula
4
- VERSION = '1.9.9'
4
+ VERSION = '1.9.10'
5
5
  end
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.9
4
+ version: 1.9.10
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-15 00:00:00.000000000 Z
11
+ date: 2024-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty