Class: ONEAccess::API::V3_0::References

Inherits:
Base show all
Defined in:
lib/oneaccess/api/v3_0/references.rb

Class Method Summary collapse

Methods inherited from ApiBase

api_url, resource_api_path, send_get, send_post

Class Method Details

.contributors(contributor_names: nil, limit: 20, offset: 0) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/oneaccess/api/v3_0/references.rb', line 15

def contributors(contributor_names: nil, limit: 20, offset: 0)
  params = {
    contributor_names: contributor_names,
    limit:             limit,
    offset:            offset
  }.reject { |_, v| v.nil? }

  resp = send_get("contributors", params)

  Response::ContributorsResponse.from_json(resp.body)
end

.contributors_listObject



27
28
29
# File 'lib/oneaccess/api/v3_0/references.rb', line 27

def contributors_list
  Request::ContributorsRequestHandler.new(url: api_url("contributors"))
end

.investors(investor_names: nil, limit: 20, offset: 0) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/oneaccess/api/v3_0/references.rb', line 31

def investors(investor_names: nil, limit: 20, offset: 0)
  params = {
    investor_names: investor_names,
    limit:          limit,
    offset:         offset
  }.reject { |_, v| v.nil? }

  resp = send_get("investors", params)

  Response::InvestorsResponse.from_json(resp.body)
end

.investors_listObject



43
44
45
# File 'lib/oneaccess/api/v3_0/references.rb', line 43

def investors_list
  Request::InvestorsRequestHandler.new(url: api_url("investors"))
end