mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-28 19:19:52 +09:00
changes
This commit is contained in:
54
vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php
vendored
Normal file
54
vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Api\Issue;
|
||||
|
||||
use Github\Api\AbstractApi;
|
||||
|
||||
/**
|
||||
* @link http://developer.github.com/v3/issues/events/
|
||||
*
|
||||
* @author Joseph Bielawski <stloyd@gmail.com>
|
||||
*/
|
||||
class Events extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* Get all events for an issue.
|
||||
*
|
||||
* @link https://developer.github.com/v3/issues/events/#list-events-for-an-issue
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $repository
|
||||
* @param int|null $issue
|
||||
* @param int $page
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function all($username, $repository, $issue = null, $page = 1)
|
||||
{
|
||||
if (null !== $issue) {
|
||||
$path = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/events';
|
||||
} else {
|
||||
$path = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/events';
|
||||
}
|
||||
|
||||
return $this->get($path, [
|
||||
'page' => $page,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display an event for an issue.
|
||||
*
|
||||
* @link https://developer.github.com/v3/issues/events/#get-a-single-event
|
||||
*
|
||||
* @param $username
|
||||
* @param $repository
|
||||
* @param $event
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function show($username, $repository, $event)
|
||||
{
|
||||
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/events/'.rawurlencode($event));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user