1. Go to this page and download the library: Download taleo/lib library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
taleo / lib example snippets
Taleo\Main\Taleo as Taleo;
$user = '******';
$password = '******';
$company = '******';
/**
* Create the Taleo object with a valid user, password and company code.
*/
$taleo = new Taleo($user, $password, $company);
// See the Monolog documentation to check which levels are available.
// By default, Taleo PHP Library doesn't log anything (log level set to ALERT)
// except ALERT, triggered by errors.
// If you change this to DEBUG, it will log almost everything.
// By default, the logfile is in the default PHP temporary directory,
// Under the name of "Taleo.log"
// You can use a second parameter to define the file to use.
// You can also use 'php://stdout' to debug quickly.
// Do not forget to disable the DEBUG level when in Production !
/**
* Optional: Set the log configuration.
* To update the settings, you just have to call the method with
* updated parameters.
*
* @param int $level Logger level.
* \Monolog\Logger::DEBUG
* \Monolog\Logger::INFO
* \Monolog\Logger::WARNING
* \Monolog\Logger::ERROR
* \Monolog\Logger::CRITICAL
* \Monolog\Logger::ALERT
* @param string $file Optional file.
* This can be a file or 'php://stdout'.
*
*/
$taleo->setLogConfig(\Monolog\Logger::DEBUG, 'php://stdout');
/**
* Mandatory: Run the login procedure.
*/
$taleo->login();
/**
* Optional: Update the logging configuration
*/
$taleo->setLogConfig(\Monolog\Logger::DEBUG, 'php://stdout');
/**
* Requisitions
*/
/*
$response = $taleo->get('object/requisition/search', array('status' => 'open', 'cws' => 1))->json();
$response = $taleo->get('object/requisition/1189')->json();
*/
/**
* Create a candidate
*/
/*
$response = $taleo->post(
'object/candidate',
array(
'candidate' =>
array(
'city' => 'Toontown',
'country' => 'Be',
'resumeText' => 'This is just a test using new TALEO API.',
'email' => '[email protected]',
'firstName' => 'Polo',
'lastName' => "Dell'Aiera",
'status' => 2,
'middleInitial' => 'P',
'cellPhone' => '0123456789',
)
)
);
*/
/**
* Search a candidate
*/
/*
$response = $taleo->get('object/candidate/search', array('email' => '[email protected]'))->json();
$candid = $response['response']['searchResults'][0]['candidate']['candId'];
*/
/**
* Update a candidate
*/
/*
$response = $taleo->put(
'object/candidate/'.$candid,
array(
'candidate' =>
array(
'firstName' => 'Pol',
)
)
);
*/
/**
* Delete a candidate
*/
/*
$response = $taleo->delete(
'object/candidate/' . $candid
);
*/
/**
* Various
*/
//$response = $taleo->get('object/info');
/**
* Optional: run the logout procedure
*/
//$taleo->logout();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.