Skip to content

Commit

Permalink
Update to last API version 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineLemaire committed Sep 27, 2021
1 parent 0373ed9 commit 81a1d9a
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Taleez-PHP

API documentation : https://api.taleez.com/swagger-ui.html
Last API version: 0.1.0
Last API version: 0.4.0

## Installation

Expand Down
16 changes: 14 additions & 2 deletions src/Endpoint/Candidates.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,22 @@ public function get($candidateId)
public function associateJobs($candidateId, array $jobs)
{
return $this->client->post(sprintf(self::BASE_ENDPOINT.'/%s/jobs', $candidateId), [
'idListDTO' => $jobs,
'ids' => $jobs,
]);
}

/**
* Get candidate pool list.
*
* @throws GuzzleException
*
* @return mixed
*/
public function getPoolList($candidateId)
{
return $this->client->get(sprintf(self::BASE_ENDPOINT.'/%s/pools', $candidateId));
}

/**
* Add candidate to pools.
*
Expand All @@ -98,7 +110,7 @@ public function associateJobs($candidateId, array $jobs)
public function associatPools($candidateId, array $pools)
{
return $this->client->post(sprintf(self::BASE_ENDPOINT.'/%s/pools', $candidateId), [
'idListDTO' => $pools,
'ids' => $pools,
]);
}

Expand Down
14 changes: 14 additions & 0 deletions src/Endpoint/Documents.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,18 @@ public function add($candidateId, $file, $cv = false)
'cv' => $cv,
]);
}

/**
* Upload a temporary document.
*
* @throws GuzzleException
*
* @return mixed
*/
public function uploadTmpDoc($file)
{
return $this->client->post(self::BASE_ENDPOINT.'/tmp', [
'file' => $file,
]);
}
}
30 changes: 30 additions & 0 deletions src/Endpoint/Jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,36 @@ public function getDetails($jobId)
return $this->client->get(self::BASE_ENDPOINT.'/'.$jobId);
}

/**
* Create an application for a job.
*
* @var array $application
*
* @throws GuzzleException
*
* @return mixed
*/
public function createApplication($jobId, $application)
{
return $this->client->post(self::BASE_ENDPOINT.'/'.$jobId.'/applications', $application);
}

/**
* Add candidates to a job.
*
* @var array $candidatesIds
*
* @throws GuzzleException
*
* @return mixed
*/
public function addCandidates($jobId, $candidatesIds)
{
return $this->client->post(self::BASE_ENDPOINT.'/'.$jobId.'/candidates', [
'ids' => $candidatesIds
]);
}

/**
* Get questions of a job.
*
Expand Down

0 comments on commit 81a1d9a

Please sign in to comment.