1 | <?php |
||
22 | class Member extends AbstractApi |
||
23 | { |
||
24 | /** |
||
25 | * Base path of members api |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $path = 'members'; |
||
29 | |||
30 | /** |
||
31 | * Member fields |
||
32 | * @link https://trello.com/docs/api/member/#get-1-members-idmember-or-username-field |
||
33 | * @var array |
||
34 | */ |
||
35 | public static $fields = array( |
||
36 | 'avatarHash', |
||
37 | 'bio', |
||
38 | 'bioData', |
||
39 | 'confirmed', |
||
40 | 'fullName', |
||
41 | 'idPremOrgsAdmin', |
||
42 | 'initials', |
||
43 | 'memberType', |
||
44 | 'products', |
||
45 | 'status', |
||
46 | 'url', |
||
47 | 'username', |
||
48 | 'avatarSource', |
||
49 | 'email', |
||
50 | 'gravatarHash', |
||
51 | 'idBoards', |
||
52 | 'idBoardsPinned', |
||
53 | 'idOrganizations', |
||
54 | 'loginTypes', |
||
55 | 'newEmail', |
||
56 | 'oneTimeMessagesDismissed', |
||
57 | 'prefs', |
||
58 | 'status', |
||
59 | 'trophies', |
||
60 | 'uploadedAvatarHash', |
||
61 | 'premiumFeatures' |
||
62 | ); |
||
63 | |||
64 | /** |
||
65 | * Find a member by id or username |
||
66 | * @link https://trello.com/docs/api/member/index.html#get-1-members-idmember-or-username |
||
67 | * |
||
68 | * @param string $id the member's id or username |
||
69 | * @param array $params optional attributes |
||
70 | * |
||
71 | * @return array list info |
||
72 | */ |
||
73 | 1 | public function show($id, array $params = array()) |
|
77 | |||
78 | /** |
||
79 | * Update a member |
||
80 | * @link https://trello.com/docs/api/member/#put-1-members-idmember-or-username |
||
81 | * |
||
82 | * @param string $id the member's id or username |
||
83 | * @param array $params attributes to update: 'fullName', 'initials', 'username', 'bio', |
||
84 | * 'avatarSource', 'prefs/colorBlind', 'prefs/minutesBetweenSummaries' |
||
85 | * |
||
86 | * @return array list info |
||
87 | */ |
||
88 | 1 | public function update($id, array $params = array()) |
|
92 | |||
93 | /** |
||
94 | * Get a given member's deltas |
||
95 | * @link https://trello.com/docs/api/member/#get-1-members-idmember-or-username-deltas |
||
96 | * |
||
97 | * @param string $id the member's id or username |
||
98 | * @param array $params optional parameters |
||
99 | * |
||
100 | * @return array |
||
101 | */ |
||
102 | 1 | public function getDeltas($id, array $params = array()) |
|
106 | |||
107 | /** |
||
108 | * Set a given member's avatarSource |
||
109 | * @link https://trello.com/docs/api/member/#put-1-members-idmember-or-username-avatarSource |
||
110 | * |
||
111 | * @param string $id the member's id or username |
||
112 | * @param string $avatarSource the avatarSource, one of 'none', 'upload', 'gravatar' |
||
113 | * |
||
114 | * @return array |
||
115 | */ |
||
116 | 1 | public function setAvatarSource($id, $avatarSource) |
|
120 | |||
121 | /** |
||
122 | * Set a given member's bio |
||
123 | * @link https://trello.com/docs/api/member/#put-1-members-idmember-or-username-bio |
||
124 | * |
||
125 | * @param string $id the member's id or username |
||
126 | * @param string $bio the bio |
||
127 | * |
||
128 | * @return array |
||
129 | */ |
||
130 | 1 | public function setBio($id, $bio) |
|
134 | |||
135 | /** |
||
136 | * Set a given member's full name |
||
137 | * @link https://trello.com/docs/api/member/#put-1-members-idmember-or-username-fullname |
||
138 | * |
||
139 | * @param string $id the member's id or username |
||
140 | * @param string $fullName the full name |
||
141 | * |
||
142 | * @return array |
||
143 | */ |
||
144 | 1 | public function setFullName($id, $fullName) |
|
148 | |||
149 | /** |
||
150 | * Set a given member's initials |
||
151 | * @link https://trello.com/docs/api/member/#put-1-members-idmember-or-username-initials |
||
152 | * |
||
153 | * @param string $id the member's id or username |
||
154 | * @param string $initials the initials |
||
155 | * |
||
156 | * @return array |
||
157 | */ |
||
158 | 1 | public function setInitials($id, $initials) |
|
162 | |||
163 | /** |
||
164 | * Set a given member's username |
||
165 | * @link https://trello.com/docs/api/member/#put-1-members-idmember-or-username-username |
||
166 | * |
||
167 | * @param string $id the member's id or username |
||
168 | * @param string $username the username |
||
169 | * |
||
170 | * @return array |
||
171 | */ |
||
172 | 1 | public function setUsername($id, $username) |
|
176 | |||
177 | /** |
||
178 | * Set a given member's avatar |
||
179 | * @link https://trello.com/docs/api/member/#put-1-members-idmember-or-avatar-avatar |
||
180 | * |
||
181 | * @param string $id the member's id or avatar |
||
182 | * |
||
183 | * @return array |
||
184 | */ |
||
185 | 1 | public function setAvatar($id, $file) |
|
189 | |||
190 | /** |
||
191 | * Actions API |
||
192 | * |
||
193 | * @return Member\Actions |
||
194 | */ |
||
195 | 1 | public function actions() |
|
199 | |||
200 | /** |
||
201 | * Boards API |
||
202 | * |
||
203 | * @return Member\Boards |
||
204 | */ |
||
205 | 3 | public function boards() |
|
209 | |||
210 | /** |
||
211 | * Cards API |
||
212 | * |
||
213 | * @return Member\Cards |
||
214 | */ |
||
215 | 1 | public function cards() |
|
219 | |||
220 | /** |
||
221 | * Notifications API |
||
222 | * |
||
223 | * @return Member\Notifications |
||
224 | */ |
||
225 | 1 | public function notifications() |
|
229 | |||
230 | /** |
||
231 | * Organizations API |
||
232 | * |
||
233 | * @return Member\Organizations |
||
234 | */ |
||
235 | 1 | public function organizations() |
|
239 | |||
240 | /** |
||
241 | * Custom Backgrounds API |
||
242 | * |
||
243 | * @return Member\CustomBackgrounds |
||
244 | */ |
||
245 | 1 | public function customBackgrounds() |
|
249 | |||
250 | /** |
||
251 | * Custom Emoji API |
||
252 | * |
||
253 | * @return Member\CustomEmoji |
||
254 | */ |
||
255 | 1 | public function customEmoji() |
|
259 | |||
260 | /** |
||
261 | * Custom Stickers API |
||
262 | * |
||
263 | * @return Member\CustomStickers |
||
264 | */ |
||
265 | 1 | public function customStickers() |
|
269 | |||
270 | /** |
||
271 | * Saved Searches API |
||
272 | * |
||
273 | * @return Member\SavedSearches |
||
274 | */ |
||
275 | 1 | public function savedSearches() |
|
279 | } |
||
280 |