Class: Alula::CameraGetWifiProc

Inherits:
RpcResource show all
Defined in:
lib/alula/procedures/camera_get_wifi_proc.rb

Defined Under Namespace

Classes: Response

Class Method Summary collapse

Methods inherited from RpcResource

ok?, request, wrap_payload

Class Method Details

.call(device_id:, customer_id:, limit: 1, offset: 0, force: false) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/alula/procedures/camera_get_wifi_proc.rb', line 8

def self.call(device_id:, customer_id:, limit: 1, offset: 0, force: false)
  cache_options = { 'limit': limit, 'offset': offset }
  cache_options['mode'] = 'FORCE_UPDATE' if force
  payload = {
    "deviceId": device_id, "cacheOptions": cache_options
  }
  request(
    http_method: :post,
    path: "/video/v1/rpc/devices/get-network-info?customerId=#{customer_id}",
    payload:, handler: Response
  )
end