Module: Minter::Api::CandidateResource

Included in:
Client
Defined in:
lib/minter/api/resources/candidate_resource.rb

Instance Method Summary collapse

Instance Method Details

#candidate(public_key:, height: nil) ⇒ Object



6
7
8
9
10
# File 'lib/minter/api/resources/candidate_resource.rb', line 6

def candidate(public_key:, height: nil)
  path = "/candidate/#{public_key}"
  params = { height: height }.compact
  get(path, params)
end

#candidates(height: 1, include_stakes: nil) ⇒ Object



12
13
14
15
16
# File 'lib/minter/api/resources/candidate_resource.rb', line 12

def candidates(height: 1, include_stakes: nil)
  path = "/candidates"
  params = { height: height, include_stakes: nil }.compact
  get(path, params)
end