alula-ruby 1.9.12 → 1.9.14

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: b036dea06bcb33acc46821863dbe9dcfc74f42aa566ffae8e38b122823cf546a
4
- data.tar.gz: de02c3ba56ef65b974eec22af0f54aad1f18f66a6612c8c513abbbcc2c4f5be4
3
+ metadata.gz: b547df55d5d5b8562bced61bd6f4661eb15a51aa7f2131552deaf603673deff8
4
+ data.tar.gz: 9acef03ebd5c6acb48b4c8443e498f2961c7881827f93998dc53bf55451c8578
5
5
  SHA512:
6
- metadata.gz: 614b39934d9ee61e01795715693d477adc4b879230af3d46b194af39690325f55342cfa92be7c8314e75577d42fd971541bfd09b44239177dc6d9a0f47af6335
7
- data.tar.gz: 1017caa72451ba7aa01e688e9324f5736a07ee4f0effcc670dd45fbb2ad6402351e0b2af562bd4db8e204e1e5d7afb90d9c57a073254480711b73f6b99c03b49
6
+ metadata.gz: 7829e858b87ccfe6970824969a6d0acfd706d008cb82ccd11ff59e09fb2f6890c8ec783a32e4368671bc78b34acea473448c18d157c65dfd84cf583397a7089a
7
+ data.tar.gz: c4d105c79e0422a6ada8542c86c5a92ec55f3fc92a0c2138b85a579a617fb7d0d176f39d3a3b7dc53c335541c82d356528f3026d9d1a5c3cb1ae8f3fd8d12c97
data/VERSION.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  | Version | Date | Description |
4
4
  | ------- | ------------| --------------------------------------------------------------------------- |
5
+ | v1.9.14 | 2024-08-28 | Getting rid of all mention of callerID in device import |
6
+ | v1.9.13 | 2024-08-27 | Updated camera info proc |
5
7
  | v1.9.12 | 2024-08-26 | Added get camera info proc |
6
8
  | v1.9.11 | 2024-08-22 | Fixing incorrect payload format for set recording config proc |
7
9
  | v1.9.10 | 2024-08-15 | Overriding RPC response for camera config and server config procs |
@@ -3,18 +3,43 @@
3
3
  module Alula
4
4
  class CameraGetInfoProc < Alula::RpcResource
5
5
  class Response < Alula::RpcResponse
6
- attr_accessor :result
6
+ attr_accessor :result, :pagination
7
7
 
8
8
  def initialize(response)
9
9
  super(response)
10
10
  @result = response.data['data']
11
+ pagination = response.data['metaData']
12
+
13
+ @pagination = Alula::Pagination.new(
14
+ {
15
+ 'total' => pagination['totalHits'],
16
+ 'number' => pagination['page'],
17
+ 'size' => pagination['size']
18
+ }
19
+ )
11
20
  end
12
21
  end
13
22
 
14
- def self.call(device_id:)
23
+ def self.call(device_id:, filter_online_offline:, page_size: 20, page_number: 1)
24
+ query_params = {
25
+ 'sort' => '-date',
26
+ 'page[size]' => page_size,
27
+ 'page[number]' => page_number
28
+ }
29
+
30
+ if filter_online_offline
31
+ query_params.merge!(
32
+ 'filter[data.online.value][$not][0]' => 0,
33
+ 'filter[data.online.value][$not][1]' => 1
34
+ )
35
+ end
36
+
37
+ query_string = URI.encode_www_form(query_params)
38
+ formatted_path = "/video/v1/device/#{device_id}/info?#{query_string}"
39
+
15
40
  request(
16
41
  http_method: :get,
17
- path: "/video/v1/device/#{device_id}/info",
42
+ path: formatted_path,
18
43
  handler: Response,
19
44
  payload: {}
20
45
  )
@@ -238,13 +238,6 @@ module Alula
238
238
  creatable_by: [],
239
239
  patchable_by: [:system, :station, :dealer, :technician]
240
240
 
241
- field :caller_id_phone_number,
242
- type: :string,
243
- sortable: false,
244
- filterable: true,
245
- creatable_by: [],
246
- patchable_by: [:system, :station, :dealer, :technician]
247
-
248
241
  field :station_account_number,
249
242
  type: :string,
250
243
  sortable: false,
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.12'
4
+ VERSION = '1.9.14'
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.12
4
+ version: 1.9.14
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-26 00:00:00.000000000 Z
11
+ date: 2024-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty