PHP code example of gitee-php / gitee-enterprise-sdk
1. Go to this page and download the library: Download gitee-php/gitee-enterprise-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gitee-php / gitee-enterprise-sdk example snippets
Instance = new GiteeEnterprise\Api\AdminLogsStatisticApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$enterpriseId = 56; // int | 企业id (https://gitee.com/api/v8/swagger#/getList 的返回值的 id)
$accessToken = "accessToken_example"; // string | 用户授权码
$member = "member_example"; // string | 成员username
$startDate = "startDate_example"; // string | 查询的起始时间。(格式:yyyy-mm-dd)
$endDate = "endDate_example"; // string | 查询的结束时间。(格式:yyyy-mm-dd)
$page = 1; // int | 当前的页码
$perPage = 56; // int | 每页的数量,最大为 100
try {
$result = $apiInstance->getEnterpriseIdLogStatisticsDeployKeyLogs($enterpriseId, $accessToken, $member, $startDate, $endDate, $page, $perPage);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminLogsStatisticApi->getEnterpriseIdLogStatisticsDeployKeyLogs: ', $e->getMessage(), PHP_EOL;
}