1 | <?php |
||
7 | class Label extends AbstractApi |
||
8 | { |
||
9 | /** |
||
10 | * Base path of labels api |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $path = 'labels'; |
||
14 | |||
15 | |||
16 | public static $fields = array( |
||
17 | 'idBoard', |
||
18 | 'name', |
||
19 | 'color', |
||
20 | ); |
||
21 | |||
22 | /** |
||
23 | * Find a label by id |
||
24 | * @link https://developers.trello.com/reference/#id |
||
25 | * |
||
26 | * @param string $id the label's id |
||
27 | * @param array $params optional attributes |
||
28 | * |
||
29 | * @return array label info |
||
30 | */ |
||
31 | public function show($id, array $params = array()) |
||
35 | |||
36 | /** |
||
37 | * Create a label |
||
38 | * @link https://developers.trello.com/reference/#id-1 |
||
39 | * |
||
40 | * @param array $params optional attributes |
||
41 | * |
||
42 | * @return array label info |
||
43 | */ |
||
44 | public function create(array $params = array()) |
||
50 | |||
51 | /** |
||
52 | * Update a label |
||
53 | * @link https://developers.trello.com/reference/#id-1 |
||
54 | * |
||
55 | * @param string $id the label's id |
||
56 | * @param array $params label attributes to update |
||
57 | * |
||
58 | * @return array label info |
||
59 | */ |
||
60 | public function update($id, array $params = array()) |
||
64 | |||
65 | /** |
||
66 | * Set a given label's board |
||
67 | * @link https://developers.trello.com/reference/#id-1 |
||
68 | * |
||
69 | * @param string $id the label's id |
||
70 | * @param string $boardId the board's id |
||
71 | * |
||
72 | * @return array board info |
||
73 | */ |
||
74 | public function setBoard($id, $boardId) |
||
78 | |||
79 | /** |
||
80 | * Get a given label's board |
||
81 | * @link https://developers.trello.com/reference/#id |
||
82 | * |
||
83 | * @param string $id the label's id |
||
84 | * @param array $params optional parameters |
||
85 | * |
||
86 | * @return array board info |
||
87 | */ |
||
88 | public function getBoard($id, array $params = array()) |
||
92 | |||
93 | /** |
||
94 | * Get the field of a board of a given label |
||
95 | * @link https://developers.trello.com/reference/#id |
||
96 | * |
||
97 | * @param string $id the label's id |
||
98 | * @param array $field the name of the field |
||
99 | * |
||
100 | * @return array |
||
101 | * |
||
102 | * @throws InvalidArgumentException if the field does not exist |
||
103 | */ |
||
104 | public function getBoardField($id, $field) |
||
110 | } |
||
111 |