PHP code example of dmyers / octogun

1. Go to this page and download the library: Download dmyers/octogun 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/ */

    

dmyers / octogun example snippets


$client = \Octogun\Octogun::users();
$client->user('sferik');

$client = \Octogun\Octogun::repositories();
$client->repo('octogun/octogun.rb');

$client = new \Octogun\Client(['login' => 'me', 'password' => 'sekret']);
$client->users()->follow('sferik');

$client = new \Octogun\Client(['login' => 'me', 'oauth_token' => 'oauth2token']);
$client->users()->follow('sferik');

$client = new \Octogun\Client(['login' => 'USERNAME', 'password' => 'PASSWORD']);
$client->configuration()->set('api_endpoint', 'https://github.company.com/api/v3';
$client->configuration()->set('web_endpoint', 'https://github.company.com/';