1 | <?php |
||
25 | class ChannelModel extends AbstractModel |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | public static $endpoint = '/channels'; |
||
31 | |||
32 | /** |
||
33 | * @param array $requestOptions |
||
34 | * @return ResponseInterface |
||
35 | */ |
||
36 | public function createChannel(array $requestOptions) |
||
40 | |||
41 | /** |
||
42 | * @param array $requestOptions |
||
43 | * @return ResponseInterface |
||
44 | */ |
||
45 | public function createDirectMessageChannel(array $requestOptions) |
||
49 | |||
50 | /** |
||
51 | * @param array $requestOptions |
||
52 | * @return ResponseInterface |
||
53 | */ |
||
54 | public function createGroupMessageChannel(array $requestOptions) |
||
58 | |||
59 | /** |
||
60 | * @param $teamId |
||
61 | * @param array $requestOptions |
||
62 | * @return ResponseInterface |
||
63 | */ |
||
64 | public function getChannelsListByIds($teamId, array $requestOptions) |
||
68 | |||
69 | /** |
||
70 | * @param $channelId |
||
71 | * @return ResponseInterface |
||
72 | */ |
||
73 | public function getChannel($channelId) |
||
77 | |||
78 | /** |
||
79 | * @param $channelId |
||
80 | * @return ResponseInterface |
||
81 | */ |
||
82 | public function getTimezone($channelId) |
||
86 | |||
87 | /** |
||
88 | * @param $channelId |
||
89 | * @param array $requestOptions |
||
90 | * @return ResponseInterface |
||
91 | */ |
||
92 | public function updateChannel($channelId, array $requestOptions) |
||
96 | |||
97 | /** |
||
98 | * @param $channelId |
||
99 | * @return ResponseInterface |
||
100 | */ |
||
101 | public function deleteChannel($channelId) |
||
105 | |||
106 | /** |
||
107 | * @param $channelId |
||
108 | * @param array $requestOptions |
||
109 | * @return ResponseInterface |
||
110 | */ |
||
111 | public function patchChannel($channelId, array $requestOptions) |
||
115 | |||
116 | /** |
||
117 | * @param $channelId |
||
118 | * @return ResponseInterface |
||
119 | */ |
||
120 | public function restoreChannel($channelId) |
||
124 | |||
125 | /** |
||
126 | * @param $channelId |
||
127 | * @return ResponseInterface |
||
128 | */ |
||
129 | public function getChannelStatistics($channelId) |
||
133 | |||
134 | /** |
||
135 | * @param $channelId |
||
136 | * @return ResponseInterface |
||
137 | */ |
||
138 | public function getChannelsPinnedPosts($channelId) |
||
142 | |||
143 | /** |
||
144 | * @param $teamId |
||
145 | * @param $channelName |
||
146 | * @return ResponseInterface |
||
147 | */ |
||
148 | public function getChannelByName($teamId, $channelName) |
||
152 | |||
153 | /** |
||
154 | * @param $teamName |
||
155 | * @param $channelName |
||
156 | * @return ResponseInterface |
||
157 | */ |
||
158 | public function getChannelByNameAndTeamName($teamName, $channelName) |
||
162 | |||
163 | /** |
||
164 | * @param $channelId |
||
165 | * @param array $requestOptions |
||
166 | * @return ResponseInterface |
||
167 | */ |
||
168 | public function getChannelMembers($channelId, array $requestOptions) |
||
172 | |||
173 | /** |
||
174 | * @param $channelId |
||
175 | * @param array $requestOptions |
||
176 | * @return ResponseInterface |
||
177 | */ |
||
178 | public function addUser($channelId, array $requestOptions) |
||
182 | |||
183 | /** |
||
184 | * @param $channelId |
||
185 | * @param array $requestOptions |
||
186 | * @return ResponseInterface |
||
187 | */ |
||
188 | public function getChannelMembersByIds($channelId, array $requestOptions) |
||
192 | |||
193 | /** |
||
194 | * @param $channelId |
||
195 | * @param $userId |
||
196 | * @return ResponseInterface |
||
197 | */ |
||
198 | public function getChannelMember($channelId, $userId) |
||
202 | |||
203 | /** |
||
204 | * @param $channelId |
||
205 | * @param $userId |
||
206 | * @return ResponseInterface |
||
207 | */ |
||
208 | public function removeUserFromChannel($channelId, $userId) |
||
212 | |||
213 | /** |
||
214 | * @param $channelId |
||
215 | * @param $userId |
||
216 | * @param array $requestOptions |
||
217 | * @return ResponseInterface |
||
218 | */ |
||
219 | public function updateChannelRoles($channelId, $userId, array $requestOptions) |
||
223 | |||
224 | /** |
||
225 | * @param $channelId |
||
226 | * @param $userId |
||
227 | * @param array $requestOptions |
||
228 | * @return ResponseInterface |
||
229 | */ |
||
230 | public function updateChannelNotifications($channelId, $userId, array $requestOptions) |
||
234 | |||
235 | /** |
||
236 | * @param $userId |
||
237 | * @param array $requestOptions |
||
238 | * @return ResponseInterface |
||
239 | */ |
||
240 | public function viewChannel($userId, array $requestOptions) |
||
244 | |||
245 | /** |
||
246 | * @param $userId |
||
247 | * @param $teamId |
||
248 | * @return ResponseInterface |
||
249 | */ |
||
250 | public function getChannelMembersForTheUser($userId, $teamId) |
||
254 | |||
255 | /** |
||
256 | * @param $userId |
||
257 | * @param $teamId |
||
258 | * @return ResponseInterface |
||
259 | */ |
||
260 | public function getChannelsForUser($userId, $teamId) |
||
264 | |||
265 | /** |
||
266 | * @param $userId |
||
267 | * @param $channelId |
||
268 | * @return ResponseInterface |
||
269 | */ |
||
270 | public function getUnreadMessages($userId, $channelId) |
||
274 | |||
275 | /** |
||
276 | * @param $channelId |
||
277 | * @return ResponseInterface |
||
278 | */ |
||
279 | public function convertChannelFromPublicToPrivate($channelId) |
||
283 | |||
284 | /** |
||
285 | * @param $teamId |
||
286 | * @param array $requestOptions |
||
287 | * @return ResponseInterface |
||
288 | */ |
||
289 | public function getPublicChannels($teamId, array $requestOptions) |
||
293 | |||
294 | /** |
||
295 | * @param $teamId |
||
296 | * @param array $requestOptions |
||
297 | * @return ResponseInterface |
||
298 | */ |
||
299 | public function getDeletedChannels($teamId, array $requestOptions) |
||
303 | |||
304 | /** |
||
305 | * @param $teamId |
||
306 | * @param array $requestOptions |
||
307 | * @return ResponseInterface |
||
308 | */ |
||
309 | public function autocompleteChannels($teamId, array $requestOptions) |
||
313 | |||
314 | /** |
||
315 | * @param $teamId |
||
316 | * @param array $requestOptions |
||
317 | * @return ResponseInterface |
||
318 | */ |
||
319 | public function autocompleteChannelsForSearch($teamId, array $requestOptions) |
||
323 | |||
324 | /** |
||
325 | * @param $teamId |
||
326 | * @param array $requestOptions |
||
327 | * @return ResponseInterface |
||
328 | */ |
||
329 | public function searchChannels($teamId, array $requestOptions) |
||
333 | |||
334 | /** |
||
335 | * @param $teamId |
||
336 | * @param array $requestOptions |
||
337 | * @return ResponseInterface |
||
338 | */ |
||
339 | public function searchArchivedChannels($teamId, array $requestOptions) |
||
343 | |||
344 | /** |
||
345 | * @param array $requestOptions |
||
346 | * @return ResponseInterface |
||
347 | */ |
||
348 | public function searchAllPrivateAndOpenTypeChannels(array $requestOptions) |
||
352 | |||
353 | /** |
||
354 | * @param array $requestOptions |
||
355 | * @return ResponseInterface |
||
356 | */ |
||
357 | public function searchGroupChannels(array $requestOptions) |
||
361 | |||
362 | /** |
||
363 | * @param $channelId |
||
364 | * @param array $requestOptions |
||
365 | * @return ResponseInterface |
||
366 | */ |
||
367 | public function getMembersMinusGroupMembers($channelId, array $requestOptions) |
||
371 | } |
||
372 |