PHP code example of ippey / gh-random-contributor

1. Go to this page and download the library: Download ippey/gh-random-contributor 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/ */

    

ippey / gh-random-contributor example snippets




ppey\GhRandomContributor\GhRandomContributor;
use Ippey\GhRandomContributor\GhRandomContributorFetchException;

$fetcher = GhRandomContributor::createFetcher();
try {
    $contributor = $fetcher->get('your-organization', 'your-repository');
} catch (GhRandomContributorFetchException $e) {
    // do something.
}