PHP code example of duncan3dc / github
1. Go to this page and download the library: Download duncan3dc/github 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/ */
duncan3dc / github example snippets
use duncan3dc\GitHub\Api;
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");