Module: Latitude::API::Operations::List

Instance Method Summary collapse

Instance Method Details

#all(params = {}, opts = {}) ⇒ Object



26
27
28
# File 'lib/latitude/api/operations/list.rb', line 26

def all(params = {}, opts = {})
  list(params, opts).auto_paging_each.to_a
end

#list(params = {}, opts = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/latitude/api/operations/list.rb', line 7

def list(params = {}, opts = {})
  params = deep_dup_hash(params)
  path_params = params.delete(:_path_params) || extract_path_params(params, path_param_keys)
  query = build_query(params)
  parsed = execute_request(
    method: :get,
    path: class_url(path_params: path_params),
    query: query,
    opts: opts,
  )
  ListObject.new(
    resource_class: self,
    parsed: parsed,
    request_params: params,
    request_opts: opts,
    path_params: path_params,
  )
end