ippey / gh-random-contributor
This is a library for getting random GitHub contributors.
0.1.1
2021-07-06 08:34 UTC
Requires
- php: >=7.4
- symfony/http-client: ^5.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^0.12.91
- phpunit/phpunit: ^9.5
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