-
-
Notifications
You must be signed in to change notification settings - Fork 592
Expand file tree
/
Copy pathColumns.php
More file actions
56 lines (44 loc) · 1.39 KB
/
Columns.php
File metadata and controls
56 lines (44 loc) · 1.39 KB
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
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Github\Api\Project;
use Github\Api\AbstractApi;
use Github\Exception\MissingArgumentException;
class Columns extends AbstractApi
{
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->getClient());
}
}