drteam/pcrecruiter

用于操作PCRecruiter RESTful API的PHP库

1.2.2.1 2017-10-29 14:36 UTC

This package is auto-updated.

Last update: 2024-08-29 04:19:54 UTC


README

PCRecruiter PHP API Logo

PCRecruiter PHP

Latest Stable Version Build Status Total Downloads License PHP 7 ready

用于操作PCRecruiter RESTful API的PHP库

composer require drteam/pcrecruiter

示例

获取PCR操作所需的AccessToken

// Enable autoload
require_once __DIR__ . "/vendor/autoload.php";

// Create the Token object
$pcr_token = new PCRecruiter\Token();
$pcr_token->setConfig(__DIR__ . "/pcr.php");

// Get the token
$token = $pcr_token->get()['message']->SessionId;

// Return the json
header('Content-Type: application/json');
echo json_encode($token);

从PCR获取所有职位(岗位)

// Enable autoload
require_once __DIR__ . "/vendor/autoload.php";

// Get the token
$pcr_token = new PCRecruiter\Token();
$pcr_token->setConfig(__DIR__ . "/pcr.php");

// Get the token
$token = $pcr_token->get()['message']->SessionId;

// Get all positions
$pcr_positions = new PCRecruiter\Positions($token);
$positions = $positions->get()['message']->Results;

// Return the json
header('Content-Type: application/json');
echo json_encode($positions);

您可以在"示例"页面上找到其他示例。

获取帮助的地方

如果您需要关于此项目的帮助,您可以了解更多关于API方法的信息。

如果您发现了错误,请在此GitHub问题页面上报告。

关于PHP单元测试

  • Candidates.php
  • Companies.php
  • Client.php
  • Interviews.php
  • Placements.php
  • Positions.php
  • RollupLists.php
  • Token.php
  • Users.php

您可以通过从源目录执行vendor/bin/phpunit命令来手动运行测试。

开发者

灵感和一些链接

在互联网上缺乏此类项目的影响下创建 😄

  • PCRecruiter - 这家公司为招聘机构提供了许多有用的服务。
  • PCRecruiter API - 所有API调用的官方文档。
  • Guzzle - 一个可扩展的PHP HTTP客户端,我非常喜欢。