-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for postings (#18)
- Loading branch information
1 parent
a182e30
commit 7204cd8
Showing
13 changed files
with
351 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
module SmartRecruiters | ||
class Department < Object | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
module SmartRecruiters | ||
class Posting < Object | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
module SmartRecruiters | ||
class PostingsResource < Resource | ||
COMPANY_API = 'v1/companies' | ||
|
||
def list(company_id:, **params) | ||
response = get_request("#{COMPANY_API}/#{company_id}/postings", params: params) | ||
Collection.from_response(response, type: Posting) | ||
end | ||
|
||
def list_departments(company_id:, **params) | ||
response = get_request("#{COMPANY_API}/#{company_id}/departments", params: params) | ||
Collection.from_response(response, type: Department) | ||
end | ||
|
||
def retrieve_posting(company_id:, posting_id:, **params) | ||
Posting.new get_request("#{COMPANY_API}/#{company_id}/postings/#{posting_id}", params: params).body | ||
end | ||
|
||
def create_candidate(posting_id:, **attributes) | ||
Object.new post_request("postings/#{posting_id}/candidates", body: attributes).body | ||
end | ||
|
||
def retrieve_candidate_status(posting_id:, candidate_id:) | ||
Object.new get_request("postings/#{posting_id}/candidates/#{candidate_id}/status").body | ||
end | ||
|
||
def retrieve_configuration(posting_id:) | ||
Object.new get_request("postings/#{posting_id}/configuration").body | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": "14b68c0a-de64-4638-b6d7-189a126a0891", | ||
"createdOn": "string", | ||
"candidatePortalUrl": "string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"totalFound": 0, | ||
"limit": 0, | ||
"offset": 0, | ||
"content": [ | ||
{ | ||
"id": "string", | ||
"uuid": "string", | ||
"name": "string", | ||
"refNumber": "string", | ||
"company": { | ||
"identifier": "string", | ||
"name": "string" | ||
}, | ||
"releasedDate": "2021-10-24T20:11:07.457Z", | ||
"location": { | ||
"country": "string", | ||
"region": "string", | ||
"city": "string", | ||
"remote": true | ||
}, | ||
"industry": { | ||
"id": "string", | ||
"label": "string" | ||
}, | ||
"department": { | ||
"id": "string", | ||
"label": "string", | ||
"description": "string" | ||
}, | ||
"function": { | ||
"id": "string", | ||
"label": "string" | ||
}, | ||
"typeOfEmployment": { | ||
"id": "string", | ||
"label": "string" | ||
}, | ||
"experienceLevel": { | ||
"id": "associate", | ||
"name": "string" | ||
}, | ||
"customField": [ | ||
{ | ||
"fieldId": "string", | ||
"fieldLabel": "string", | ||
"valueId": "string", | ||
"valueLabel": "string" | ||
} | ||
], | ||
"ref": "string", | ||
"creator": { | ||
"name": "string" | ||
}, | ||
"language": { | ||
"code": "string", | ||
"label": "string", | ||
"labelNative": "string" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"totalFound": 0, | ||
"content": [ | ||
{ | ||
"id": "string", | ||
"label": "Product", | ||
"description": "Product" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"status": "NEW" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"questions": [ | ||
{ | ||
"id": "string", | ||
"label": "string", | ||
"repeatable": true, | ||
"fields": [ | ||
{ | ||
"id": "string", | ||
"label": "string", | ||
"type": "INPUT_TEXT", | ||
"required": true, | ||
"complianceType": "DIVERSITY", | ||
"values": [ | ||
{ | ||
"id": "string", | ||
"label": "string" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"settings": { | ||
"avatarUploadAvailable": true | ||
}, | ||
"privacyPolicies": [ | ||
{ | ||
"url": "string", | ||
"orgName": "string" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"id": "string", | ||
"uuid": "string", | ||
"name": "string", | ||
"jobAdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | ||
"applyUrl": "string", | ||
"postingUrl": "string", | ||
"referralUrl": "string", | ||
"refNumber": "string", | ||
"company": { | ||
"identifier": "string", | ||
"name": "string" | ||
}, | ||
"releasedDate": "2021-10-24T19:57:22.832Z", | ||
"location": { | ||
"country": "string", | ||
"region": "string", | ||
"city": "string", | ||
"remote": true | ||
}, | ||
"industry": { | ||
"id": "string", | ||
"label": "string" | ||
}, | ||
"department": { | ||
"id": "string", | ||
"label": "string", | ||
"description": "string" | ||
}, | ||
"function": { | ||
"id": "string", | ||
"label": "string" | ||
}, | ||
"typeOfEmployment": { | ||
"id": "string", | ||
"label": "string" | ||
}, | ||
"experienceLevel": { | ||
"id": "associate", | ||
"name": "string" | ||
}, | ||
"customField": [ | ||
{ | ||
"fieldId": "string", | ||
"fieldLabel": "string", | ||
"valueId": "string", | ||
"valueLabel": "string" | ||
} | ||
], | ||
"ref": "string", | ||
"creator": { | ||
"name": "string" | ||
}, | ||
"jobAd": { | ||
"sections": { | ||
"companyDescription": { | ||
"title": "string", | ||
"text": "string" | ||
}, | ||
"jobDescription": { | ||
"title": "string", | ||
"text": "string" | ||
}, | ||
"qualifications": { | ||
"title": "string", | ||
"text": "string" | ||
}, | ||
"additionalInformation": { | ||
"title": "string", | ||
"text": "string" | ||
}, | ||
"videos": { | ||
"title": "string", | ||
"urls": [ | ||
"string" | ||
] | ||
} | ||
} | ||
}, | ||
"active": true | ||
} |
Oops, something went wrong.