PHP code example of bestdeveloper / php-github-api
1. Go to this page and download the library: Download bestdeveloper/php-github-api 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/ */
bestdeveloper / php-github-api example snippets
// This file is generated by Composer
s = $client->api('user')->repositories('ornicar');
// This file is generated by Composer
\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
);
// Or select directly which cache you want to use
$client = new Github\HttpClient\CachedHttpClient();
$client->setCache(
// Built in one, or any cache implementing this interface:
// Github\HttpClient\Cache\CacheInterface
new Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
);
$client = new Github\Client($client);
bash
$ php composer.phar install