duncan3dc/github

用于与GitHub API交互的库

0.8.1 2023-04-30 13:55 UTC

This package is auto-updated.

Last update: 2024-08-30 01:11:37 UTC


README

一个用于与GitHub API交互的PHP库

完整文档可在以下网址找到:http://duncan3dc.github.io/github/
PHPDoc API文档也在这里可用:http://duncan3dc.github.io/github/api/

release build coverage

安装

推荐通过Composer安装此库。

从项目根目录运行以下命令

$ composer require duncan3dc/github

入门指南

use duncan3dc\GitHub\Api;

require __DIR__ . "/vendor/autoload.php";

# Connect to a GitHub app using the private key
$api = new Api(1014, file_get_contents("/var/safe/github.pem"));

# List all the organizations this app is installed under
foreach ($app->getOrganizations() as $organization) {
    echo $organization->getName() . "\n";
}

# Get a specific organization/user
$organization = $app->getOrganization("duncan3dc");

更多信息请参阅http://duncan3dc.github.io/github/

如何获得帮助

发现了bug?有问题?不确定某事如何操作?
请在创建一个问题,我会尽我所能帮助您。
或者您也可以在Twitter上找到我