Skip to content

BundesweitDigital/Recruitee-PHP-Wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Recruitee PHP Wrapper

This PHP class provides an easy way to interact with the Recruitee API, allowing you to create candidates and set their custom fields.

Installation

Simply include the Recruitee.php file in your project.

require_once 'Recruitee.php';

Usage

Initializing the Recruitee Class

$companyId = 'your_company_id';
$token = 'your_api_token';
$recruitee = new Recruitee($companyId, $token);

Checking the Connection

if ($recruitee->checkConnection()) {
    echo "Connection successful!";
} else {
    echo "Failed to connect.";
}

Creating a Candidate

$candidateData = [
    "name" => "John Smith",
    "emails" => ["john@example.com"],
    "phones" => ["123123123"],
    "social_links" => ["https://www.facebook.com/johnexamplecom/"],
    "links" => ["https://www.example.com/"],
    "cover_letter" => "Example cover letter"
];

$candidateId = $recruitee->createCandidate($candidateData);
if ($candidateId) {
    echo "Candidate created with ID: $candidateId";
} else {
    echo "Failed to create candidate.";
}

Adding Custom Fields to a Candidate

Basic Text Fields

$recruitee->addCustomFieldToCandidate($candidateId, 'Meine fräge die i hätt', 'Das i 1 antwort');
$recruitee->addCustomFieldToCandidate($candidateId, 'Lange tekst', 'lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet', Recruitee::MULTI_LINE);

Gender Field

$recruitee->addCustomFieldToCandidate($candidateId, 'unnödeg', 'male', Recruitee::GENDER);

Boolean Fields

$recruitee->addCustomFieldToCandidate($candidateId, 'Alpha?', true, Recruitee::BOOLEAN);
$recruitee->addCustomFieldToCandidate($candidateId, 'Designer?', false, Recruitee::BOOLEAN);

Address and Salary

$recruitee->addCustomFieldToCandidate($candidateId, 'Unnödeg', 'Jägerstraße 13, 31535 Neustadt', Recruitee::ADDRESS);
$recruitee->addCustomFieldToCandidate($candidateId, 'Gehald', 10500, Recruitee::NUMBER);

Nationality

$recruitee->addCustomFieldToCandidate($candidateId, 'unnödeg', 'NL', Recruitee::NATIONALITY);

Language Skills

$recruitee->addCustomFieldToCandidate($candidateId, 'unnödeg', [
    ['language_code' => 'en', 'level' => 'advanced'],
    ['language_code' => 'de', 'level' => 'native'],
], Recruitee::LANGUAGE_SKILL);

Skills

$recruitee->addCustomFieldToCandidate($candidateId, 'unnödeg', [
    ['text' => 'SQL'],
    ['text' => 'PHP'],
    ['text' => 'HTML'],
], Recruitee::SKILLS);

Date Fields

$recruitee->addCustomFieldToCandidate($candidateId, 'unnödeg', '1988-03-07', Recruitee::DATE_OF_BIRTH);
$recruitee->addCustomFieldToCandidate($candidateId, 'Mauerfall', '1989-02-28', Recruitee::DATE);

Work Experience

$recruitee->addCustomFieldToCandidate($candidateId, 'unnödeg', [
    ['title' => 'Ausbildung ITSE', 'company' => 'Telekom', 'location' => 'Hannover', 'description' => 'Ausbildung zum IT-SE', 'startDate' => '2004-08-01', 'endDate' => '2007-07-30'],
    ['title' => 'Arbeit', 'company' => 'Telekom', 'location' => 'Wunstorf', 'description' => 'Systemelektronika', 'startDate' => '2007-08-01', 'endDate' => '2018-07-30'],
], Recruitee::EXPERIENCE);

Education

$recruitee->addCustomFieldToCandidate($candidateId, 'unnödeg', [
    ['school' => 'Compers', 'degree' => 'OP Professional', 'description' => 'Sonen Lehrgang', 'major' => 'Major?', 'startDate' => '01.08.2012', 'endDate' => '30.07.2014'],
], Recruitee::EDUCATION);

Retrieving Job Offers

$offers = $recruitee->getOffers();
print_r($offers);

License

This project is licensed under the MIT License.

About

A PHP Wrapper Class for the Recruitee Candidate Management Plattform to create Candidates and set their custom Fields

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages