Sha256: 36ab0684216112ce9ebdeb44c8d4a87fc339235c790141b2b8837e3d34863dd4
Contents?: true
Size: 885 Bytes
Versions: 23
Compression:
Stored size: 885 Bytes
Contents
# frozen_string_literal: true # rubocop:disable Metrics/MethodLength module Alula class CameraSetRecordingConfigProc < Alula::RpcResource class Response < Alula::RpcResponse attr_accessor :result def initialize(response) super(response) @result = response.data['data'] @cmd = response end end def self.call(serial_number:, record_mode:, pre_seconds:, post_seconds:) request( http_method: :post, path: "/video/v1/device/#{serial_number}/recordConfig", payload: { event: { recordMode: record_mode, preSeconds: pre_seconds.to_i, postSeconds: post_seconds.to_i }, allday: { mode: 'NULL' } }, handler: Response, wrap: false ) end end end # rubocop:enable Metrics/MethodLength
Version data entries
23 entries across 23 versions & 1 rubygems