teamtailor 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ea15733d89440836cd11873349b83f5036f63f5e1ea16232ec3c442548ce4a7
4
- data.tar.gz: a8793472aef8a5374f7ac1da3ad3aa9dc79a6ca77d2e12010e5d6c5d0bc6066c
3
+ metadata.gz: 65d5517a7804ca23cfab37e186ce9a3a8e6fd834d19142f1639bd43a713f0cad
4
+ data.tar.gz: 1ce95b3c0f5734a5a75d7e735a2938396e66b1c6a66ecb636f11951e99cb16b4
5
5
  SHA512:
6
- metadata.gz: 77f8ed12b1e1d3145a32dfd7c351f8ffa9d7b19cfd59eb2776deee136dc05e7cf0167e50e77b26b1698f6ebca9f1107ad9874c13f3b13fef93ec7d3d5f7556a6
7
- data.tar.gz: '09e87150351d60b41a898afaf14f028ab685726a50a929168868cd400636f6439ef927d92722bc07ad234e100cfb2b41e5a5129f07fcb84c18d33744ccf0140d'
6
+ metadata.gz: befca1d520b6e38edde324a89a5ed7e2e45df37a08037c2ea466703e558d3a88c4401878c33e3021b38408ea5567616c5d67cc5ebeaac60eeaff289b29b6954c
7
+ data.tar.gz: c03ff827ea515229c96f4380a3aea14e5989060ffa1bf9c8146149135475040591179aad9444aee343bb81903a0f119dba9b5302589dde5dded132865c981654
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v0.2.4 - 2020-04-07
4
+
5
+ - Add `Teamtailor::Location` and `Client#locations`
6
+ - Add `Teamtailor::Department` and `Client#departments`
7
+ - Add `Teamtailor::RejectReason` and `Client#reject_reasons`
8
+ - Add `Teamtailor::Stage` and `Client#stages` for fetching it (`2179b1`)
9
+
3
10
  ## v0.2.3 - 2020-04-06
4
11
 
5
12
  - Add `Teamtailor::Company` and `Client#company` for fetching it (`05dde0`)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- teamtailor (0.2.3)
4
+ teamtailor (0.2.4)
5
5
  typhoeus (~> 1.3.1)
6
6
 
7
7
  GEM
@@ -78,6 +78,62 @@ module Teamtailor
78
78
  ).call
79
79
  end
80
80
 
81
+ def stages(page: 1, include: [])
82
+ Teamtailor::Request.new(
83
+ base_url: base_url,
84
+ api_token: api_token,
85
+ api_version: api_version,
86
+ path: '/v1/stages',
87
+ params: {
88
+ 'page[number]' => page,
89
+ 'page[size]' => 30,
90
+ 'include' => include.join(',')
91
+ }
92
+ ).call
93
+ end
94
+
95
+ def reject_reasons(page: 1, include: [])
96
+ Teamtailor::Request.new(
97
+ base_url: base_url,
98
+ api_token: api_token,
99
+ api_version: api_version,
100
+ path: '/v1/reject-reasons',
101
+ params: {
102
+ 'page[number]' => page,
103
+ 'page[size]' => 30,
104
+ 'include' => include.join(',')
105
+ }
106
+ ).call
107
+ end
108
+
109
+ def departments(page: 1, include: [])
110
+ Teamtailor::Request.new(
111
+ base_url: base_url,
112
+ api_token: api_token,
113
+ api_version: api_version,
114
+ path: '/v1/departments',
115
+ params: {
116
+ 'page[number]' => page,
117
+ 'page[size]' => 30,
118
+ 'include' => include.join(',')
119
+ }
120
+ ).call
121
+ end
122
+
123
+ def locations(page: 1, include: [])
124
+ Teamtailor::Request.new(
125
+ base_url: base_url,
126
+ api_token: api_token,
127
+ api_version: api_version,
128
+ path: '/v1/locations',
129
+ params: {
130
+ 'page[number]' => page,
131
+ 'page[size]' => 30,
132
+ 'include' => include.join(',')
133
+ }
134
+ ).call
135
+ end
136
+
81
137
  private
82
138
 
83
139
  attr_reader :base_url, :api_token, :api_version
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'teamtailor/record'
4
+
5
+ module Teamtailor
6
+ class Department < Record
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'teamtailor/record'
4
+
5
+ module Teamtailor
6
+ class Location < Record
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'teamtailor/record'
4
+
5
+ module Teamtailor
6
+ class RejectReason < Record
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'teamtailor/record'
4
+
5
+ module Teamtailor
6
+ class Stage < Record
7
+ end
8
+ end
@@ -5,6 +5,10 @@ require 'teamtailor/parser/job'
5
5
  require 'teamtailor/parser/user'
6
6
  require 'teamtailor/parser/job_application'
7
7
  require 'teamtailor/parser/company'
8
+ require 'teamtailor/parser/stage'
9
+ require 'teamtailor/parser/reject_reason'
10
+ require 'teamtailor/parser/department'
11
+ require 'teamtailor/parser/location'
8
12
 
9
13
  module Teamtailor
10
14
  class Parser
@@ -20,6 +24,10 @@ module Teamtailor
20
24
  when 'users' then Teamtailor::User.new(record, included)
21
25
  when 'job-applications' then Teamtailor::JobApplication.new(record, included)
22
26
  when 'companies' then Teamtailor::Company.new(record, included)
27
+ when 'stages' then Teamtailor::Stage.new(record, included)
28
+ when 'reject-reasons' then Teamtailor::RejectReason.new(record, included)
29
+ when 'departments' then Teamtailor::Department.new(record, included)
30
+ when 'locations' then Teamtailor::Location.new(record, included)
23
31
 
24
32
  else
25
33
  raise Teamtailor::UnknownResponseTypeError, record&.dig('type')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teamtailor
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamtailor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Ligné
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-06 00:00:00.000000000 Z
11
+ date: 2020-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -63,8 +63,12 @@ files:
63
63
  - lib/teamtailor/parser.rb
64
64
  - lib/teamtailor/parser/candidate.rb
65
65
  - lib/teamtailor/parser/company.rb
66
+ - lib/teamtailor/parser/department.rb
66
67
  - lib/teamtailor/parser/job.rb
67
68
  - lib/teamtailor/parser/job_application.rb
69
+ - lib/teamtailor/parser/location.rb
70
+ - lib/teamtailor/parser/reject_reason.rb
71
+ - lib/teamtailor/parser/stage.rb
68
72
  - lib/teamtailor/parser/user.rb
69
73
  - lib/teamtailor/record.rb
70
74
  - lib/teamtailor/relationship.rb