infinitet3ch / zoho-recruit-api
Zoho Recruit API
v1.1.1
2018-10-01 19:31 UTC
Requires
- php: ~5.5 || >=7.0 <7.2
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- fabpot/php-cs-fixer: ^1.9
- phpunit/phpunit: ^4.7
This package is auto-updated.
Last update: 2024-09-29 05:02:09 UTC
README
PHP Zoho Recruit API。
依赖
- PHP 5.5;
- guzzlehttp/guzzle:~6.0.
安装
安装过程可以通过两种方式完成,使用 packagist 或克隆此存储库。
packagist
打开终端并输入以下命令
$ composer require humantech/zoho-recruit-api
克隆
$ git clone https://github.com/humantech/zoho-recruit-api.git $ composer install
文档
此包兼容 PSR-2 和 PSR-4。
获取认证令牌
要获取认证令牌,需要创建一个名为 AuthenticationClient 的类实例,并将用户名和明文密码作为参数传递给名为 generateAuthToken 的方法,如下例所示。
<?php $authClient = new \Humantech\Zoho\Recruit\Api\Client\AuthenticationClient(); $token = $authClient->generateAuthToken('youruser@yourcompany.com', 'your-password');
调用 getRecords
根据 Zoho Recruit Api 文档中关于 getRecords 方法的说明,您可以像以下示例一样获取候选人的记录
<?php $client = new \Humantech\Zoho\Recruit\Api\Client\Client($token); $jobOpenings = $client->getRecords('JobOpenings');
更多
在 demo 文件或 PHPUnit 测试类中查看更多示例。
许可证
此包采用 MIT 许可。 查看完整许可证。