uicosss/aits_term_query
最新稳定版本:0.0.2
Composer 安装命令:
composer require uicosss/aits_term_query
包简介
PHP Wrapper API for the AITS Term Query API
README 文档
README
AITS - Term Query
PHP library for using the AITS Term Query API. Contact AITS for additional implementation details.
Usage
To use the library, you need to:
Include library in your program
require_once 'TermQuery.php';
or use composer
composer require uicosss/aits_term_query
require_once 'vendor/autoload.php';
Instantiate an object of the class
$apiUrl = 'apiurl.com/without/trailing/slash'; // Contact AITS for this
$subscriptionKey = 'YOUR_SUBSCRIPTION_KEY'; // Contact AITS for this
$personApi = new uicosss\TermQuery($apiUrl, $subscriptionKey);
Getting Results from an API call
The default response will be JSON, but you can also request the raw data which will be an object of StdClass. Contact AITS for additional details on API schema.
Required:
$campus = 'uic'; // One of 'uic', 'uis', 'uiuc')
Optional:
$term = 'nextYear'; // Banner Term or term period ('current', 'nextYear', 'pastYear'). Default is `current`
$termApi->findTerm($campus, $term); // Conduct the term query
echo $termApi->getResponse(true); // See raw JSON response
$json = $termApi->getResponse(); // Get decoded JSON array
Examples:
You can use the attached examples/cli-test.php file from the command line to test functionality.
php cli-test.php apiurl.com/without/trailing/slash YOUR_SUBSCRIPTION_KEY campus
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-27