ippey/gh-random-contributor

This is a library for getting random GitHub contributors.

0.1.1 2021-07-06 08:34 UTC

This package is auto-updated.

Last update: 2024-12-06 16:41:29 UTC


README

A library for getting random GitHub contributors.

Installation

composer require ippey/gh-random-contributor

How to use

<?php

require(__DIR__ . '/vendor/autoload.php');

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

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

GhRandomContributor::createFetcher() creates a fetcher. This fetcher gets a specific repository's GitHub Contributor randomly via get() method. get() method returns a GitHub contributor as Ippey\GhRandomContributor\GhContributor.

GhContributor

License

MIT