Module: Talentio

Defined in:
lib/talentio.rb,
lib/talentio/cli.rb,
lib/talentio/client.rb,
lib/talentio/notifier/slack.rb,
lib/talentio/notifier/version.rb,
lib/talentio/notifier/slack/interview.rb,
lib/talentio/notifier/slack/selection_result.rb

Defined Under Namespace

Modules: Notifier Classes: CLI, Client

Class Method Summary collapse

Class Method Details

.candidatesObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/talentio.rb', line 10

def candidates
  result = client.candidates.map do |c|
    # まだステージが割り当てられていない
    next if c['stages'].empty?
    # 役員面接とかスキップしたい場合
    next if ENV['TALENTIO_SKIP_STAGE'] && c['stages'].size > ENV['TALENTIO_SKIP_STAGE'].to_i

    candidate = client.candidates(c['id'])

    s = candidate['stages'].last

    {
      time: c['registeredAt'],
      id: c['id'],
      step: s['step'],
      type: s['type'],
      evaluations: s['evaluations'],
      scheduled_at: s['scheduledAt'],
      requisition_name: c['requisition']['name'],
      candidate_url: URI.join(url, "ats/candidate/#{c['id']}").to_s
    }
  end.flatten.compact
end

.urlObject



34
35
36
# File 'lib/talentio.rb', line 34

def url
  ENV['TALENTIO_URL'] || "https://talentio.com"
end