This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A library to interact with the GitHub API

0.6.0 2020-06-10 14:15 UTC

This package is auto-updated.

Last update: 2021-07-10 18:29:59 UTC


A PHP library to interact with the GitHub API

Full documentation is available at http://duncan3dc.github.io/github/
PHPDoc API documentation is also available at http://duncan3dc.github.io/github/api/

release build coverage


The recommended method of installing this library is via Composer.

Run the following command from your project root:

$ composer require duncan3dc/github

Getting Started

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");

Read more at http://duncan3dc.github.io/github/

Where to get help

Found a bug? Got a question? Just not sure how something works?
Please create an issue and I'll do my best to help out.
Alternatively you can catch me on Twitter