forked from KnpLabs/php-github-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbstractProjectApi.php
More file actions
45 lines (36 loc) · 1023 Bytes
/
Copy pathAbstractProjectApi.php
File metadata and controls
45 lines (36 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 $this
*/
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->getClient());
}
}