1 | <?php |
||
13 | class Action extends AbstractApi |
||
14 | { |
||
15 | /** |
||
16 | * Base path of actions api |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $path = 'actions'; |
||
20 | |||
21 | /** |
||
22 | * Action fields |
||
23 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-field |
||
24 | * @var array |
||
25 | */ |
||
26 | public static $fields = array( |
||
27 | 'idMemberCreator', |
||
28 | 'data', |
||
29 | 'type', |
||
30 | 'date' |
||
31 | ); |
||
32 | |||
33 | /** |
||
34 | * Find an action by id |
||
35 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction |
||
36 | * |
||
37 | * @param string $id the action's id |
||
38 | * @param array $params optional attributes |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | 1 | public function show($id, array $params = array()) |
|
46 | |||
47 | /** |
||
48 | * Update a checklist |
||
49 | * @link https://trello.com/docs/api/checklist/#put-1-checklists-idchecklist |
||
50 | * |
||
51 | * @param string $id the list's id |
||
52 | * @param array $params list attributes to update |
||
53 | * |
||
54 | * @return array list info |
||
55 | */ |
||
56 | 1 | public function update($id, array $params = array()) |
|
60 | |||
61 | /** |
||
62 | * Remove a action |
||
63 | * @link https://trello.com/docs/api/action/#delete-1-actions-idaction |
||
64 | * |
||
65 | * @param string $id the action's id |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | 1 | public function remove($id) |
|
73 | |||
74 | /** |
||
75 | * Get an action's board |
||
76 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-board |
||
77 | * |
||
78 | * @param string $id the action's id |
||
79 | * @param array $params optional parameters |
||
80 | * |
||
81 | * @return array |
||
82 | */ |
||
83 | 1 | public function getBoard($id, array $params = array()) |
|
87 | |||
88 | /** |
||
89 | * Get the field of a board of a given card |
||
90 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-board |
||
91 | * |
||
92 | * @param string $id the action's id |
||
93 | * @param array $field the name of the field |
||
94 | * |
||
95 | * @return array |
||
96 | * |
||
97 | * @throws InvalidArgumentException if the field does not exist |
||
98 | */ |
||
99 | 2 | public function getBoardField($id, $field) |
|
105 | |||
106 | /** |
||
107 | * Get an action's list |
||
108 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-list |
||
109 | * |
||
110 | * @param string $id the action's id |
||
111 | * @param array $params optional parameters |
||
112 | * |
||
113 | * @return array |
||
114 | */ |
||
115 | 1 | public function getList($id, array $params = array()) |
|
119 | |||
120 | /** |
||
121 | * Get the field of a list of a given action |
||
122 | * @link https://trello.com/docs/api/action/index.html#get-1-actions-idaction-list-field |
||
123 | * |
||
124 | * @param string $id the action's id |
||
125 | * @param array $field the name of the field |
||
126 | * |
||
127 | * @return array |
||
128 | * |
||
129 | * @throws InvalidArgumentException if the field does not exist |
||
130 | */ |
||
131 | 2 | public function getListField($id, $field) |
|
137 | |||
138 | /** |
||
139 | * Get an action's card |
||
140 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-card |
||
141 | * |
||
142 | * @param string $id the action's id |
||
143 | * @param array $params optional parameters |
||
144 | * |
||
145 | * @return array |
||
146 | */ |
||
147 | 1 | public function getCard($id, array $params = array()) |
|
151 | |||
152 | /** |
||
153 | * Get the field of a card of a given action |
||
154 | * @link https://trello.com/docs/api/action/index.html#get-1-actions-idaction-card-field |
||
155 | * |
||
156 | * @param string $id the action's id |
||
157 | * @param array $field the name of the field |
||
158 | * |
||
159 | * @return array |
||
160 | * |
||
161 | * @throws InvalidArgumentException if the field does not exist |
||
162 | */ |
||
163 | 2 | public function getCardField($id, $field) |
|
169 | |||
170 | /** |
||
171 | * Get an action's member |
||
172 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-member |
||
173 | * |
||
174 | * @param string $id the action's id |
||
175 | * @param array $params optional parameters |
||
176 | * |
||
177 | * @return array |
||
178 | */ |
||
179 | 1 | public function getMember($id, array $params = array()) |
|
183 | |||
184 | /** |
||
185 | * Get the field of a member of a given action |
||
186 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-member-field |
||
187 | * |
||
188 | * @param string $id the action's id |
||
189 | * @param array $field the name of the field |
||
190 | * |
||
191 | * @return array |
||
192 | * |
||
193 | * @throws InvalidArgumentException if the field does not exist |
||
194 | */ |
||
195 | 2 | public function getMemberField($id, $field) |
|
201 | |||
202 | /** |
||
203 | * Get an action's creator |
||
204 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-creator |
||
205 | * |
||
206 | * @param string $id the action's id |
||
207 | * @param array $params optional parameters |
||
208 | * |
||
209 | * @return array |
||
210 | */ |
||
211 | 1 | public function getCreator($id, array $params = array()) |
|
215 | |||
216 | /** |
||
217 | * Get the field of a creator of a given action |
||
218 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-creator-field |
||
219 | * |
||
220 | * @param string $id the action's id |
||
221 | * @param array $field the name of the field |
||
222 | * |
||
223 | * @return array |
||
224 | * |
||
225 | * @throws InvalidArgumentException if the field does not exist |
||
226 | */ |
||
227 | 2 | public function getCreatorField($id, $field) |
|
233 | |||
234 | /** |
||
235 | * Get an action's organization |
||
236 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-organization |
||
237 | * |
||
238 | * @param string $id the action's id |
||
239 | * @param array $params optional parameters |
||
240 | * |
||
241 | * @return array |
||
242 | */ |
||
243 | 1 | public function getOrganization($id, array $params = array()) |
|
247 | |||
248 | /** |
||
249 | * Get the field of an organization of a given action |
||
250 | * @link https://trello.com/docs/api/action/#get-1-actions-idaction-organization-field |
||
251 | * |
||
252 | * @param string $id the action's id |
||
253 | * @param array $field the name of the field |
||
254 | * |
||
255 | * @return array |
||
256 | * |
||
257 | * @throws InvalidArgumentException if the field does not exist |
||
258 | */ |
||
259 | 2 | public function getOrganizationField($id, $field) |
|
265 | |||
266 | /** |
||
267 | * Set a given action's text |
||
268 | * @link https://trello.com/docs/api/action/#put-1-actions-idaction-text |
||
269 | * |
||
270 | * @param string $id the card's id or short link |
||
271 | * @param string $text the text |
||
272 | * |
||
273 | * @return array card info |
||
274 | */ |
||
275 | 1 | public function setText($id, $text) |
|
279 | } |
||
280 |