arifseft / zoho-recruit-api
Zoho Recruit API
v1.1.1
2020-07-18 08:54 UTC
Requires
- php: ~5.5 || >=7.0
- 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-18 17:58:12 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 许可。 查看完整的许可协议。