teamtailor 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d95d0a6e7de8bb4c59685b5eb62f3c17a3d12a85b5f26dc9604da58c71ba4943
4
- data.tar.gz: c98e3cdef79a200769756818ba0e6513a7f260c8c8f91677773cd05951b1b995
3
+ metadata.gz: 74c5cb659e84f93b8c47e5091af20aa1c0bdd38a7a094c49cf6772a25d247239
4
+ data.tar.gz: 2edf3529493889a37d13650b535aae07a4cfbafd8f22b4e457855920dc81d7a2
5
5
  SHA512:
6
- metadata.gz: 71caa179004d33e18cd4cbae5a0877e1bb8fe37b8f6b4e45f23c69692d7037188b29c42346deb0cc654d54f27aac4a97cd49d6d83af8d8af3a75b4d75e9ffd96
7
- data.tar.gz: ff55550860c52977f6a039a771eb0df325366f15cb0cd847f73a03ed448dee184dffccbd56d1f123eea390d33949a637a543c0ca4b8f3fad930107606c3ccbf1
6
+ metadata.gz: 664c269e510d5ba10594131659c7addc82bbdb77adfca161435d1e697ecfb1ebcf04da8dc148ac48e7e1a67d995d9cbd929d061cac84108996b81b43c0a9e273
7
+ data.tar.gz: 225c215f00aac545b2c9f815a14e6b2f9f0a0442b51d178aa6b47f27c895f5a9fecbde09aae55ca232474bee8971fac946659b60b71f0547d70bb608ae6c75ce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v0.2.6 - 2020-05-18
4
+
5
+ - Add `Teamtailor::PartnerResult` and `Client#partner_results`
6
+ - Add `Teamtailor::Referral` and `Client#referrals`
7
+ - Add `Teamtailor::CustomField` and `Teamtailor::CustomFieldValue`
8
+ - Add `Client#custom_fields` and `Client#custom_field_values`
9
+
3
10
  ## v0.2.5 - 2020-05-15
4
11
 
5
12
  - Add `filters:` as an argument to `Client#jobs`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- teamtailor (0.2.5)
4
+ teamtailor (0.2.6)
5
5
  typhoeus (~> 1.3.1)
6
6
 
7
7
  GEM
@@ -138,6 +138,62 @@ module Teamtailor
138
138
  ).call
139
139
  end
140
140
 
141
+ def custom_fields(page: 1, include: [])
142
+ Teamtailor::Request.new(
143
+ base_url: base_url,
144
+ api_token: api_token,
145
+ api_version: api_version,
146
+ path: '/v1/custom-fields',
147
+ params: {
148
+ 'page[number]' => page,
149
+ 'page[size]' => 30,
150
+ 'include' => include.join(',')
151
+ }
152
+ ).call
153
+ end
154
+
155
+ def custom_field_values(page: 1, include: [])
156
+ Teamtailor::Request.new(
157
+ base_url: base_url,
158
+ api_token: api_token,
159
+ api_version: api_version,
160
+ path: '/v1/custom-field-values',
161
+ params: {
162
+ 'page[number]' => page,
163
+ 'page[size]' => 30,
164
+ 'include' => include.join(',')
165
+ }
166
+ ).call
167
+ end
168
+
169
+ def referrals(page: 1, include: [])
170
+ Teamtailor::Request.new(
171
+ base_url: base_url,
172
+ api_token: api_token,
173
+ api_version: api_version,
174
+ path: '/v1/referrals',
175
+ params: {
176
+ 'page[number]' => page,
177
+ 'page[size]' => 30,
178
+ 'include' => include.join(',')
179
+ }
180
+ ).call
181
+ end
182
+
183
+ def partner_results(page: 1, include: [])
184
+ Teamtailor::Request.new(
185
+ base_url: base_url,
186
+ api_token: api_token,
187
+ api_version: api_version,
188
+ path: '/v1/partner-results',
189
+ params: {
190
+ 'page[number]' => page,
191
+ 'page[size]' => 30,
192
+ 'include' => include.join(',')
193
+ }
194
+ ).call
195
+ end
196
+
141
197
  private
142
198
 
143
199
  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 CustomField < 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 CustomFieldValue < Record
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'teamtailor/record'
4
+
5
+ module Teamtailor
6
+ class PartnerResult < Record
7
+ def id
8
+ data.dig('id')
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'teamtailor/record'
4
+
5
+ module Teamtailor
6
+ class Referral < Record
7
+ end
8
+ end
@@ -9,6 +9,10 @@ require 'teamtailor/parser/stage'
9
9
  require 'teamtailor/parser/reject_reason'
10
10
  require 'teamtailor/parser/department'
11
11
  require 'teamtailor/parser/location'
12
+ require 'teamtailor/parser/custom_field'
13
+ require 'teamtailor/parser/custom_field_value'
14
+ require 'teamtailor/parser/referral'
15
+ require 'teamtailor/parser/partner_result'
12
16
 
13
17
  module Teamtailor
14
18
  class Parser
@@ -28,6 +32,10 @@ module Teamtailor
28
32
  when 'reject-reasons' then Teamtailor::RejectReason.new(record, included)
29
33
  when 'departments' then Teamtailor::Department.new(record, included)
30
34
  when 'locations' then Teamtailor::Location.new(record, included)
35
+ when 'custom-fields' then Teamtailor::CustomField.new(record, included)
36
+ when 'custom-field-values' then Teamtailor::CustomFieldValue.new(record, included)
37
+ when 'referrals' then Teamtailor::Referral.new(record, included)
38
+ when 'partner-results' then Teamtailor::PartnerResult.new(record, included)
31
39
 
32
40
  else
33
41
  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.5'
4
+ VERSION = '0.2.6'
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.5
4
+ version: 0.2.6
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-05-15 00:00:00.000000000 Z
11
+ date: 2020-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -63,10 +63,14 @@ 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/custom_field.rb
67
+ - lib/teamtailor/parser/custom_field_value.rb
66
68
  - lib/teamtailor/parser/department.rb
67
69
  - lib/teamtailor/parser/job.rb
68
70
  - lib/teamtailor/parser/job_application.rb
69
71
  - lib/teamtailor/parser/location.rb
72
+ - lib/teamtailor/parser/partner_result.rb
73
+ - lib/teamtailor/parser/referral.rb
70
74
  - lib/teamtailor/parser/reject_reason.rb
71
75
  - lib/teamtailor/parser/stage.rb
72
76
  - lib/teamtailor/parser/user.rb