Simple wrapper for the GitHub v3 API

v0.0.5 2017-08-09 16:12 UTC


Simple PHP wrapper for the GitHub API. This is an unofficial port of Octokit.rb in PHP. The goal is to have feature parity between languages.


Simply add the following to your composer.json require block:



Show a user

$client = \Octogun\Octogun::users();

Show a repository

$client = \Octogun\Octogun::repositories();

Authenticated Requests

For methods that require authentication, you'll need to setup a client with your login and password.

$client = new \Octogun\Client(array('login' => 'me', 'password' => 'sekret'));

Alternately, you can authenticate with a GitHub OAuth2 token.

$client = new \Octogun\Client(array('login' => 'me', 'oauth_token' => 'oauth2token'));

Using with GitHub Enterprise

To use with GitHub Enterprise, you'll need to set the API and web endpoints before instantiating a client.

$client = new \Octogun\Client(array('login' => 'USERNAME', 'password' => 'PASSWORD'));
$client->configuration()->set('api_endpoint', '';
$client->configuration()->set('web_endpoint', '';


Copyright (c) 2013 Derek Myers. See [LICENSE][] for details. [license]: