mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-14 20:02:40 +09:00
changes
This commit is contained in:
45
vendor/knplabs/github-api/lib/Github/Api/Project/AbstractProjectApi.php
vendored
Normal file
45
vendor/knplabs/github-api/lib/Github/Api/Project/AbstractProjectApi.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Api\Project;
|
||||
|
||||
use Github\Api\AbstractApi;
|
||||
use Github\Api\AcceptHeaderTrait;
|
||||
|
||||
abstract class AbstractProjectApi extends AbstractApi
|
||||
{
|
||||
use AcceptHeaderTrait;
|
||||
|
||||
/**
|
||||
* Configure the accept header for Early Access to the projects api.
|
||||
*
|
||||
* @see https://developer.github.com/v3/repos/projects/#projects
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function configure()
|
||||
{
|
||||
$this->acceptHeaderValue = 'application/vnd.github.inertia-preview+json';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function show($id, array $params = [])
|
||||
{
|
||||
return $this->get('/projects/'.rawurlencode($id), array_merge(['page' => 1], $params));
|
||||
}
|
||||
|
||||
public function update($id, array $params)
|
||||
{
|
||||
return $this->patch('/projects/'.rawurlencode($id), $params);
|
||||
}
|
||||
|
||||
public function deleteProject($id)
|
||||
{
|
||||
return $this->delete('/projects/'.rawurlencode($id));
|
||||
}
|
||||
|
||||
public function columns()
|
||||
{
|
||||
return new Columns($this->client);
|
||||
}
|
||||
}
|
||||
60
vendor/knplabs/github-api/lib/Github/Api/Project/Cards.php
vendored
Normal file
60
vendor/knplabs/github-api/lib/Github/Api/Project/Cards.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Api\Project;
|
||||
|
||||
use Github\Api\AbstractApi;
|
||||
use Github\Api\AcceptHeaderTrait;
|
||||
use Github\Exception\MissingArgumentException;
|
||||
|
||||
class Cards extends AbstractApi
|
||||
{
|
||||
use AcceptHeaderTrait;
|
||||
|
||||
/**
|
||||
* Configure the accept header for Early Access to the projects api.
|
||||
*
|
||||
* @see https://developer.github.com/v3/repos/projects/#projects
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function configure()
|
||||
{
|
||||
$this->acceptHeaderValue = 'application/vnd.github.inertia-preview+json';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function all($columnId, array $params = [])
|
||||
{
|
||||
return $this->get('/projects/columns/'.rawurlencode($columnId).'/cards', array_merge(['page' => 1], $params));
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
return $this->get('/projects/columns/cards/'.rawurlencode($id));
|
||||
}
|
||||
|
||||
public function create($columnId, array $params)
|
||||
{
|
||||
return $this->post('/projects/columns/'.rawurlencode($columnId).'/cards', $params);
|
||||
}
|
||||
|
||||
public function update($id, array $params)
|
||||
{
|
||||
return $this->patch('/projects/columns/cards/'.rawurlencode($id), $params);
|
||||
}
|
||||
|
||||
public function deleteCard($id)
|
||||
{
|
||||
return $this->delete('/projects/columns/cards/'.rawurlencode($id));
|
||||
}
|
||||
|
||||
public function move($id, array $params)
|
||||
{
|
||||
if (!isset($params['position'])) {
|
||||
throw new MissingArgumentException(['position']);
|
||||
}
|
||||
|
||||
return $this->post('/projects/columns/cards/'.rawurlencode($id).'/moves', $params);
|
||||
}
|
||||
}
|
||||
73
vendor/knplabs/github-api/lib/Github/Api/Project/Columns.php
vendored
Normal file
73
vendor/knplabs/github-api/lib/Github/Api/Project/Columns.php
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace Github\Api\Project;
|
||||
|
||||
use Github\Api\AbstractApi;
|
||||
use Github\Api\AcceptHeaderTrait;
|
||||
use Github\Exception\MissingArgumentException;
|
||||
|
||||
class Columns extends AbstractApi
|
||||
{
|
||||
use AcceptHeaderTrait;
|
||||
|
||||
/**
|
||||
* Configure the accept header for Early Access to the projects api.
|
||||
*
|
||||
* @see https://developer.github.com/v3/repos/projects/#projects
|
||||
*
|
||||
* return self
|
||||
*/
|
||||
public function configure()
|
||||
{
|
||||
$this->acceptHeaderValue = 'application/vnd.github.inertia-preview+json';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function all($projectId, array $params = [])
|
||||
{
|
||||
return $this->get('/projects/'.rawurlencode($projectId).'/columns', array_merge(['page' => 1], $params));
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
return $this->get('/projects/columns/'.rawurlencode($id));
|
||||
}
|
||||
|
||||
public function create($projectId, array $params)
|
||||
{
|
||||
if (!isset($params['name'])) {
|
||||
throw new MissingArgumentException(['name']);
|
||||
}
|
||||
|
||||
return $this->post('/projects/'.rawurlencode($projectId).'/columns', $params);
|
||||
}
|
||||
|
||||
public function update($id, array $params)
|
||||
{
|
||||
if (!isset($params['name'])) {
|
||||
throw new MissingArgumentException(['name']);
|
||||
}
|
||||
|
||||
return $this->patch('/projects/columns/'.rawurlencode($id), $params);
|
||||
}
|
||||
|
||||
public function deleteColumn($id)
|
||||
{
|
||||
return $this->delete('/projects/columns/'.rawurlencode($id));
|
||||
}
|
||||
|
||||
public function move($id, array $params)
|
||||
{
|
||||
if (!isset($params['position'])) {
|
||||
throw new MissingArgumentException(['position']);
|
||||
}
|
||||
|
||||
return $this->post('/projects/columns/'.rawurlencode($id).'/moves', $params);
|
||||
}
|
||||
|
||||
public function cards()
|
||||
{
|
||||
return new Cards($this->client);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user