Connect to github and fetch user / repository data. It's easy and fast!
- PHP 7
- GuzzleHTTP
- Composer
Install with composer, run:
composer require saiik/github-api-wrapper
Visit Github settings to get a github access token.
Connect to github
require_once 'vendor/autoload.php';
$token = 'YOUR_GITHUB_TOKEN';
$github = new \saiik\Github($token);
Get all user repositories
$repos = $github->getRepos();
Get a specify repository
// you need to have access to the repository
$repo = $github->getRepo('REPO_OWNER', 'REPO_NAME');
Get all commits from a repository
$repo = $github->getRepo('saiik', 'dodu');
$commits = $github->getCommits($repo);
See? It's pretty easy and not overloaded.
View the full documentation in the wiki.
GNU GPLv3