dpazuic/aits_enterprise_user

AITS 企业用户 API 的 PHP 包装器 API

dev-master 2018-09-27 19:30 UTC

This package is auto-updated.

Last update: 2024-09-28 09:17:23 UTC


README

用于使用 AITS 企业用户 API 的 PHP 库(有关 API 的详细信息,请联系 AITS)。

用法

要使用此库,您需要

将库包含到您的程序中

include_once(aits_enterprise_user.php');

或使用 composer composer require dpazuic\aits_enterprise_user

include_once('vendor/autoload.php');

实例化 dpazuic\aits_enterprise_user 类的对象

$netid = 'sparky'; 
$campusDomain = 'uic.edu'; // Allowed: (uic.edu|uiuc.edu|illinois.edu|uis.edu|100|200|400)
$senderAppID = 'YOUR_SENDER_APP_ID'; // Contact AITS for this
$personApi = new dpazuic\aits_enterprise_user($netid, $campusDomain, $senderAppID);

从 API 调用获取结果

默认响应将是 JSON,但您也可以请求原始数据,这将是一个 StdClass 对象。有关 API 模式的详细信息,请联系 AITS。

$personApi->findPerson(); // Conduct the person lookup
$response = $personApi->getResponse(); // See JSON response

示例

您可以使用附带的 examples/cli-test.php 文件从命令行测试功能。 php cli-test.php YOUR_SENDER_APP_ID NETID CAMPUS_DOMAIN