ippey/gh-random-contributor

这是一个用于获取随机GitHub贡献者的库。

0.1.1 2021-07-06 08:34 UTC

This package is auto-updated.

Last update: 2024-09-06 16:08:30 UTC


README

这是一个用于获取随机GitHub贡献者的库。

安装

composer require ippey/gh-random-contributor

如何使用

<?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()创建一个获取器。这个获取器通过get()方法随机获取特定仓库的GitHub贡献者。 get()方法返回一个GitHub贡献者,类型为Ippey\GhRandomContributor\GhContributor

GhContributor

许可协议

MIT