Class: Alula::CameraGetInfoProc::Response

Inherits:
RpcResponse
  • Object
show all
Defined in:
lib/alula/procedures/camera_get_info_proc.rb

Instance Attribute Summary collapse

Attributes inherited from RpcResponse

#data, #http_status, #request_id

Instance Method Summary collapse

Methods inherited from RpcResponse

#ok?

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



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

def initialize(response)
  super(response)
  @result = response.data['data']
  pagination = response.data['metaData']

  @pagination = Alula::Pagination.new(
    {
      'total' => pagination['totalHits'],
      'number' => pagination['page'],
      'size' => pagination['size']
    }
  )
end

Instance Attribute Details

#paginationObject

Returns the value of attribute pagination.



6
7
8
# File 'lib/alula/procedures/camera_get_info_proc.rb', line 6

def pagination
  @pagination
end

#resultObject

Returns the value of attribute result.



6
7
8
# File 'lib/alula/procedures/camera_get_info_proc.rb', line 6

def result
  @result
end