smartrecruiters 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +11 -0
- data/lib/smartrecruiters/client.rb +4 -0
- data/lib/smartrecruiters/objects/department.rb +6 -0
- data/lib/smartrecruiters/objects/posting.rb +6 -0
- data/lib/smartrecruiters/resources/postings.rb +33 -0
- data/lib/smartrecruiters/version.rb +1 -1
- data/lib/smartrecruiters.rb +6 -3
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7c7ea65e6b64c29e219384b097e691e545b5e43c62ee2b93b1c0532b454363a
|
4
|
+
data.tar.gz: b02ebdd8957fba28c18915c8539101f7e9d508c4d1664f133e60cfc8687097f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cf79cd820e91342100b5521f9565bf83db1250d059551ed46e7f71712b8af2c5ace6515c79218971f53cb51bbfda35522806fa21d40267ba9d620a4fac719fb
|
7
|
+
data.tar.gz: 2efc9ee7e6a1e2b054b1d27a204bbd229c5c93d4ac4a169064e430df2e36223775b84bee6afe4ae6ff796d19f20e40f4982602cec1500128b9ef81779e6dac84
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.3.0](https://www.github.com/davejcameron/smartrecruiters/compare/v0.2.2...v0.3.0) (2021-10-30)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* Add support for postings ([#18](https://www.github.com/davejcameron/smartrecruiters/issues/18)) ([7204cd8](https://www.github.com/davejcameron/smartrecruiters/commit/7204cd82fc681eb737f369d7391b9639df4808a0))
|
9
|
+
|
3
10
|
### [0.2.2](https://www.github.com/davejcameron/smartrecruiters/compare/v0.2.1...v0.2.2) (2021-10-17)
|
4
11
|
|
5
12
|
|
data/README.md
CHANGED
@@ -90,6 +90,17 @@ client.offers.retrieve(offer_id: "id", candidate_id: "id", job_id: "id")
|
|
90
90
|
client.offers.retrieve_offers(candidate_id: "id", job_id: "id")
|
91
91
|
```
|
92
92
|
|
93
|
+
### Postings
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
client.postings.list(company_id:)
|
97
|
+
client.postings.list_departments(company_id:)
|
98
|
+
client.postings.retrieve(company_id:, posting_id:)
|
99
|
+
client.postings.create_candidate(posting_id:, {})
|
100
|
+
client.postings.retrieve_candidate_status(posting_id:, candidate_id:)
|
101
|
+
client.postings.retrieve_configuration(posting_id:)
|
102
|
+
```
|
103
|
+
|
93
104
|
### Reports
|
94
105
|
|
95
106
|
```ruby
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SmartRecruiters
|
4
|
+
class PostingsResource < Resource
|
5
|
+
COMPANY_API = 'v1/companies'
|
6
|
+
|
7
|
+
def list(company_id:, **params)
|
8
|
+
response = get_request("#{COMPANY_API}/#{company_id}/postings", params: params)
|
9
|
+
Collection.from_response(response, type: Posting)
|
10
|
+
end
|
11
|
+
|
12
|
+
def list_departments(company_id:, **params)
|
13
|
+
response = get_request("#{COMPANY_API}/#{company_id}/departments", params: params)
|
14
|
+
Collection.from_response(response, type: Department)
|
15
|
+
end
|
16
|
+
|
17
|
+
def retrieve_posting(company_id:, posting_id:, **params)
|
18
|
+
Posting.new get_request("#{COMPANY_API}/#{company_id}/postings/#{posting_id}", params: params).body
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_candidate(posting_id:, **attributes)
|
22
|
+
Object.new post_request("postings/#{posting_id}/candidates", body: attributes).body
|
23
|
+
end
|
24
|
+
|
25
|
+
def retrieve_candidate_status(posting_id:, candidate_id:)
|
26
|
+
Object.new get_request("postings/#{posting_id}/candidates/#{candidate_id}/status").body
|
27
|
+
end
|
28
|
+
|
29
|
+
def retrieve_configuration(posting_id:)
|
30
|
+
Object.new get_request("postings/#{posting_id}/configuration").body
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/smartrecruiters.rb
CHANGED
@@ -13,25 +13,28 @@ module SmartRecruiters
|
|
13
13
|
autoload :Attachment, 'smartrecruiters/objects/attachment'
|
14
14
|
autoload :CallbacksLog, 'smartrecruiters/objects/callbacks_log'
|
15
15
|
autoload :Candidate, 'smartrecruiters/objects/candidate'
|
16
|
+
autoload :Department, 'smartrecruiters/objects/department'
|
16
17
|
autoload :Interview, 'smartrecruiters/objects/interview'
|
17
18
|
autoload :Job, 'smartrecruiters/objects/job'
|
18
19
|
autoload :Offer, 'smartrecruiters/objects/offer'
|
19
|
-
autoload :
|
20
|
+
autoload :Posting, 'smartrecruiters/objects/posting'
|
20
21
|
autoload :Report, 'smartrecruiters/objects/report'
|
21
22
|
autoload :ReportFile, 'smartrecruiters/objects/report_file'
|
22
23
|
autoload :Review, 'smartrecruiters/objects/review'
|
23
24
|
autoload :SystemRole, 'smartrecruiters/objects/system_role'
|
25
|
+
autoload :User, 'smartrecruiters/objects/user'
|
24
26
|
autoload :Webhook, 'smartrecruiters/objects/webhook'
|
25
27
|
|
26
28
|
autoload :AccessGroupsResource, 'smartrecruiters/resources/access_groups'
|
27
29
|
autoload :CandidatesResource, 'smartrecruiters/resources/candidates'
|
28
30
|
autoload :InterviewsResource, 'smartrecruiters/resources/interviews'
|
29
31
|
autoload :InterviewTypesResource, 'smartrecruiters/resources/interview_types'
|
30
|
-
autoload :OffersResource, 'smartrecruiters/resources/offers'
|
31
32
|
autoload :JobsResource, 'smartrecruiters/resources/jobs'
|
32
|
-
autoload :
|
33
|
+
autoload :OffersResource, 'smartrecruiters/resources/offers'
|
34
|
+
autoload :PostingsResource, 'smartrecruiters/resources/postings'
|
33
35
|
autoload :ReportsResource, 'smartrecruiters/resources/reports'
|
34
36
|
autoload :ReviewsResource, 'smartrecruiters/resources/reviews'
|
35
37
|
autoload :SystemRolesResource, 'smartrecruiters/resources/system_roles'
|
38
|
+
autoload :UsersResource, 'smartrecruiters/resources/users'
|
36
39
|
autoload :WebhooksResource, 'smartrecruiters/resources/webhooks'
|
37
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartrecruiters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cameron
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,9 +108,11 @@ files:
|
|
108
108
|
- lib/smartrecruiters/objects/attachment.rb
|
109
109
|
- lib/smartrecruiters/objects/callbacks_log.rb
|
110
110
|
- lib/smartrecruiters/objects/candidate.rb
|
111
|
+
- lib/smartrecruiters/objects/department.rb
|
111
112
|
- lib/smartrecruiters/objects/interview.rb
|
112
113
|
- lib/smartrecruiters/objects/job.rb
|
113
114
|
- lib/smartrecruiters/objects/offer.rb
|
115
|
+
- lib/smartrecruiters/objects/posting.rb
|
114
116
|
- lib/smartrecruiters/objects/report.rb
|
115
117
|
- lib/smartrecruiters/objects/report_file.rb
|
116
118
|
- lib/smartrecruiters/objects/review.rb
|
@@ -124,6 +126,7 @@ files:
|
|
124
126
|
- lib/smartrecruiters/resources/interviews.rb
|
125
127
|
- lib/smartrecruiters/resources/jobs.rb
|
126
128
|
- lib/smartrecruiters/resources/offers.rb
|
129
|
+
- lib/smartrecruiters/resources/postings.rb
|
127
130
|
- lib/smartrecruiters/resources/reports.rb
|
128
131
|
- lib/smartrecruiters/resources/reviews.rb
|
129
132
|
- lib/smartrecruiters/resources/system_roles.rb
|