Slack/Commands.pm

filter: Statementstmt 12.7% 191 / 1499 Branchbran 0.0% 0 / 338 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 2.8% 5 / 178 Podpod 100% 173 / 173 totaltotal 16.8% 369 / 2188 CC 170 SCAR 17.7
CC
170
Cov
10%
admin_apps_approve
6.0
admin_apps_approved_list
6.0
admin_apps_requests_list
6.0
CRAP 5.9
« Slack/EventType.pm ↑ Summary Slack/Event/Channel.pm »
1 package Net::Async::Slack::Commands;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.015'; # VERSION
7 2 our $AUTHORITY = 'cpan:TEAM'; # AUTHORITY
8  
9 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =encoding utf8
12  
13 =head1 NAME
14  
15 Net::Async::Slack::Commands - supported API methods for L<Net::Async::Slack>
16  
17 =head1 DESCRIPTION
18  
19 These are available on the top-level L<Net::Async::Slack> instance, and are autogenerated
20 from the API specification.
21  
22 =cut
23  
24 2 ▶use Future::AsyncAwait;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 ▶use JSON::MaybeUTF8 qw(:v1);
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 =head2 admin_apps_approve
28  
29 Approve an app for installation on a workspace.
30  
31 L<API method documentation|https://api.slack.com/methods/admin.apps.approve>
32  
33 Takes the following named parameters:
34  
35 =over 4
36  
37 =item * C<app_id> - The id of the app to approve. (string, optional)
38  
39 =item * C<request_id> - The id of the request to approve. (string, optional)
40  
41 =item * C<team_id> - (string, optional)
42  
43 =back
44  
45 Resolves to a structure representing the response.
46  
47 =cut
48  
49 0 ▶async sub admin_apps_approve {
Subroutine admin_apps_approve: not called CC=2 SCAR=17.9
Pod documented
50 0 my ($self, %args) = @_;
51 0 my $uri = $self->endpoint(
52 'admin_apps_approve',
53 );
54 my $content = encode_json_utf8({
55 0 %args{grep { exists $args{$_} } qw(app_id request_id team_id)}
56 });
57 0 my ($res) = await $self->http_post(
58 $uri,
59 $content,
60 content_type => 'application/json; charset=utf-8',
61 );
62 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
63 0 return $res;
64 2 }
65  
66  
67 =head2 admin_apps_approved_list
68  
69 List approved apps for an org or workspace.
70  
71 L<API method documentation|https://api.slack.com/methods/admin.apps.approved.list>
72  
73 Takes the following named parameters:
74  
75 =over 4
76  
77 =item * C<limit> - The maximum number of items to return. Must be between 1 - 1000 both inclusive. (integer, optional)
78  
79 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page (string, optional)
80  
81 =item * C<team_id> - (string, optional)
82  
83 =item * C<enterprise_id> - (string, optional)
84  
85 =back
86  
87 Resolves to a structure representing the response.
88  
89 =cut
90  
91 0 ▶async sub admin_apps_approved_list {
Subroutine admin_apps_approved_list: not called CC=2 SCAR=17.9
Pod documented
92 0 my ($self, %args) = @_;
93 my $uri = $self->endpoint(
94 'admin_apps_approved_list',
95 0 %args{grep { exists $args{$_} } qw(limit cursor team_id enterprise_id)}
96 );
97 0 my ($res) = await $self->http_get(
98 $uri,
99 );
100 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
101 0 return $res;
102 2 }
103  
104  
105 =head2 admin_apps_requests_list
106  
107 List app requests for a team/workspace.
108  
109 L<API method documentation|https://api.slack.com/methods/admin.apps.requests.list>
110  
111 Takes the following named parameters:
112  
113 =over 4
114  
115 =item * C<limit> - The maximum number of items to return. Must be between 1 - 1000 both inclusive. (integer, optional)
116  
117 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page (string, optional)
118  
119 =item * C<team_id> - (string, optional)
120  
121 =back
122  
123 Resolves to a structure representing the response.
124  
125 =cut
126  
127 0 ▶async sub admin_apps_requests_list {
Subroutine admin_apps_requests_list: not called CC=2 SCAR=17.9
Pod documented
128 0 my ($self, %args) = @_;
129 my $uri = $self->endpoint(
130 'admin_apps_requests_list',
131 0 %args{grep { exists $args{$_} } qw(limit cursor team_id)}
132 );
133 0 my ($res) = await $self->http_get(
134 $uri,
135 );
136 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
137 0 return $res;
138 2 }
139  
140  
141 =head2 admin_apps_restrict
142  
143 Restrict an app for installation on a workspace.
144  
145 L<API method documentation|https://api.slack.com/methods/admin.apps.restrict>
146  
147 Takes the following named parameters:
148  
149 =over 4
150  
151 =item * C<app_id> - The id of the app to restrict. (string, optional)
152  
153 =item * C<request_id> - The id of the request to restrict. (string, optional)
154  
155 =item * C<team_id> - (string, optional)
156  
157 =back
158  
159 Resolves to a structure representing the response.
160  
161 =cut
162  
163 0 ▶async sub admin_apps_restrict {
Subroutine admin_apps_restrict: not called CC=2 SCAR=17.9
Pod documented
164 0 my ($self, %args) = @_;
165 0 my $uri = $self->endpoint(
166 'admin_apps_restrict',
167 );
168 my $content = encode_json_utf8({
169 0 %args{grep { exists $args{$_} } qw(app_id request_id team_id)}
170 });
171 0 my ($res) = await $self->http_post(
172 $uri,
173 $content,
174 content_type => 'application/json; charset=utf-8',
175 );
176 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
177 0 return $res;
178 2 }
179  
180  
181 =head2 admin_apps_restricted_list
182  
183 List restricted apps for an org or workspace.
184  
185 L<API method documentation|https://api.slack.com/methods/admin.apps.restricted.list>
186  
187 Takes the following named parameters:
188  
189 =over 4
190  
191 =item * C<limit> - The maximum number of items to return. Must be between 1 - 1000 both inclusive. (integer, optional)
192  
193 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page (string, optional)
194  
195 =item * C<team_id> - (string, optional)
196  
197 =item * C<enterprise_id> - (string, optional)
198  
199 =back
200  
201 Resolves to a structure representing the response.
202  
203 =cut
204  
205 0 ▶async sub admin_apps_restricted_list {
Subroutine admin_apps_restricted_list: not called CC=2 SCAR=17.9
Pod documented
206 0 my ($self, %args) = @_;
207 my $uri = $self->endpoint(
208 'admin_apps_restricted_list',
209 0 %args{grep { exists $args{$_} } qw(limit cursor team_id enterprise_id)}
210 );
211 0 my ($res) = await $self->http_get(
212 $uri,
213 );
214 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
215 0 return $res;
216 2 }
217  
218  
219 =head2 admin_conversations_archive
220  
221 Archive a public or private channel.
222  
223 L<API method documentation|https://api.slack.com/methods/admin.conversations.archive>
224  
225 Takes the following named parameters:
226  
227 =over 4
228  
229 =item * C<channel_id> - The channel to archive. (string, required)
230  
231 =back
232  
233 Resolves to a structure representing the response.
234  
235 =cut
236  
237 0 ▶async sub admin_conversations_archive {
Subroutine admin_conversations_archive: not called CC=2 SCAR=17.9
Pod documented
238 0 my ($self, %args) = @_;
239 0 my $uri = $self->endpoint(
240 'admin_conversations_archive',
241 );
242 my $content = encode_json_utf8({
243 0 %args{grep { exists $args{$_} } qw(channel_id)}
244 });
245 0 my ($res) = await $self->http_post(
246 $uri,
247 $content,
248 content_type => 'application/json; charset=utf-8',
249 );
250 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
251 0 return $res;
252 2 }
253  
254  
255 =head2 admin_conversations_convert_to_private
256  
257 Convert a public channel to a private channel.
258  
259 L<API method documentation|https://api.slack.com/methods/admin.conversations.convertToPrivate>
260  
261 Takes the following named parameters:
262  
263 =over 4
264  
265 =item * C<channel_id> - The channel to convert to private. (string, required)
266  
267 =back
268  
269 Resolves to a structure representing the response.
270  
271 =cut
272  
273 0 ▶async sub admin_conversations_convert_to_private {
Subroutine admin_conversations_convert_to_private: not called CC=2 SCAR=17.9
Pod documented
274 0 my ($self, %args) = @_;
275 0 my $uri = $self->endpoint(
276 'admin_conversations_convert_to_private',
277 );
278 my $content = encode_json_utf8({
279 0 %args{grep { exists $args{$_} } qw(channel_id)}
280 });
281 0 my ($res) = await $self->http_post(
282 $uri,
283 $content,
284 content_type => 'application/json; charset=utf-8',
285 );
286 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
287 0 return $res;
288 2 }
289  
290  
291 =head2 admin_conversations_create
292  
293 Create a public or private channel-based conversation.
294  
295 L<API method documentation|https://api.slack.com/methods/admin.conversations.create>
296  
297 Takes the following named parameters:
298  
299 =over 4
300  
301 =item * C<name> - Name of the public or private channel to create. (string, required)
302  
303 =item * C<description> - Description of the public or private channel to create. (string, optional)
304  
305 =item * C<is_private> - When `true`, creates a private channel instead of a public channel (boolean, required)
306  
307 =item * C<org_wide> - When `true`, the channel will be available org-wide. Note: if the channel is not `org_wide=true`, you must specify a `team_id` for this channel (boolean, optional)
308  
309 =item * C<team_id> - The workspace to create the channel in. Note: this argument is required unless you set `org_wide=true`. (string, optional)
310  
311 =back
312  
313 Resolves to a structure representing the response.
314  
315 =cut
316  
317 0 ▶async sub admin_conversations_create {
Subroutine admin_conversations_create: not called CC=2 SCAR=17.9
Pod documented
318 0 my ($self, %args) = @_;
319 0 my $uri = $self->endpoint(
320 'admin_conversations_create',
321 );
322 my $content = encode_json_utf8({
323 0 %args{grep { exists $args{$_} } qw(name description is_private org_wide team_id)}
324 });
325 0 my ($res) = await $self->http_post(
326 $uri,
327 $content,
328 content_type => 'application/json; charset=utf-8',
329 );
330 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
331 0 return $res;
332 2 }
333  
334  
335 =head2 admin_conversations_delete
336  
337 Delete a public or private channel.
338  
339 L<API method documentation|https://api.slack.com/methods/admin.conversations.delete>
340  
341 Takes the following named parameters:
342  
343 =over 4
344  
345 =item * C<channel_id> - The channel to delete. (string, required)
346  
347 =back
348  
349 Resolves to a structure representing the response.
350  
351 =cut
352  
353 0 ▶async sub admin_conversations_delete {
Subroutine admin_conversations_delete: not called CC=2 SCAR=17.9
Pod documented
354 0 my ($self, %args) = @_;
355 0 my $uri = $self->endpoint(
356 'admin_conversations_delete',
357 );
358 my $content = encode_json_utf8({
359 0 %args{grep { exists $args{$_} } qw(channel_id)}
360 });
361 0 my ($res) = await $self->http_post(
362 $uri,
363 $content,
364 content_type => 'application/json; charset=utf-8',
365 );
366 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
367 0 return $res;
368 2 }
369  
370  
371 =head2 admin_conversations_disconnect_shared
372  
373 Disconnect a connected channel from one or more workspaces.
374  
375 L<API method documentation|https://api.slack.com/methods/admin.conversations.disconnectShared>
376  
377 Takes the following named parameters:
378  
379 =over 4
380  
381 =item * C<channel_id> - The channel to be disconnected from some workspaces. (string, required)
382  
383 =item * C<leaving_team_ids> - The team to be removed from the channel. Currently only a single team id can be specified. (string, optional)
384  
385 =back
386  
387 Resolves to a structure representing the response.
388  
389 =cut
390  
391 0 ▶async sub admin_conversations_disconnect_shared {
Subroutine admin_conversations_disconnect_shared: not called CC=2 SCAR=17.9
Pod documented
392 0 my ($self, %args) = @_;
393 0 my $uri = $self->endpoint(
394 'admin_conversations_disconnect_shared',
395 );
396 my $content = encode_json_utf8({
397 0 %args{grep { exists $args{$_} } qw(channel_id leaving_team_ids)}
398 });
399 0 my ($res) = await $self->http_post(
400 $uri,
401 $content,
402 content_type => 'application/json; charset=utf-8',
403 );
404 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
405 0 return $res;
406 2 }
407  
408  
409 =head2 admin_conversations_ekm_list_original_connected_channel_info
410  
411 List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM.
412  
413 L<API method documentation|https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo>
414  
415 Takes the following named parameters:
416  
417 =over 4
418  
419 =item * C<channel_ids> - A comma-separated list of channels to filter to. (string, optional)
420  
421 =item * C<team_ids> - A comma-separated list of the workspaces to which the channels you would like returned belong. (string, optional)
422  
423 =item * C<limit> - The maximum number of items to return. Must be between 1 - 1000 both inclusive. (integer, optional)
424  
425 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. (string, optional)
426  
427 =back
428  
429 Resolves to a structure representing the response.
430  
431 =cut
432  
433 0 ▶async sub admin_conversations_ekm_list_original_connected_channel_info {
Subroutine admin_conversations_ekm_list_original_connected_channel_info: not called CC=2 SCAR=17.9
Pod documented
434 0 my ($self, %args) = @_;
435 my $uri = $self->endpoint(
436 'admin_conversations_ekm_list_original_connected_channel_info',
437 0 %args{grep { exists $args{$_} } qw(channel_ids team_ids limit cursor)}
438 );
439 0 my ($res) = await $self->http_get(
440 $uri,
441 );
442 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
443 0 return $res;
444 2 }
445  
446  
447 =head2 admin_conversations_get_conversation_prefs
448  
449 Get conversation preferences for a public or private channel.
450  
451 L<API method documentation|https://api.slack.com/methods/admin.conversations.getConversationPrefs>
452  
453 Takes the following named parameters:
454  
455 =over 4
456  
457 =item * C<channel_id> - The channel to get preferences for. (string, required)
458  
459 =back
460  
461 Resolves to a structure representing the response.
462  
463 =cut
464  
465 0 ▶async sub admin_conversations_get_conversation_prefs {
Subroutine admin_conversations_get_conversation_prefs: not called CC=2 SCAR=17.9
Pod documented
466 0 my ($self, %args) = @_;
467 0 my $uri = $self->endpoint(
468 'admin_conversations_get_conversation_prefs',
469 );
470 my $content = encode_json_utf8({
471 0 %args{grep { exists $args{$_} } qw(channel_id)}
472 });
473 0 my ($res) = await $self->http_post(
474 $uri,
475 $content,
476 content_type => 'application/json; charset=utf-8',
477 );
478 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
479 0 return $res;
480 2 }
481  
482  
483 =head2 admin_conversations_get_teams
484  
485 Get all the workspaces a given public or private channel is connected to within this Enterprise org.
486  
487 L<API method documentation|https://api.slack.com/methods/admin.conversations.getTeams>
488  
489 Takes the following named parameters:
490  
491 =over 4
492  
493 =item * C<channel_id> - The channel to determine connected workspaces within the organization for. (string, required)
494  
495 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page (string, optional)
496  
497 =item * C<limit> - The maximum number of items to return. Must be between 1 - 1000 both inclusive. (integer, optional)
498  
499 =back
500  
501 Resolves to a structure representing the response.
502  
503 =cut
504  
505 0 ▶async sub admin_conversations_get_teams {
Subroutine admin_conversations_get_teams: not called CC=2 SCAR=17.9
Pod documented
506 0 my ($self, %args) = @_;
507 0 my $uri = $self->endpoint(
508 'admin_conversations_get_teams',
509 );
510 my $content = encode_json_utf8({
511 0 %args{grep { exists $args{$_} } qw(channel_id cursor limit)}
512 });
513 0 my ($res) = await $self->http_post(
514 $uri,
515 $content,
516 content_type => 'application/json; charset=utf-8',
517 );
518 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
519 0 return $res;
520 2 }
521  
522  
523 =head2 admin_conversations_invite
524  
525 Invite a user to a public or private channel.
526  
527 L<API method documentation|https://api.slack.com/methods/admin.conversations.invite>
528  
529 Takes the following named parameters:
530  
531 =over 4
532  
533 =item * C<user_ids> - The users to invite. (string, required)
534  
535 =item * C<channel_id> - The channel that the users will be invited to. (string, required)
536  
537 =back
538  
539 Resolves to a structure representing the response.
540  
541 =cut
542  
543 0 ▶async sub admin_conversations_invite {
Subroutine admin_conversations_invite: not called CC=2 SCAR=17.9
Pod documented
544 0 my ($self, %args) = @_;
545 0 my $uri = $self->endpoint(
546 'admin_conversations_invite',
547 );
548 my $content = encode_json_utf8({
549 0 %args{grep { exists $args{$_} } qw(user_ids channel_id)}
550 });
551 0 my ($res) = await $self->http_post(
552 $uri,
553 $content,
554 content_type => 'application/json; charset=utf-8',
555 );
556 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
557 0 return $res;
558 2 }
559  
560  
561 =head2 admin_conversations_rename
562  
563 Rename a public or private channel.
564  
565 L<API method documentation|https://api.slack.com/methods/admin.conversations.rename>
566  
567 Takes the following named parameters:
568  
569 =over 4
570  
571 =item * C<channel_id> - The channel to rename. (string, required)
572  
573 =item * C<name> - (string, required)
574  
575 =back
576  
577 Resolves to a structure representing the response.
578  
579 =cut
580  
581 0 ▶async sub admin_conversations_rename {
Subroutine admin_conversations_rename: not called CC=2 SCAR=17.9
Pod documented
582 0 my ($self, %args) = @_;
583 0 my $uri = $self->endpoint(
584 'admin_conversations_rename',
585 );
586 my $content = encode_json_utf8({
587 0 %args{grep { exists $args{$_} } qw(channel_id name)}
588 });
589 0 my ($res) = await $self->http_post(
590 $uri,
591 $content,
592 content_type => 'application/json; charset=utf-8',
593 );
594 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
595 0 return $res;
596 2 }
597  
598  
599 =head2 admin_conversations_restrict_access_add_group
600  
601 Add an allowlist of IDP groups for accessing a channel
602  
603 L<API method documentation|https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup>
604  
605 Takes the following named parameters:
606  
607 =over 4
608  
609 =item * C<team_id> - The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization. (string, optional)
610  
611 =item * C<group_id> - The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to be an allowlist for the private channel. (string, required)
612  
613 =item * C<channel_id> - The channel to link this group to. (string, required)
614  
615 =back
616  
617 Resolves to a structure representing the response.
618  
619 =cut
620  
621 0 ▶async sub admin_conversations_restrict_access_add_group {
Subroutine admin_conversations_restrict_access_add_group: not called CC=2 SCAR=17.9
Pod documented
622 0 my ($self, %args) = @_;
623 0 my $uri = $self->endpoint(
624 'admin_conversations_restrict_access_add_group',
625 );
626 my $content = encode_json_utf8({
627 0 %args{grep { exists $args{$_} } qw(team_id group_id channel_id)}
628 });
629 0 my ($res) = await $self->http_post(
630 $uri,
631 $content,
632 content_type => 'application/json; charset=utf-8',
633 );
634 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
635 0 return $res;
636 2 }
637  
638  
639 =head2 admin_conversations_restrict_access_list_groups
640  
641 List all IDP Groups linked to a channel
642  
643 L<API method documentation|https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups>
644  
645 Takes the following named parameters:
646  
647 =over 4
648  
649 =item * C<channel_id> - (string, required)
650  
651 =item * C<team_id> - The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization. (string, optional)
652  
653 =back
654  
655 Resolves to a structure representing the response.
656  
657 =cut
658  
659 0 ▶async sub admin_conversations_restrict_access_list_groups {
Subroutine admin_conversations_restrict_access_list_groups: not called CC=2 SCAR=17.9
Pod documented
660 0 my ($self, %args) = @_;
661 my $uri = $self->endpoint(
662 'admin_conversations_restrict_access_list_groups',
663 0 %args{grep { exists $args{$_} } qw(channel_id team_id)}
664 );
665 0 my ($res) = await $self->http_get(
666 $uri,
667 );
668 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
669 0 return $res;
670 2 }
671  
672  
673 =head2 admin_conversations_restrict_access_remove_group
674  
675 Remove a linked IDP group linked from a private channel
676  
677 L<API method documentation|https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup>
678  
679 Takes the following named parameters:
680  
681 =over 4
682  
683 =item * C<team_id> - The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization. (string, required)
684  
685 =item * C<group_id> - The [IDP Group](https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org) ID to remove from the private channel. (string, required)
686  
687 =item * C<channel_id> - The channel to remove the linked group from. (string, required)
688  
689 =back
690  
691 Resolves to a structure representing the response.
692  
693 =cut
694  
695 0 ▶async sub admin_conversations_restrict_access_remove_group {
Subroutine admin_conversations_restrict_access_remove_group: not called CC=2 SCAR=17.9
Pod documented
696 0 my ($self, %args) = @_;
697 0 my $uri = $self->endpoint(
698 'admin_conversations_restrict_access_remove_group',
699 );
700 my $content = encode_json_utf8({
701 0 %args{grep { exists $args{$_} } qw(team_id group_id channel_id)}
702 });
703 0 my ($res) = await $self->http_post(
704 $uri,
705 $content,
706 content_type => 'application/json; charset=utf-8',
707 );
708 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
709 0 return $res;
710 2 }
711  
712  
713 =head2 admin_conversations_search
714  
715 Search for public or private channels in an Enterprise organization.
716  
717 L<API method documentation|https://api.slack.com/methods/admin.conversations.search>
718  
719 Takes the following named parameters:
720  
721 =over 4
722  
723 =item * C<team_ids> - Comma separated string of team IDs, signifying the workspaces to search through. (string, optional)
724  
725 =item * C<query> - Name of the the channel to query by. (string, optional)
726  
727 =item * C<limit> - Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10. (integer, optional)
728  
729 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. (string, optional)
730  
731 =item * C<search_channel_types> - The type of channel to include or exclude in the search. For example `private` will search private channels, while `private_exclude` will exclude them. For a full list of types, check the [Types section](#types). (string, optional)
732  
733 =item * C<sort> - Possible values are `relevant` (search ranking based on what we think is closest), `name` (alphabetical), `member_count` (number of users in the channel), and `created` (date channel was created). You can optionally pair this with the `sort_dir` arg to change how it is sorted (string, optional)
734  
735 =item * C<sort_dir> - Sort direction. Possible values are `asc` for ascending order like (1, 2, 3) or (a, b, c), and `desc` for descending order like (3, 2, 1) or (c, b, a) (string, optional)
736  
737 =back
738  
739 Resolves to a structure representing the response.
740  
741 =cut
742  
743 0 ▶async sub admin_conversations_search {
Subroutine admin_conversations_search: not called CC=1 SCAR=6.9
Pod documented
744 0 my ($self, %args) = @_;
745 0 my $uri = $self->endpoint(
746 'admin_conversations_search',
747 );
748 my $content = encode_json_utf8({
749 0 %args{grep { exists $args{$_} } qw(team_ids query limit cursor search_channel_types sort sort_dir)}
750 });
751 0 my ($res) = await $self->http_post(
752 $uri,
753 $content,
754 content_type => 'application/json; charset=utf-8',
755 );
756 0 return $res;
757 2 }
758  
759  
760 =head2 admin_conversations_set_conversation_prefs
761  
762 Set the posting permissions for a public or private channel.
763  
764 L<API method documentation|https://api.slack.com/methods/admin.conversations.setConversationPrefs>
765  
766 Takes the following named parameters:
767  
768 =over 4
769  
770 =item * C<channel_id> - The channel to set the prefs for (string, required)
771  
772 =item * C<prefs> - The prefs for this channel in a stringified JSON format. (string, required)
773  
774 =back
775  
776 Resolves to a structure representing the response.
777  
778 =cut
779  
780 0 ▶async sub admin_conversations_set_conversation_prefs {
Subroutine admin_conversations_set_conversation_prefs: not called CC=2 SCAR=17.9
Pod documented
781 0 my ($self, %args) = @_;
782 0 my $uri = $self->endpoint(
783 'admin_conversations_set_conversation_prefs',
784 );
785 my $content = encode_json_utf8({
786 0 %args{grep { exists $args{$_} } qw(channel_id prefs)}
787 });
788 0 my ($res) = await $self->http_post(
789 $uri,
790 $content,
791 content_type => 'application/json; charset=utf-8',
792 );
793 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
794 0 return $res;
795 2 }
796  
797  
798 =head2 admin_conversations_set_teams
799  
800 Set the workspaces in an Enterprise grid org that connect to a public or private channel.
801  
802 L<API method documentation|https://api.slack.com/methods/admin.conversations.setTeams>
803  
804 Takes the following named parameters:
805  
806 =over 4
807  
808 =item * C<channel_id> - The encoded `channel_id` to add or remove to workspaces. (string, required)
809  
810 =item * C<team_id> - The workspace to which the channel belongs. Omit this argument if the channel is a cross-workspace shared channel. (string, optional)
811  
812 =item * C<target_team_ids> - A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide. (string, optional)
813  
814 =item * C<org_channel> - True if channel has to be converted to an org channel (boolean, optional)
815  
816 =back
817  
818 Resolves to a structure representing the response.
819  
820 =cut
821  
822 0 ▶async sub admin_conversations_set_teams {
Subroutine admin_conversations_set_teams: not called CC=2 SCAR=17.9
Pod documented
823 0 my ($self, %args) = @_;
824 0 my $uri = $self->endpoint(
825 'admin_conversations_set_teams',
826 );
827 my $content = encode_json_utf8({
828 0 %args{grep { exists $args{$_} } qw(channel_id team_id target_team_ids org_channel)}
829 });
830 0 my ($res) = await $self->http_post(
831 $uri,
832 $content,
833 content_type => 'application/json; charset=utf-8',
834 );
835 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
836 0 return $res;
837 2 }
838  
839  
840 =head2 admin_conversations_unarchive
841  
842 Unarchive a public or private channel.
843  
844 L<API method documentation|https://api.slack.com/methods/admin.conversations.unarchive>
845  
846 Takes the following named parameters:
847  
848 =over 4
849  
850 =item * C<channel_id> - The channel to unarchive. (string, required)
851  
852 =back
853  
854 Resolves to a structure representing the response.
855  
856 =cut
857  
858 0 ▶async sub admin_conversations_unarchive {
Subroutine admin_conversations_unarchive: not called CC=2 SCAR=17.9
Pod documented
859 0 my ($self, %args) = @_;
860 0 my $uri = $self->endpoint(
861 'admin_conversations_unarchive',
862 );
863 my $content = encode_json_utf8({
864 0 %args{grep { exists $args{$_} } qw(channel_id)}
865 });
866 0 my ($res) = await $self->http_post(
867 $uri,
868 $content,
869 content_type => 'application/json; charset=utf-8',
870 );
871 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
872 0 return $res;
873 2 }
874  
875  
876 =head2 admin_emoji_add
877  
878 Add an emoji.
879  
880 L<API method documentation|https://api.slack.com/methods/admin.emoji.add>
881  
882 Takes the following named parameters:
883  
884 =over 4
885  
886 =item * C<name> - The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included. (string, required)
887  
888 =item * C<url> - The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best. (string, required)
889  
890 =back
891  
892 Resolves to a structure representing the response.
893  
894 =cut
895  
896 0 ▶async sub admin_emoji_add {
Subroutine admin_emoji_add: not called CC=2 SCAR=17.9
Pod documented
897 0 my ($self, %args) = @_;
898 0 my $uri = $self->endpoint(
899 'admin_emoji_add',
900 );
901 my $content = encode_json_utf8({
902 0 %args{grep { exists $args{$_} } qw(name url)}
903 });
904 0 my ($res) = await $self->http_post(
905 $uri,
906 $content,
907 content_type => 'application/json; charset=utf-8',
908 );
909 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
910 0 return $res;
911 2 }
912  
913  
914 =head2 admin_emoji_add_alias
915  
916 Add an emoji alias.
917  
918 L<API method documentation|https://api.slack.com/methods/admin.emoji.addAlias>
919  
920 Takes the following named parameters:
921  
922 =over 4
923  
924 =item * C<name> - The name of the emoji to be aliased. Colons (`:myemoji:`) around the value are not required, although they may be included. (string, required)
925  
926 =item * C<alias_for> - The alias of the emoji. (string, required)
927  
928 =back
929  
930 Resolves to a structure representing the response.
931  
932 =cut
933  
934 0 ▶async sub admin_emoji_add_alias {
Subroutine admin_emoji_add_alias: not called CC=2 SCAR=17.9
Pod documented
935 0 my ($self, %args) = @_;
936 0 my $uri = $self->endpoint(
937 'admin_emoji_add_alias',
938 );
939 my $content = encode_json_utf8({
940 0 %args{grep { exists $args{$_} } qw(name alias_for)}
941 });
942 0 my ($res) = await $self->http_post(
943 $uri,
944 $content,
945 content_type => 'application/json; charset=utf-8',
946 );
947 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
948 0 return $res;
949 2 }
950  
951  
952 =head2 admin_emoji_list
953  
954 List emoji for an Enterprise Grid organization.
955  
956 L<API method documentation|https://api.slack.com/methods/admin.emoji.list>
957  
958 Takes the following named parameters:
959  
960 =over 4
961  
962 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page (string, optional)
963  
964 =item * C<limit> - The maximum number of items to return. Must be between 1 - 1000 both inclusive. (integer, optional)
965  
966 =back
967  
968 Resolves to a structure representing the response.
969  
970 =cut
971  
972 0 ▶async sub admin_emoji_list {
Subroutine admin_emoji_list: not called CC=2 SCAR=17.9
Pod documented
973 0 my ($self, %args) = @_;
974 my $uri = $self->endpoint(
975 'admin_emoji_list',
976 0 %args{grep { exists $args{$_} } qw(cursor limit)}
977 );
978 0 my ($res) = await $self->http_get(
979 $uri,
980 );
981 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
982 0 return $res;
983 2 }
984  
985  
986 =head2 admin_emoji_remove
987  
988 Remove an emoji across an Enterprise Grid organization
989  
990 L<API method documentation|https://api.slack.com/methods/admin.emoji.remove>
991  
992 Takes the following named parameters:
993  
994 =over 4
995  
996 =item * C<name> - The name of the emoji to be removed. Colons (`:myemoji:`) around the value are not required, although they may be included. (string, required)
997  
998 =back
999  
1000 Resolves to a structure representing the response.
1001  
1002 =cut
1003  
1004 0 ▶async sub admin_emoji_remove {
Subroutine admin_emoji_remove: not called CC=2 SCAR=17.9
Pod documented
1005 0 my ($self, %args) = @_;
1006 0 my $uri = $self->endpoint(
1007 'admin_emoji_remove',
1008 );
1009 my $content = encode_json_utf8({
1010 0 %args{grep { exists $args{$_} } qw(name)}
1011 });
1012 0 my ($res) = await $self->http_post(
1013 $uri,
1014 $content,
1015 content_type => 'application/json; charset=utf-8',
1016 );
1017 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1018 0 return $res;
1019 2 }
1020  
1021  
1022 =head2 admin_emoji_rename
1023  
1024 Rename an emoji.
1025  
1026 L<API method documentation|https://api.slack.com/methods/admin.emoji.rename>
1027  
1028 Takes the following named parameters:
1029  
1030 =over 4
1031  
1032 =item * C<name> - The name of the emoji to be renamed. Colons (`:myemoji:`) around the value are not required, although they may be included. (string, required)
1033  
1034 =item * C<new_name> - The new name of the emoji. (string, required)
1035  
1036 =back
1037  
1038 Resolves to a structure representing the response.
1039  
1040 =cut
1041  
1042 0 ▶async sub admin_emoji_rename {
Subroutine admin_emoji_rename: not called CC=2 SCAR=17.9
Pod documented
1043 0 my ($self, %args) = @_;
1044 0 my $uri = $self->endpoint(
1045 'admin_emoji_rename',
1046 );
1047 my $content = encode_json_utf8({
1048 0 %args{grep { exists $args{$_} } qw(name new_name)}
1049 });
1050 0 my ($res) = await $self->http_post(
1051 $uri,
1052 $content,
1053 content_type => 'application/json; charset=utf-8',
1054 );
1055 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1056 0 return $res;
1057 2 }
1058  
1059  
1060 =head2 admin_invite_requests_approve
1061  
1062 Approve a workspace invite request.
1063  
1064 L<API method documentation|https://api.slack.com/methods/admin.inviteRequests.approve>
1065  
1066 Takes the following named parameters:
1067  
1068 =over 4
1069  
1070 =item * C<team_id> - ID for the workspace where the invite request was made. (string, optional)
1071  
1072 =item * C<invite_request_id> - ID of the request to invite. (string, required)
1073  
1074 =back
1075  
1076 Resolves to a structure representing the response.
1077  
1078 =cut
1079  
1080 0 ▶async sub admin_invite_requests_approve {
Subroutine admin_invite_requests_approve: not called CC=2 SCAR=17.9
Pod documented
1081 0 my ($self, %args) = @_;
1082 0 my $uri = $self->endpoint(
1083 'admin_invite_requests_approve',
1084 );
1085 my $content = encode_json_utf8({
1086 0 %args{grep { exists $args{$_} } qw(team_id invite_request_id)}
1087 });
1088 0 my ($res) = await $self->http_post(
1089 $uri,
1090 $content,
1091 content_type => 'application/json; charset=utf-8',
1092 );
1093 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1094 0 return $res;
1095 2 }
1096  
1097  
1098 =head2 admin_invite_requests_approved_list
1099  
1100 List all approved workspace invite requests.
1101  
1102 L<API method documentation|https://api.slack.com/methods/admin.inviteRequests.approved.list>
1103  
1104 Takes the following named parameters:
1105  
1106 =over 4
1107  
1108 =item * C<team_id> - ID for the workspace where the invite requests were made. (string, optional)
1109  
1110 =item * C<cursor> - Value of the `next_cursor` field sent as part of the previous API response (string, optional)
1111  
1112 =item * C<limit> - The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive (integer, optional)
1113  
1114 =back
1115  
1116 Resolves to a structure representing the response.
1117  
1118 =cut
1119  
1120 0 ▶async sub admin_invite_requests_approved_list {
Subroutine admin_invite_requests_approved_list: not called CC=2 SCAR=17.9
Pod documented
1121 0 my ($self, %args) = @_;
1122 0 my $uri = $self->endpoint(
1123 'admin_invite_requests_approved_list',
1124 );
1125 my $content = encode_json_utf8({
1126 0 %args{grep { exists $args{$_} } qw(team_id cursor limit)}
1127 });
1128 0 my ($res) = await $self->http_post(
1129 $uri,
1130 $content,
1131 content_type => 'application/json; charset=utf-8',
1132 );
1133 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1134 0 return $res;
1135 2 }
1136  
1137  
1138 =head2 admin_invite_requests_denied_list
1139  
1140 List all denied workspace invite requests.
1141  
1142 L<API method documentation|https://api.slack.com/methods/admin.inviteRequests.denied.list>
1143  
1144 Takes the following named parameters:
1145  
1146 =over 4
1147  
1148 =item * C<team_id> - ID for the workspace where the invite requests were made. (string, optional)
1149  
1150 =item * C<cursor> - Value of the `next_cursor` field sent as part of the previous API response (string, optional)
1151  
1152 =item * C<limit> - The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive (integer, optional)
1153  
1154 =back
1155  
1156 Resolves to a structure representing the response.
1157  
1158 =cut
1159  
1160 0 ▶async sub admin_invite_requests_denied_list {
Subroutine admin_invite_requests_denied_list: not called CC=2 SCAR=17.9
Pod documented
1161 0 my ($self, %args) = @_;
1162 0 my $uri = $self->endpoint(
1163 'admin_invite_requests_denied_list',
1164 );
1165 my $content = encode_json_utf8({
1166 0 %args{grep { exists $args{$_} } qw(team_id cursor limit)}
1167 });
1168 0 my ($res) = await $self->http_post(
1169 $uri,
1170 $content,
1171 content_type => 'application/json; charset=utf-8',
1172 );
1173 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1174 0 return $res;
1175 2 }
1176  
1177  
1178 =head2 admin_invite_requests_deny
1179  
1180 Deny a workspace invite request.
1181  
1182 L<API method documentation|https://api.slack.com/methods/admin.inviteRequests.deny>
1183  
1184 Takes the following named parameters:
1185  
1186 =over 4
1187  
1188 =item * C<team_id> - ID for the workspace where the invite request was made. (string, optional)
1189  
1190 =item * C<invite_request_id> - ID of the request to invite. (string, required)
1191  
1192 =back
1193  
1194 Resolves to a structure representing the response.
1195  
1196 =cut
1197  
1198 0 ▶async sub admin_invite_requests_deny {
Subroutine admin_invite_requests_deny: not called CC=2 SCAR=17.9
Pod documented
1199 0 my ($self, %args) = @_;
1200 0 my $uri = $self->endpoint(
1201 'admin_invite_requests_deny',
1202 );
1203 my $content = encode_json_utf8({
1204 0 %args{grep { exists $args{$_} } qw(team_id invite_request_id)}
1205 });
1206 0 my ($res) = await $self->http_post(
1207 $uri,
1208 $content,
1209 content_type => 'application/json; charset=utf-8',
1210 );
1211 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1212 0 return $res;
1213 2 }
1214  
1215  
1216 =head2 admin_invite_requests_list
1217  
1218 List all pending workspace invite requests.
1219  
1220 L<API method documentation|https://api.slack.com/methods/admin.inviteRequests.list>
1221  
1222 Takes the following named parameters:
1223  
1224 =over 4
1225  
1226 =item * C<team_id> - ID for the workspace where the invite requests were made. (string, optional)
1227  
1228 =item * C<cursor> - Value of the `next_cursor` field sent as part of the previous API response (string, optional)
1229  
1230 =item * C<limit> - The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive (integer, optional)
1231  
1232 =back
1233  
1234 Resolves to a structure representing the response.
1235  
1236 =cut
1237  
1238 0 ▶async sub admin_invite_requests_list {
Subroutine admin_invite_requests_list: not called CC=2 SCAR=17.9
Pod documented
1239 0 my ($self, %args) = @_;
1240 0 my $uri = $self->endpoint(
1241 'admin_invite_requests_list',
1242 );
1243 my $content = encode_json_utf8({
1244 0 %args{grep { exists $args{$_} } qw(team_id cursor limit)}
1245 });
1246 0 my ($res) = await $self->http_post(
1247 $uri,
1248 $content,
1249 content_type => 'application/json; charset=utf-8',
1250 );
1251 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1252 0 return $res;
1253 2 }
1254  
1255  
1256 =head2 admin_teams_admins_list
1257  
1258 List all of the admins on a given workspace.
1259  
1260 L<API method documentation|https://api.slack.com/methods/admin.teams.admins.list>
1261  
1262 Takes the following named parameters:
1263  
1264 =over 4
1265  
1266 =item * C<limit> - The maximum number of items to return. (integer, optional)
1267  
1268 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. (string, optional)
1269  
1270 =item * C<team_id> - (string, required)
1271  
1272 =back
1273  
1274 Resolves to a structure representing the response.
1275  
1276 =cut
1277  
1278 0 ▶async sub admin_teams_admins_list {
Subroutine admin_teams_admins_list: not called CC=2 SCAR=17.9
Pod documented
1279 0 my ($self, %args) = @_;
1280 my $uri = $self->endpoint(
1281 'admin_teams_admins_list',
1282 0 %args{grep { exists $args{$_} } qw(limit cursor team_id)}
1283 );
1284 0 my ($res) = await $self->http_get(
1285 $uri,
1286 );
1287 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1288 0 return $res;
1289 2 }
1290  
1291  
1292 =head2 admin_teams_create
1293  
1294 Create an Enterprise team.
1295  
1296 L<API method documentation|https://api.slack.com/methods/admin.teams.create>
1297  
1298 Takes the following named parameters:
1299  
1300 =over 4
1301  
1302 =item * C<team_domain> - Team domain (for example, slacksoftballteam). (string, required)
1303  
1304 =item * C<team_name> - Team name (for example, Slack Softball Team). (string, required)
1305  
1306 =item * C<team_description> - Description for the team. (string, optional)
1307  
1308 =item * C<team_discoverability> - Who can join the team. A team's discoverability can be `open`, `closed`, `invite_only`, or `unlisted`. (string, optional)
1309  
1310 =back
1311  
1312 Resolves to a structure representing the response.
1313  
1314 =cut
1315  
1316 0 ▶async sub admin_teams_create {
Subroutine admin_teams_create: not called CC=2 SCAR=17.9
Pod documented
1317 0 my ($self, %args) = @_;
1318 0 my $uri = $self->endpoint(
1319 'admin_teams_create',
1320 );
1321 my $content = encode_json_utf8({
1322 0 %args{grep { exists $args{$_} } qw(team_domain team_name team_description team_discoverability)}
1323 });
1324 0 my ($res) = await $self->http_post(
1325 $uri,
1326 $content,
1327 content_type => 'application/json; charset=utf-8',
1328 );
1329 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1330 0 return $res;
1331 2 }
1332  
1333  
1334 =head2 admin_teams_list
1335  
1336 List all teams on an Enterprise organization
1337  
1338 L<API method documentation|https://api.slack.com/methods/admin.teams.list>
1339  
1340 Takes the following named parameters:
1341  
1342 =over 4
1343  
1344 =item * C<limit> - The maximum number of items to return. Must be between 1 - 100 both inclusive. (integer, optional)
1345  
1346 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. (string, optional)
1347  
1348 =back
1349  
1350 Resolves to a structure representing the response.
1351  
1352 =cut
1353  
1354 0 ▶async sub admin_teams_list {
Subroutine admin_teams_list: not called CC=2 SCAR=17.9
Pod documented
1355 0 my ($self, %args) = @_;
1356 0 my $uri = $self->endpoint(
1357 'admin_teams_list',
1358 );
1359 my $content = encode_json_utf8({
1360 0 %args{grep { exists $args{$_} } qw(limit cursor)}
1361 });
1362 0 my ($res) = await $self->http_post(
1363 $uri,
1364 $content,
1365 content_type => 'application/json; charset=utf-8',
1366 );
1367 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1368 0 return $res;
1369 2 }
1370  
1371  
1372 =head2 admin_teams_owners_list
1373  
1374 List all of the owners on a given workspace.
1375  
1376 L<API method documentation|https://api.slack.com/methods/admin.teams.owners.list>
1377  
1378 Takes the following named parameters:
1379  
1380 =over 4
1381  
1382 =item * C<team_id> - (string, required)
1383  
1384 =item * C<limit> - The maximum number of items to return. Must be between 1 - 1000 both inclusive. (integer, optional)
1385  
1386 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. (string, optional)
1387  
1388 =back
1389  
1390 Resolves to a structure representing the response.
1391  
1392 =cut
1393  
1394 0 ▶async sub admin_teams_owners_list {
Subroutine admin_teams_owners_list: not called CC=2 SCAR=17.9
Pod documented
1395 0 my ($self, %args) = @_;
1396 my $uri = $self->endpoint(
1397 'admin_teams_owners_list',
1398 0 %args{grep { exists $args{$_} } qw(team_id limit cursor)}
1399 );
1400 0 my ($res) = await $self->http_get(
1401 $uri,
1402 );
1403 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1404 0 return $res;
1405 2 }
1406  
1407  
1408 =head2 admin_teams_settings_info
1409  
1410 Fetch information about settings in a workspace
1411  
1412 L<API method documentation|https://api.slack.com/methods/admin.teams.settings.info>
1413  
1414 Takes the following named parameters:
1415  
1416 =over 4
1417  
1418 =item * C<team_id> - (string, required)
1419  
1420 =back
1421  
1422 Resolves to a structure representing the response.
1423  
1424 =cut
1425  
1426 0 ▶async sub admin_teams_settings_info {
Subroutine admin_teams_settings_info: not called CC=2 SCAR=17.9
Pod documented
1427 0 my ($self, %args) = @_;
1428 0 my $uri = $self->endpoint(
1429 'admin_teams_settings_info',
1430 );
1431 my $content = encode_json_utf8({
1432 0 %args{grep { exists $args{$_} } qw(team_id)}
1433 });
1434 0 my ($res) = await $self->http_post(
1435 $uri,
1436 $content,
1437 content_type => 'application/json; charset=utf-8',
1438 );
1439 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1440 0 return $res;
1441 2 }
1442  
1443  
1444 =head2 admin_teams_settings_set_default_channels
1445  
1446 Set the default channels of a workspace.
1447  
1448 L<API method documentation|https://api.slack.com/methods/admin.teams.settings.setDefaultChannels>
1449  
1450 Takes the following named parameters:
1451  
1452 =over 4
1453  
1454 =item * C<team_id> - ID for the workspace to set the default channel for. (string, required)
1455  
1456 =item * C<channel_ids> - An array of channel IDs. (string, required)
1457  
1458 =back
1459  
1460 Resolves to a structure representing the response.
1461  
1462 =cut
1463  
1464 0 ▶async sub admin_teams_settings_set_default_channels {
Subroutine admin_teams_settings_set_default_channels: not called CC=2 SCAR=17.9
Pod documented
1465 0 my ($self, %args) = @_;
1466 0 my $uri = $self->endpoint(
1467 'admin_teams_settings_set_default_channels',
1468 );
1469 my $content = encode_json_utf8({
1470 0 %args{grep { exists $args{$_} } qw(team_id channel_ids)}
1471 });
1472 0 my ($res) = await $self->http_post(
1473 $uri,
1474 $content,
1475 content_type => 'application/json; charset=utf-8',
1476 );
1477 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1478 0 return $res;
1479 2 }
1480  
1481  
1482 =head2 admin_teams_settings_set_description
1483  
1484 Set the description of a given workspace.
1485  
1486 L<API method documentation|https://api.slack.com/methods/admin.teams.settings.setDescription>
1487  
1488 Takes the following named parameters:
1489  
1490 =over 4
1491  
1492 =item * C<team_id> - ID for the workspace to set the description for. (string, required)
1493  
1494 =item * C<description> - The new description for the workspace. (string, required)
1495  
1496 =back
1497  
1498 Resolves to a structure representing the response.
1499  
1500 =cut
1501  
1502 0 ▶async sub admin_teams_settings_set_description {
Subroutine admin_teams_settings_set_description: not called CC=2 SCAR=17.9
Pod documented
1503 0 my ($self, %args) = @_;
1504 0 my $uri = $self->endpoint(
1505 'admin_teams_settings_set_description',
1506 );
1507 my $content = encode_json_utf8({
1508 0 %args{grep { exists $args{$_} } qw(team_id description)}
1509 });
1510 0 my ($res) = await $self->http_post(
1511 $uri,
1512 $content,
1513 content_type => 'application/json; charset=utf-8',
1514 );
1515 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1516 0 return $res;
1517 2 }
1518  
1519  
1520 =head2 admin_teams_settings_set_discoverability
1521  
1522 An API method that allows admins to set the discoverability of a given workspace
1523  
1524 L<API method documentation|https://api.slack.com/methods/admin.teams.settings.setDiscoverability>
1525  
1526 Takes the following named parameters:
1527  
1528 =over 4
1529  
1530 =item * C<team_id> - The ID of the workspace to set discoverability on. (string, required)
1531  
1532 =item * C<discoverability> - This workspace's discovery setting. It must be set to one of `open`, `invite_only`, `closed`, or `unlisted`. (string, required)
1533  
1534 =back
1535  
1536 Resolves to a structure representing the response.
1537  
1538 =cut
1539  
1540 0 ▶async sub admin_teams_settings_set_discoverability {
Subroutine admin_teams_settings_set_discoverability: not called CC=2 SCAR=17.9
Pod documented
1541 0 my ($self, %args) = @_;
1542 0 my $uri = $self->endpoint(
1543 'admin_teams_settings_set_discoverability',
1544 );
1545 my $content = encode_json_utf8({
1546 0 %args{grep { exists $args{$_} } qw(team_id discoverability)}
1547 });
1548 0 my ($res) = await $self->http_post(
1549 $uri,
1550 $content,
1551 content_type => 'application/json; charset=utf-8',
1552 );
1553 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1554 0 return $res;
1555 2 }
1556  
1557  
1558 =head2 admin_teams_settings_set_icon
1559  
1560 Sets the icon of a workspace.
1561  
1562 L<API method documentation|https://api.slack.com/methods/admin.teams.settings.setIcon>
1563  
1564 Takes the following named parameters:
1565  
1566 =over 4
1567  
1568 =item * C<image_url> - Image URL for the icon (string, required)
1569  
1570 =item * C<team_id> - ID for the workspace to set the icon for. (string, required)
1571  
1572 =back
1573  
1574 Resolves to a structure representing the response.
1575  
1576 =cut
1577  
1578 0 ▶async sub admin_teams_settings_set_icon {
Subroutine admin_teams_settings_set_icon: not called CC=2 SCAR=17.9
Pod documented
1579 0 my ($self, %args) = @_;
1580 0 my $uri = $self->endpoint(
1581 'admin_teams_settings_set_icon',
1582 );
1583 my $content = encode_json_utf8({
1584 0 %args{grep { exists $args{$_} } qw(image_url team_id)}
1585 });
1586 0 my ($res) = await $self->http_post(
1587 $uri,
1588 $content,
1589 content_type => 'application/json; charset=utf-8',
1590 );
1591 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1592 0 return $res;
1593 2 }
1594  
1595  
1596 =head2 admin_teams_settings_set_name
1597  
1598 Set the name of a given workspace.
1599  
1600 L<API method documentation|https://api.slack.com/methods/admin.teams.settings.setName>
1601  
1602 Takes the following named parameters:
1603  
1604 =over 4
1605  
1606 =item * C<team_id> - ID for the workspace to set the name for. (string, required)
1607  
1608 =item * C<name> - The new name of the workspace. (string, required)
1609  
1610 =back
1611  
1612 Resolves to a structure representing the response.
1613  
1614 =cut
1615  
1616 0 ▶async sub admin_teams_settings_set_name {
Subroutine admin_teams_settings_set_name: not called CC=2 SCAR=17.9
Pod documented
1617 0 my ($self, %args) = @_;
1618 0 my $uri = $self->endpoint(
1619 'admin_teams_settings_set_name',
1620 );
1621 my $content = encode_json_utf8({
1622 0 %args{grep { exists $args{$_} } qw(team_id name)}
1623 });
1624 0 my ($res) = await $self->http_post(
1625 $uri,
1626 $content,
1627 content_type => 'application/json; charset=utf-8',
1628 );
1629 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1630 0 return $res;
1631 2 }
1632  
1633  
1634 =head2 admin_usergroups_add_channels
1635  
1636 Add one or more default channels to an IDP group.
1637  
1638 L<API method documentation|https://api.slack.com/methods/admin.usergroups.addChannels>
1639  
1640 Takes the following named parameters:
1641  
1642 =over 4
1643  
1644 =item * C<usergroup_id> - ID of the IDP group to add default channels for. (string, required)
1645  
1646 =item * C<team_id> - The workspace to add default channels in. (string, optional)
1647  
1648 =item * C<channel_ids> - Comma separated string of channel IDs. (string, required)
1649  
1650 =back
1651  
1652 Resolves to a structure representing the response.
1653  
1654 =cut
1655  
1656 0 ▶async sub admin_usergroups_add_channels {
Subroutine admin_usergroups_add_channels: not called CC=2 SCAR=17.9
Pod documented
1657 0 my ($self, %args) = @_;
1658 0 my $uri = $self->endpoint(
1659 'admin_usergroups_add_channels',
1660 );
1661 my $content = encode_json_utf8({
1662 0 %args{grep { exists $args{$_} } qw(usergroup_id team_id channel_ids)}
1663 });
1664 0 my ($res) = await $self->http_post(
1665 $uri,
1666 $content,
1667 content_type => 'application/json; charset=utf-8',
1668 );
1669 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1670 0 return $res;
1671 2 }
1672  
1673  
1674 =head2 admin_usergroups_add_teams
1675  
1676 Associate one or more default workspaces with an organization-wide IDP group.
1677  
1678 L<API method documentation|https://api.slack.com/methods/admin.usergroups.addTeams>
1679  
1680 Takes the following named parameters:
1681  
1682 =over 4
1683  
1684 =item * C<usergroup_id> - An encoded usergroup (IDP Group) ID. (string, required)
1685  
1686 =item * C<team_ids> - A comma separated list of encoded team (workspace) IDs. Each workspace *MUST* belong to the organization associated with the token. (string, required)
1687  
1688 =item * C<auto_provision> - When `true`, this method automatically creates new workspace accounts for the IDP group members. (boolean, optional)
1689  
1690 =back
1691  
1692 Resolves to a structure representing the response.
1693  
1694 =cut
1695  
1696 0 ▶async sub admin_usergroups_add_teams {
Subroutine admin_usergroups_add_teams: not called CC=2 SCAR=17.9
Pod documented
1697 0 my ($self, %args) = @_;
1698 0 my $uri = $self->endpoint(
1699 'admin_usergroups_add_teams',
1700 );
1701 my $content = encode_json_utf8({
1702 0 %args{grep { exists $args{$_} } qw(usergroup_id team_ids auto_provision)}
1703 });
1704 0 my ($res) = await $self->http_post(
1705 $uri,
1706 $content,
1707 content_type => 'application/json; charset=utf-8',
1708 );
1709 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1710 0 return $res;
1711 2 }
1712  
1713  
1714 =head2 admin_usergroups_list_channels
1715  
1716 List the channels linked to an org-level IDP group (user group).
1717  
1718 L<API method documentation|https://api.slack.com/methods/admin.usergroups.listChannels>
1719  
1720 Takes the following named parameters:
1721  
1722 =over 4
1723  
1724 =item * C<usergroup_id> - ID of the IDP group to list default channels for. (string, required)
1725  
1726 =item * C<team_id> - ID of the the workspace. (string, optional)
1727  
1728 =item * C<include_num_members> - Flag to include or exclude the count of members per channel. (boolean, optional)
1729  
1730 =back
1731  
1732 Resolves to a structure representing the response.
1733  
1734 =cut
1735  
1736 0 ▶async sub admin_usergroups_list_channels {
Subroutine admin_usergroups_list_channels: not called CC=2 SCAR=17.9
Pod documented
1737 0 my ($self, %args) = @_;
1738 0 my $uri = $self->endpoint(
1739 'admin_usergroups_list_channels',
1740 );
1741 my $content = encode_json_utf8({
1742 0 %args{grep { exists $args{$_} } qw(usergroup_id team_id include_num_members)}
1743 });
1744 0 my ($res) = await $self->http_post(
1745 $uri,
1746 $content,
1747 content_type => 'application/json; charset=utf-8',
1748 );
1749 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1750 0 return $res;
1751 2 }
1752  
1753  
1754 =head2 admin_usergroups_remove_channels
1755  
1756 Remove one or more default channels from an org-level IDP group (user group).
1757  
1758 L<API method documentation|https://api.slack.com/methods/admin.usergroups.removeChannels>
1759  
1760 Takes the following named parameters:
1761  
1762 =over 4
1763  
1764 =item * C<usergroup_id> - ID of the IDP Group (string, required)
1765  
1766 =item * C<channel_ids> - Comma-separated string of channel IDs (string, required)
1767  
1768 =back
1769  
1770 Resolves to a structure representing the response.
1771  
1772 =cut
1773  
1774 0 ▶async sub admin_usergroups_remove_channels {
Subroutine admin_usergroups_remove_channels: not called CC=2 SCAR=17.9
Pod documented
1775 0 my ($self, %args) = @_;
1776 0 my $uri = $self->endpoint(
1777 'admin_usergroups_remove_channels',
1778 );
1779 my $content = encode_json_utf8({
1780 0 %args{grep { exists $args{$_} } qw(usergroup_id channel_ids)}
1781 });
1782 0 my ($res) = await $self->http_post(
1783 $uri,
1784 $content,
1785 content_type => 'application/json; charset=utf-8',
1786 );
1787 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1788 0 return $res;
1789 2 }
1790  
1791  
1792 =head2 admin_users_assign
1793  
1794 Add an Enterprise user to a workspace.
1795  
1796 L<API method documentation|https://api.slack.com/methods/admin.users.assign>
1797  
1798 Takes the following named parameters:
1799  
1800 =over 4
1801  
1802 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
1803  
1804 =item * C<user_id> - The ID of the user to add to the workspace. (string, required)
1805  
1806 =item * C<is_restricted> - True if user should be added to the workspace as a guest. (boolean, optional)
1807  
1808 =item * C<is_ultra_restricted> - True if user should be added to the workspace as a single-channel guest. (boolean, optional)
1809  
1810 =item * C<channel_ids> - Comma separated values of channel IDs to add user in the new workspace. (string, optional)
1811  
1812 =back
1813  
1814 Resolves to a structure representing the response.
1815  
1816 =cut
1817  
1818 0 ▶async sub admin_users_assign {
Subroutine admin_users_assign: not called CC=2 SCAR=17.9
Pod documented
1819 0 my ($self, %args) = @_;
1820 0 my $uri = $self->endpoint(
1821 'admin_users_assign',
1822 );
1823 my $content = encode_json_utf8({
1824 0 %args{grep { exists $args{$_} } qw(team_id user_id is_restricted is_ultra_restricted channel_ids)}
1825 });
1826 0 my ($res) = await $self->http_post(
1827 $uri,
1828 $content,
1829 content_type => 'application/json; charset=utf-8',
1830 );
1831 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1832 0 return $res;
1833 2 }
1834  
1835  
1836 =head2 admin_users_invite
1837  
1838 Invite a user to a workspace.
1839  
1840 L<API method documentation|https://api.slack.com/methods/admin.users.invite>
1841  
1842 Takes the following named parameters:
1843  
1844 =over 4
1845  
1846 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
1847  
1848 =item * C<email> - The email address of the person to invite. (string, required)
1849  
1850 =item * C<channel_ids> - A comma-separated list of `channel_id`s for this user to join. At least one channel is required. (string, required)
1851  
1852 =item * C<custom_message> - An optional message to send to the user in the invite email. (string, optional)
1853  
1854 =item * C<real_name> - Full name of the user. (string, optional)
1855  
1856 =item * C<resend> - Allow this invite to be resent in the future if a user has not signed up yet. (default: false) (boolean, optional)
1857  
1858 =item * C<is_restricted> - Is this user a multi-channel guest user? (default: false) (boolean, optional)
1859  
1860 =item * C<is_ultra_restricted> - Is this user a single channel guest user? (default: false) (boolean, optional)
1861  
1862 =item * C<guest_expiration_ts> - Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date. (string, optional)
1863  
1864 =back
1865  
1866 Resolves to a structure representing the response.
1867  
1868 =cut
1869  
1870 0 ▶async sub admin_users_invite {
Subroutine admin_users_invite: not called CC=2 SCAR=17.9
Pod documented
1871 0 my ($self, %args) = @_;
1872 0 my $uri = $self->endpoint(
1873 'admin_users_invite',
1874 );
1875 my $content = encode_json_utf8({
1876 0 %args{grep { exists $args{$_} } qw(team_id email channel_ids custom_message real_name resend is_restricted is_ultra_restricted guest_expiration_ts)}
1877 });
1878 0 my ($res) = await $self->http_post(
1879 $uri,
1880 $content,
1881 content_type => 'application/json; charset=utf-8',
1882 );
1883 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1884 0 return $res;
1885 2 }
1886  
1887  
1888 =head2 admin_users_list
1889  
1890 List users on a workspace
1891  
1892 L<API method documentation|https://api.slack.com/methods/admin.users.list>
1893  
1894 Takes the following named parameters:
1895  
1896 =over 4
1897  
1898 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
1899  
1900 =item * C<cursor> - Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. (string, optional)
1901  
1902 =item * C<limit> - Limit for how many users to be retrieved per page (integer, optional)
1903  
1904 =back
1905  
1906 Resolves to a structure representing the response.
1907  
1908 =cut
1909  
1910 0 ▶async sub admin_users_list {
Subroutine admin_users_list: not called CC=2 SCAR=17.9
Pod documented
1911 0 my ($self, %args) = @_;
1912 0 my $uri = $self->endpoint(
1913 'admin_users_list',
1914 );
1915 my $content = encode_json_utf8({
1916 0 %args{grep { exists $args{$_} } qw(team_id cursor limit)}
1917 });
1918 0 my ($res) = await $self->http_post(
1919 $uri,
1920 $content,
1921 content_type => 'application/json; charset=utf-8',
1922 );
1923 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1924 0 return $res;
1925 2 }
1926  
1927  
1928 =head2 admin_users_remove
1929  
1930 Remove a user from a workspace.
1931  
1932 L<API method documentation|https://api.slack.com/methods/admin.users.remove>
1933  
1934 Takes the following named parameters:
1935  
1936 =over 4
1937  
1938 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
1939  
1940 =item * C<user_id> - The ID of the user to remove. (string, required)
1941  
1942 =back
1943  
1944 Resolves to a structure representing the response.
1945  
1946 =cut
1947  
1948 0 ▶async sub admin_users_remove {
Subroutine admin_users_remove: not called CC=2 SCAR=17.9
Pod documented
1949 0 my ($self, %args) = @_;
1950 0 my $uri = $self->endpoint(
1951 'admin_users_remove',
1952 );
1953 my $content = encode_json_utf8({
1954 0 %args{grep { exists $args{$_} } qw(team_id user_id)}
1955 });
1956 0 my ($res) = await $self->http_post(
1957 $uri,
1958 $content,
1959 content_type => 'application/json; charset=utf-8',
1960 );
1961 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
1962 0 return $res;
1963 2 }
1964  
1965  
1966 =head2 admin_users_session_invalidate
1967  
1968 Invalidate a single session for a user by session_id
1969  
1970 L<API method documentation|https://api.slack.com/methods/admin.users.session.invalidate>
1971  
1972 Takes the following named parameters:
1973  
1974 =over 4
1975  
1976 =item * C<team_id> - ID of the team that the session belongs to (string, required)
1977  
1978 =item * C<session_id> - (integer, required)
1979  
1980 =back
1981  
1982 Resolves to a structure representing the response.
1983  
1984 =cut
1985  
1986 0 ▶async sub admin_users_session_invalidate {
Subroutine admin_users_session_invalidate: not called CC=2 SCAR=17.9
Pod documented
1987 0 my ($self, %args) = @_;
1988 0 my $uri = $self->endpoint(
1989 'admin_users_session_invalidate',
1990 );
1991 my $content = encode_json_utf8({
1992 0 %args{grep { exists $args{$_} } qw(team_id session_id)}
1993 });
1994 0 my ($res) = await $self->http_post(
1995 $uri,
1996 $content,
1997 content_type => 'application/json; charset=utf-8',
1998 );
1999 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2000 0 return $res;
2001 2 }
2002  
2003  
2004 =head2 admin_users_session_reset
2005  
2006 Wipes all valid sessions on all devices for a given user
2007  
2008 L<API method documentation|https://api.slack.com/methods/admin.users.session.reset>
2009  
2010 Takes the following named parameters:
2011  
2012 =over 4
2013  
2014 =item * C<user_id> - The ID of the user to wipe sessions for (string, required)
2015  
2016 =item * C<mobile_only> - Only expire mobile sessions (default: false) (boolean, optional)
2017  
2018 =item * C<web_only> - Only expire web sessions (default: false) (boolean, optional)
2019  
2020 =back
2021  
2022 Resolves to a structure representing the response.
2023  
2024 =cut
2025  
2026 0 ▶async sub admin_users_session_reset {
Subroutine admin_users_session_reset: not called CC=2 SCAR=17.9
Pod documented
2027 0 my ($self, %args) = @_;
2028 0 my $uri = $self->endpoint(
2029 'admin_users_session_reset',
2030 );
2031 my $content = encode_json_utf8({
2032 0 %args{grep { exists $args{$_} } qw(user_id mobile_only web_only)}
2033 });
2034 0 my ($res) = await $self->http_post(
2035 $uri,
2036 $content,
2037 content_type => 'application/json; charset=utf-8',
2038 );
2039 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2040 0 return $res;
2041 2 }
2042  
2043  
2044 =head2 admin_users_set_admin
2045  
2046 Set an existing guest, regular user, or owner to be an admin user.
2047  
2048 L<API method documentation|https://api.slack.com/methods/admin.users.setAdmin>
2049  
2050 Takes the following named parameters:
2051  
2052 =over 4
2053  
2054 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
2055  
2056 =item * C<user_id> - The ID of the user to designate as an admin. (string, required)
2057  
2058 =back
2059  
2060 Resolves to a structure representing the response.
2061  
2062 =cut
2063  
2064 0 ▶async sub admin_users_set_admin {
Subroutine admin_users_set_admin: not called CC=2 SCAR=17.9
Pod documented
2065 0 my ($self, %args) = @_;
2066 0 my $uri = $self->endpoint(
2067 'admin_users_set_admin',
2068 );
2069 my $content = encode_json_utf8({
2070 0 %args{grep { exists $args{$_} } qw(team_id user_id)}
2071 });
2072 0 my ($res) = await $self->http_post(
2073 $uri,
2074 $content,
2075 content_type => 'application/json; charset=utf-8',
2076 );
2077 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2078 0 return $res;
2079 2 }
2080  
2081  
2082 =head2 admin_users_set_expiration
2083  
2084 Set an expiration for a guest user
2085  
2086 L<API method documentation|https://api.slack.com/methods/admin.users.setExpiration>
2087  
2088 Takes the following named parameters:
2089  
2090 =over 4
2091  
2092 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
2093  
2094 =item * C<user_id> - The ID of the user to set an expiration for. (string, required)
2095  
2096 =item * C<expiration_ts> - Timestamp when guest account should be disabled. (integer, required)
2097  
2098 =back
2099  
2100 Resolves to a structure representing the response.
2101  
2102 =cut
2103  
2104 0 ▶async sub admin_users_set_expiration {
Subroutine admin_users_set_expiration: not called CC=2 SCAR=17.9
Pod documented
2105 0 my ($self, %args) = @_;
2106 0 my $uri = $self->endpoint(
2107 'admin_users_set_expiration',
2108 );
2109 my $content = encode_json_utf8({
2110 0 %args{grep { exists $args{$_} } qw(team_id user_id expiration_ts)}
2111 });
2112 0 my ($res) = await $self->http_post(
2113 $uri,
2114 $content,
2115 content_type => 'application/json; charset=utf-8',
2116 );
2117 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2118 0 return $res;
2119 2 }
2120  
2121  
2122 =head2 admin_users_set_owner
2123  
2124 Set an existing guest, regular user, or admin user to be a workspace owner.
2125  
2126 L<API method documentation|https://api.slack.com/methods/admin.users.setOwner>
2127  
2128 Takes the following named parameters:
2129  
2130 =over 4
2131  
2132 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
2133  
2134 =item * C<user_id> - Id of the user to promote to owner. (string, required)
2135  
2136 =back
2137  
2138 Resolves to a structure representing the response.
2139  
2140 =cut
2141  
2142 0 ▶async sub admin_users_set_owner {
Subroutine admin_users_set_owner: not called CC=2 SCAR=17.9
Pod documented
2143 0 my ($self, %args) = @_;
2144 0 my $uri = $self->endpoint(
2145 'admin_users_set_owner',
2146 );
2147 my $content = encode_json_utf8({
2148 0 %args{grep { exists $args{$_} } qw(team_id user_id)}
2149 });
2150 0 my ($res) = await $self->http_post(
2151 $uri,
2152 $content,
2153 content_type => 'application/json; charset=utf-8',
2154 );
2155 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2156 0 return $res;
2157 2 }
2158  
2159  
2160 =head2 admin_users_set_regular
2161  
2162 Set an existing guest user, admin user, or owner to be a regular user.
2163  
2164 L<API method documentation|https://api.slack.com/methods/admin.users.setRegular>
2165  
2166 Takes the following named parameters:
2167  
2168 =over 4
2169  
2170 =item * C<team_id> - The ID (`T1234`) of the workspace. (string, required)
2171  
2172 =item * C<user_id> - The ID of the user to designate as a regular user. (string, required)
2173  
2174 =back
2175  
2176 Resolves to a structure representing the response.
2177  
2178 =cut
2179  
2180 0 ▶async sub admin_users_set_regular {
Subroutine admin_users_set_regular: not called CC=2 SCAR=17.9
Pod documented
2181 0 my ($self, %args) = @_;
2182 0 my $uri = $self->endpoint(
2183 'admin_users_set_regular',
2184 );
2185 my $content = encode_json_utf8({
2186 0 %args{grep { exists $args{$_} } qw(team_id user_id)}
2187 });
2188 0 my ($res) = await $self->http_post(
2189 $uri,
2190 $content,
2191 content_type => 'application/json; charset=utf-8',
2192 );
2193 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2194 0 return $res;
2195 2 }
2196  
2197  
2198 =head2 api_test
2199  
2200 Checks API calling code.
2201  
2202 L<API method documentation|https://api.slack.com/methods/api.test>
2203  
2204 Takes the following named parameters:
2205  
2206 =over 4
2207  
2208 =item * C<error> - Error response to return (string, optional)
2209  
2210 =item * C<foo> - example property to return (string, optional)
2211  
2212 =back
2213  
2214 Resolves to a structure representing the response.
2215  
2216 =cut
2217  
2218 0 ▶async sub api_test {
Subroutine api_test: not called CC=2 SCAR=17.9
Pod documented
2219 0 my ($self, %args) = @_;
2220 0 my $uri = $self->endpoint(
2221 'api_test',
2222 );
2223 my $content = encode_json_utf8({
2224 0 %args{grep { exists $args{$_} } qw(error foo)}
2225 });
2226 0 my ($res) = await $self->http_post(
2227 $uri,
2228 $content,
2229 content_type => 'application/json; charset=utf-8',
2230 );
2231 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2232 0 return $res;
2233 2 }
2234  
2235  
2236 =head2 apps_event_authorizations_list
2237  
2238 Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to.
2239  
2240 L<API method documentation|https://api.slack.com/methods/apps.event.authorizations.list>
2241  
2242 Takes the following named parameters:
2243  
2244 =over 4
2245  
2246 =item * C<event_context> - (string, required)
2247  
2248 =item * C<cursor> - (string, optional)
2249  
2250 =item * C<limit> - (integer, optional)
2251  
2252 =back
2253  
2254 Resolves to a structure representing the response.
2255  
2256 =cut
2257  
2258 0 ▶async sub apps_event_authorizations_list {
Subroutine apps_event_authorizations_list: not called CC=2 SCAR=17.9
Pod documented
2259 0 my ($self, %args) = @_;
2260 0 my $uri = $self->endpoint(
2261 'apps_event_authorizations_list',
2262 );
2263 my $content = encode_json_utf8({
2264 0 %args{grep { exists $args{$_} } qw(event_context cursor limit)}
2265 });
2266 0 my ($res) = await $self->http_post(
2267 $uri,
2268 $content,
2269 content_type => 'application/json; charset=utf-8',
2270 );
2271 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2272 0 return $res;
2273 2 }
2274  
2275  
2276 =head2 apps_permissions_info
2277  
2278 Returns list of permissions this app has on a team.
2279  
2280 L<API method documentation|https://api.slack.com/methods/apps.permissions.info>
2281  
2282 Resolves to a structure representing the response.
2283  
2284 =cut
2285  
2286 0 ▶async sub apps_permissions_info {
Subroutine apps_permissions_info: not called CC=2 SCAR=17.9
Pod documented
2287 0 my ($self, %args) = @_;
2288 0 my $uri = $self->endpoint(
2289 'apps_permissions_info',
2290 );
2291 0 my ($res) = await $self->http_get(
2292 $uri,
2293 );
2294 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2295 0 return $res;
2296 2 }
2297  
2298  
2299 =head2 apps_permissions_request
2300  
2301 Allows an app to request additional scopes
2302  
2303 L<API method documentation|https://api.slack.com/methods/apps.permissions.request>
2304  
2305 Takes the following named parameters:
2306  
2307 =over 4
2308  
2309 =item * C<scopes> - A comma separated list of scopes to request for (string, required)
2310  
2311 =item * C<trigger_id> - Token used to trigger the permissions API (string, required)
2312  
2313 =back
2314  
2315 Resolves to a structure representing the response.
2316  
2317 =cut
2318  
2319 0 ▶async sub apps_permissions_request {
Subroutine apps_permissions_request: not called CC=2 SCAR=17.9
Pod documented
2320 0 my ($self, %args) = @_;
2321 my $uri = $self->endpoint(
2322 'apps_permissions_request',
2323 0 %args{grep { exists $args{$_} } qw(scopes trigger_id)}
2324 );
2325 0 my ($res) = await $self->http_get(
2326 $uri,
2327 );
2328 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2329 0 return $res;
2330 2 }
2331  
2332  
2333 =head2 apps_permissions_resources_list
2334  
2335 Returns list of resource grants this app has on a team.
2336  
2337 L<API method documentation|https://api.slack.com/methods/apps.permissions.resources.list>
2338  
2339 Takes the following named parameters:
2340  
2341 =over 4
2342  
2343 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
2344  
2345 =item * C<limit> - The maximum number of items to return. (integer, optional)
2346  
2347 =back
2348  
2349 Resolves to a structure representing the response.
2350  
2351 =cut
2352  
2353 0 ▶async sub apps_permissions_resources_list {
Subroutine apps_permissions_resources_list: not called CC=2 SCAR=17.9
Pod documented
2354 0 my ($self, %args) = @_;
2355 my $uri = $self->endpoint(
2356 'apps_permissions_resources_list',
2357 0 %args{grep { exists $args{$_} } qw(cursor limit)}
2358 );
2359 0 my ($res) = await $self->http_get(
2360 $uri,
2361 );
2362 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2363 0 return $res;
2364 2 }
2365  
2366  
2367 =head2 apps_permissions_scopes_list
2368  
2369 Returns list of scopes this app has on a team.
2370  
2371 L<API method documentation|https://api.slack.com/methods/apps.permissions.scopes.list>
2372  
2373 Resolves to a structure representing the response.
2374  
2375 =cut
2376  
2377 0 ▶async sub apps_permissions_scopes_list {
Subroutine apps_permissions_scopes_list: not called CC=2 SCAR=17.9
Pod documented
2378 0 my ($self, %args) = @_;
2379 0 my $uri = $self->endpoint(
2380 'apps_permissions_scopes_list',
2381 );
2382 0 my ($res) = await $self->http_get(
2383 $uri,
2384 );
2385 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2386 0 return $res;
2387 2 }
2388  
2389  
2390 =head2 apps_permissions_users_list
2391  
2392 Returns list of user grants and corresponding scopes this app has on a team.
2393  
2394 L<API method documentation|https://api.slack.com/methods/apps.permissions.users.list>
2395  
2396 Takes the following named parameters:
2397  
2398 =over 4
2399  
2400 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
2401  
2402 =item * C<limit> - The maximum number of items to return. (integer, optional)
2403  
2404 =back
2405  
2406 Resolves to a structure representing the response.
2407  
2408 =cut
2409  
2410 0 ▶async sub apps_permissions_users_list {
Subroutine apps_permissions_users_list: not called CC=2 SCAR=17.9
Pod documented
2411 0 my ($self, %args) = @_;
2412 my $uri = $self->endpoint(
2413 'apps_permissions_users_list',
2414 0 %args{grep { exists $args{$_} } qw(cursor limit)}
2415 );
2416 0 my ($res) = await $self->http_get(
2417 $uri,
2418 );
2419 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2420 0 return $res;
2421 2 }
2422  
2423  
2424 =head2 apps_permissions_users_request
2425  
2426 Enables an app to trigger a permissions modal to grant an app access to a user access scope.
2427  
2428 L<API method documentation|https://api.slack.com/methods/apps.permissions.users.request>
2429  
2430 Takes the following named parameters:
2431  
2432 =over 4
2433  
2434 =item * C<scopes> - A comma separated list of user scopes to request for (string, required)
2435  
2436 =item * C<trigger_id> - Token used to trigger the request (string, required)
2437  
2438 =item * C<user> - The user this scope is being requested for (string, required)
2439  
2440 =back
2441  
2442 Resolves to a structure representing the response.
2443  
2444 =cut
2445  
2446 0 ▶async sub apps_permissions_users_request {
Subroutine apps_permissions_users_request: not called CC=2 SCAR=17.9
Pod documented
2447 0 my ($self, %args) = @_;
2448 my $uri = $self->endpoint(
2449 'apps_permissions_users_request',
2450 0 %args{grep { exists $args{$_} } qw(scopes trigger_id user)}
2451 );
2452 0 my ($res) = await $self->http_get(
2453 $uri,
2454 );
2455 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2456 0 return $res;
2457 2 }
2458  
2459  
2460 =head2 apps_uninstall
2461  
2462 Uninstalls your app from a workspace.
2463  
2464 L<API method documentation|https://api.slack.com/methods/apps.uninstall>
2465  
2466 Takes the following named parameters:
2467  
2468 =over 4
2469  
2470 =item * C<client_id> - Issued when you created your application. (string, optional)
2471  
2472 =item * C<client_secret> - Issued when you created your application. (string, optional)
2473  
2474 =back
2475  
2476 Resolves to a structure representing the response.
2477  
2478 =cut
2479  
2480 0 ▶async sub apps_uninstall {
Subroutine apps_uninstall: not called CC=2 SCAR=17.9
Pod documented
2481 0 my ($self, %args) = @_;
2482 my $uri = $self->endpoint(
2483 'apps_uninstall',
2484 0 %args{grep { exists $args{$_} } qw(client_id client_secret)}
2485 );
2486 0 my ($res) = await $self->http_get(
2487 $uri,
2488 );
2489 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2490 0 return $res;
2491 2 }
2492  
2493  
2494 =head2 auth_revoke
2495  
2496 Revokes a token.
2497  
2498 L<API method documentation|https://api.slack.com/methods/auth.revoke>
2499  
2500 Takes the following named parameters:
2501  
2502 =over 4
2503  
2504 =item * C<test> - Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked. (boolean, optional)
2505  
2506 =back
2507  
2508 Resolves to a structure representing the response.
2509  
2510 =cut
2511  
2512 0 ▶async sub auth_revoke {
Subroutine auth_revoke: not called CC=2 SCAR=17.9
Pod documented
2513 0 my ($self, %args) = @_;
2514 my $uri = $self->endpoint(
2515 'auth_revoke',
2516 0 %args{grep { exists $args{$_} } qw(test)}
2517 );
2518 0 my ($res) = await $self->http_get(
2519 $uri,
2520 );
2521 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2522 0 return $res;
2523 2 }
2524  
2525  
2526 =head2 auth_test
2527  
2528 Checks authentication & identity.
2529  
2530 L<API method documentation|https://api.slack.com/methods/auth.test>
2531  
2532 Resolves to a structure representing the response.
2533  
2534 =cut
2535  
2536 0 ▶async sub auth_test {
Subroutine auth_test: not called CC=2 SCAR=17.9
Pod documented
2537 0 my ($self, %args) = @_;
2538 0 my $uri = $self->endpoint(
2539 'auth_test',
2540 );
2541 0 my ($res) = await $self->http_post(
2542 $uri,
2543 );
2544 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2545 0 return $res;
2546 2 }
2547  
2548  
2549 =head2 bots_info
2550  
2551 Gets information about a bot user.
2552  
2553 L<API method documentation|https://api.slack.com/methods/bots.info>
2554  
2555 Takes the following named parameters:
2556  
2557 =over 4
2558  
2559 =item * C<bot> - Bot user to get info on (string, optional)
2560  
2561 =back
2562  
2563 Resolves to a structure representing the response.
2564  
2565 =cut
2566  
2567 0 ▶async sub bots_info {
Subroutine bots_info: not called CC=2 SCAR=17.9
Pod documented
2568 0 my ($self, %args) = @_;
2569 my $uri = $self->endpoint(
2570 'bots_info',
2571 0 %args{grep { exists $args{$_} } qw(bot)}
2572 );
2573 0 my ($res) = await $self->http_get(
2574 $uri,
2575 );
2576 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2577 0 return $res;
2578 2 }
2579  
2580  
2581 =head2 calls_add
2582  
2583 Registers a new Call.
2584  
2585 L<API method documentation|https://api.slack.com/methods/calls.add>
2586  
2587 Takes the following named parameters:
2588  
2589 =over 4
2590  
2591 =item * C<external_unique_id> - An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service. (string, required)
2592  
2593 =item * C<external_display_id> - An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object. (string, optional)
2594  
2595 =item * C<join_url> - The URL required for a client to join the Call. (string, required)
2596  
2597 =item * C<desktop_app_join_url> - When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. (string, optional)
2598  
2599 =item * C<date_start> - Call start time in UTC UNIX timestamp format (integer, optional)
2600  
2601 =item * C<title> - The name of the Call. (string, optional)
2602  
2603 =item * C<created_by> - The valid Slack user ID of the user who created this Call. When this method is called with a user token, the `created_by` field is optional and defaults to the authed user of the token. Otherwise, the field is required. (string, optional)
2604  
2605 =item * C<users> - The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/calls#users). (string, optional)
2606  
2607 =back
2608  
2609 Resolves to a structure representing the response.
2610  
2611 =cut
2612  
2613 0 ▶async sub calls_add {
Subroutine calls_add: not called CC=2 SCAR=17.9
Pod documented
2614 0 my ($self, %args) = @_;
2615 0 my $uri = $self->endpoint(
2616 'calls_add',
2617 );
2618 my $content = encode_json_utf8({
2619 0 %args{grep { exists $args{$_} } qw(external_unique_id external_display_id join_url desktop_app_join_url date_start title created_by users)}
2620 });
2621 0 my ($res) = await $self->http_post(
2622 $uri,
2623 $content,
2624 content_type => 'application/json; charset=utf-8',
2625 );
2626 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2627 0 return $res;
2628 2 }
2629  
2630  
2631 =head2 calls_end
2632  
2633 Ends a Call.
2634  
2635 L<API method documentation|https://api.slack.com/methods/calls.end>
2636  
2637 Takes the following named parameters:
2638  
2639 =over 4
2640  
2641 =item * C<id> - `id` returned when registering the call using the [`calls.add`](/methods/calls.add) method. (string, required)
2642  
2643 =item * C<duration> - Call duration in seconds (integer, optional)
2644  
2645 =back
2646  
2647 Resolves to a structure representing the response.
2648  
2649 =cut
2650  
2651 0 ▶async sub calls_end {
Subroutine calls_end: not called CC=2 SCAR=17.9
Pod documented
2652 0 my ($self, %args) = @_;
2653 0 my $uri = $self->endpoint(
2654 'calls_end',
2655 );
2656 my $content = encode_json_utf8({
2657 0 %args{grep { exists $args{$_} } qw(id duration)}
2658 });
2659 0 my ($res) = await $self->http_post(
2660 $uri,
2661 $content,
2662 content_type => 'application/json; charset=utf-8',
2663 );
2664 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2665 0 return $res;
2666 2 }
2667  
2668  
2669 =head2 calls_info
2670  
2671 Returns information about a Call.
2672  
2673 L<API method documentation|https://api.slack.com/methods/calls.info>
2674  
2675 Takes the following named parameters:
2676  
2677 =over 4
2678  
2679 =item * C<id> - `id` of the Call returned by the [`calls.add`](/methods/calls.add) method. (string, required)
2680  
2681 =back
2682  
2683 Resolves to a structure representing the response.
2684  
2685 =cut
2686  
2687 0 ▶async sub calls_info {
Subroutine calls_info: not called CC=2 SCAR=17.9
Pod documented
2688 0 my ($self, %args) = @_;
2689 0 my $uri = $self->endpoint(
2690 'calls_info',
2691 );
2692 my $content = encode_json_utf8({
2693 0 %args{grep { exists $args{$_} } qw(id)}
2694 });
2695 0 my ($res) = await $self->http_post(
2696 $uri,
2697 $content,
2698 content_type => 'application/json; charset=utf-8',
2699 );
2700 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2701 0 return $res;
2702 2 }
2703  
2704  
2705 =head2 calls_participants_add
2706  
2707 Registers new participants added to a Call.
2708  
2709 L<API method documentation|https://api.slack.com/methods/calls.participants.add>
2710  
2711 Takes the following named parameters:
2712  
2713 =over 4
2714  
2715 =item * C<id> - `id` returned by the [`calls.add`](/methods/calls.add) method. (string, required)
2716  
2717 =item * C<users> - The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/calls#users). (string, required)
2718  
2719 =back
2720  
2721 Resolves to a structure representing the response.
2722  
2723 =cut
2724  
2725 0 ▶async sub calls_participants_add {
Subroutine calls_participants_add: not called CC=2 SCAR=17.9
Pod documented
2726 0 my ($self, %args) = @_;
2727 0 my $uri = $self->endpoint(
2728 'calls_participants_add',
2729 );
2730 my $content = encode_json_utf8({
2731 0 %args{grep { exists $args{$_} } qw(id users)}
2732 });
2733 0 my ($res) = await $self->http_post(
2734 $uri,
2735 $content,
2736 content_type => 'application/json; charset=utf-8',
2737 );
2738 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2739 0 return $res;
2740 2 }
2741  
2742  
2743 =head2 calls_participants_remove
2744  
2745 Registers participants removed from a Call.
2746  
2747 L<API method documentation|https://api.slack.com/methods/calls.participants.remove>
2748  
2749 Takes the following named parameters:
2750  
2751 =over 4
2752  
2753 =item * C<id> - `id` returned by the [`calls.add`](/methods/calls.add) method. (string, required)
2754  
2755 =item * C<users> - The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/calls#users). (string, required)
2756  
2757 =back
2758  
2759 Resolves to a structure representing the response.
2760  
2761 =cut
2762  
2763 0 ▶async sub calls_participants_remove {
Subroutine calls_participants_remove: not called CC=2 SCAR=17.9
Pod documented
2764 0 my ($self, %args) = @_;
2765 0 my $uri = $self->endpoint(
2766 'calls_participants_remove',
2767 );
2768 my $content = encode_json_utf8({
2769 0 %args{grep { exists $args{$_} } qw(id users)}
2770 });
2771 0 my ($res) = await $self->http_post(
2772 $uri,
2773 $content,
2774 content_type => 'application/json; charset=utf-8',
2775 );
2776 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2777 0 return $res;
2778 2 }
2779  
2780  
2781 =head2 calls_update
2782  
2783 Updates information about a Call.
2784  
2785 L<API method documentation|https://api.slack.com/methods/calls.update>
2786  
2787 Takes the following named parameters:
2788  
2789 =over 4
2790  
2791 =item * C<id> - `id` returned by the [`calls.add`](/methods/calls.add) method. (string, required)
2792  
2793 =item * C<title> - The name of the Call. (string, optional)
2794  
2795 =item * C<join_url> - The URL required for a client to join the Call. (string, optional)
2796  
2797 =item * C<desktop_app_join_url> - When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. (string, optional)
2798  
2799 =back
2800  
2801 Resolves to a structure representing the response.
2802  
2803 =cut
2804  
2805 0 ▶async sub calls_update {
Subroutine calls_update: not called CC=2 SCAR=17.9
Pod documented
2806 0 my ($self, %args) = @_;
2807 0 my $uri = $self->endpoint(
2808 'calls_update',
2809 );
2810 my $content = encode_json_utf8({
2811 0 %args{grep { exists $args{$_} } qw(id title join_url desktop_app_join_url)}
2812 });
2813 0 my ($res) = await $self->http_post(
2814 $uri,
2815 $content,
2816 content_type => 'application/json; charset=utf-8',
2817 );
2818 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2819 0 return $res;
2820 2 }
2821  
2822  
2823 =head2 chat_delete
2824  
2825 Deletes a message.
2826  
2827 L<API method documentation|https://api.slack.com/methods/chat.delete>
2828  
2829 Takes the following named parameters:
2830  
2831 =over 4
2832  
2833 =item * C<ts> - Timestamp of the message to be deleted. (number, optional)
2834  
2835 =item * C<channel> - Channel containing the message to be deleted. (string, optional)
2836  
2837 =item * C<as_user> - Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope. (boolean, optional)
2838  
2839 =back
2840  
2841 Resolves to a structure representing the response.
2842  
2843 =cut
2844  
2845 0 ▶async sub chat_delete {
Subroutine chat_delete: not called CC=2 SCAR=17.9
Pod documented
2846 0 my ($self, %args) = @_;
2847 0 my $uri = $self->endpoint(
2848 'chat_delete',
2849 );
2850 my $content = encode_json_utf8({
2851 0 %args{grep { exists $args{$_} } qw(ts channel as_user)}
2852 });
2853 0 my ($res) = await $self->http_post(
2854 $uri,
2855 $content,
2856 content_type => 'application/json; charset=utf-8',
2857 );
2858 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2859 0 return $res;
2860 2 }
2861  
2862  
2863 =head2 chat_delete_scheduled_message
2864  
2865 Deletes a pending scheduled message from the queue.
2866  
2867 L<API method documentation|https://api.slack.com/methods/chat.deleteScheduledMessage>
2868  
2869 Takes the following named parameters:
2870  
2871 =over 4
2872  
2873 =item * C<as_user> - Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](/bot-users) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope. (boolean, optional)
2874  
2875 =item * C<channel> - The channel the scheduled_message is posting to (string, required)
2876  
2877 =item * C<scheduled_message_id> - `scheduled_message_id` returned from call to chat.scheduleMessage (string, required)
2878  
2879 =back
2880  
2881 Resolves to a structure representing the response.
2882  
2883 =cut
2884  
2885 0 ▶async sub chat_delete_scheduled_message {
Subroutine chat_delete_scheduled_message: not called CC=2 SCAR=17.9
Pod documented
2886 0 my ($self, %args) = @_;
2887 0 my $uri = $self->endpoint(
2888 'chat_delete_scheduled_message',
2889 );
2890 my $content = encode_json_utf8({
2891 0 %args{grep { exists $args{$_} } qw(as_user channel scheduled_message_id)}
2892 });
2893 0 my ($res) = await $self->http_post(
2894 $uri,
2895 $content,
2896 content_type => 'application/json; charset=utf-8',
2897 );
2898 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2899 0 return $res;
2900 2 }
2901  
2902  
2903 =head2 chat_get_permalink
2904  
2905 Retrieve a permalink URL for a specific extant message
2906  
2907 L<API method documentation|https://api.slack.com/methods/chat.getPermalink>
2908  
2909 Takes the following named parameters:
2910  
2911 =over 4
2912  
2913 =item * C<channel> - The ID of the conversation or channel containing the message (string, required)
2914  
2915 =item * C<message_ts> - A message's `ts` value, uniquely identifying it within a channel (string, required)
2916  
2917 =back
2918  
2919 Resolves to a structure representing the response.
2920  
2921 =cut
2922  
2923 0 ▶async sub chat_get_permalink {
Subroutine chat_get_permalink: not called CC=2 SCAR=17.9
Pod documented
2924 0 my ($self, %args) = @_;
2925 my $uri = $self->endpoint(
2926 'chat_get_permalink',
2927 0 %args{grep { exists $args{$_} } qw(channel message_ts)}
2928 );
2929 0 my ($res) = await $self->http_get(
2930 $uri,
2931 );
2932 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2933 0 return $res;
2934 2 }
2935  
2936  
2937 =head2 chat_me_message
2938  
2939 Share a me message into a channel.
2940  
2941 L<API method documentation|https://api.slack.com/methods/chat.meMessage>
2942  
2943 Takes the following named parameters:
2944  
2945 =over 4
2946  
2947 =item * C<channel> - Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. (string, optional)
2948  
2949 =item * C<text> - Text of the message to send. (string, optional)
2950  
2951 =back
2952  
2953 Resolves to a structure representing the response.
2954  
2955 =cut
2956  
2957 0 ▶async sub chat_me_message {
Subroutine chat_me_message: not called CC=2 SCAR=17.9
Pod documented
2958 0 my ($self, %args) = @_;
2959 0 my $uri = $self->endpoint(
2960 'chat_me_message',
2961 );
2962 my $content = encode_json_utf8({
2963 0 %args{grep { exists $args{$_} } qw(channel text)}
2964 });
2965 0 my ($res) = await $self->http_post(
2966 $uri,
2967 $content,
2968 content_type => 'application/json; charset=utf-8',
2969 );
2970 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
2971 0 return $res;
2972 2 }
2973  
2974  
2975 =head2 chat_post_ephemeral
2976  
2977 Sends an ephemeral message to a user in a channel.
2978  
2979 L<API method documentation|https://api.slack.com/methods/chat.postEphemeral>
2980  
2981 Takes the following named parameters:
2982  
2983 =over 4
2984  
2985 =item * C<as_user> - Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false. (boolean, optional)
2986  
2987 =item * C<attachments> - A JSON-based array of structured attachments, presented as a URL-encoded string. (string, optional)
2988  
2989 =item * C<blocks> - A JSON-based array of structured blocks, presented as a URL-encoded string. (string, optional)
2990  
2991 =item * C<channel> - Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. (string, required)
2992  
2993 =item * C<icon_emoji> - Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below. (string, optional)
2994  
2995 =item * C<icon_url> - URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. (string, optional)
2996  
2997 =item * C<link_names> - Find and link channel names and usernames. (boolean, optional)
2998  
2999 =item * C<parse> - Change how messages are treated. Defaults to `none`. See [below](#formatting). (string, optional)
3000  
3001 =item * C<text> - How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail. (string, optional)
3002  
3003 =item * C<thread_ts> - Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread. (string, optional)
3004  
3005 =item * C<user> - `id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument. (string, required)
3006  
3007 =item * C<username> - Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. (string, optional)
3008  
3009 =back
3010  
3011 Resolves to a structure representing the response.
3012  
3013 =cut
3014  
3015 0 ▶async sub chat_post_ephemeral {
Subroutine chat_post_ephemeral: not called CC=2 SCAR=17.9
Pod documented
3016 0 my ($self, %args) = @_;
3017 0 my $uri = $self->endpoint(
3018 'chat_post_ephemeral',
3019 );
3020 my $content = encode_json_utf8({
3021 0 %args{grep { exists $args{$_} } qw(as_user attachments blocks channel icon_emoji icon_url link_names parse text thread_ts user username)}
3022 });
3023 0 my ($res) = await $self->http_post(
3024 $uri,
3025 $content,
3026 content_type => 'application/json; charset=utf-8',
3027 );
3028 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3029 0 return $res;
3030 2 }
3031  
3032  
3033 =head2 chat_post_message
3034  
3035 Sends a message to a channel.
3036  
3037 L<API method documentation|https://api.slack.com/methods/chat.postMessage>
3038  
3039 Takes the following named parameters:
3040  
3041 =over 4
3042  
3043 =item * C<as_user> - Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below. (string, optional)
3044  
3045 =item * C<attachments> - A JSON-based array of structured attachments, presented as a URL-encoded string. (string, optional)
3046  
3047 =item * C<blocks> - A JSON-based array of structured blocks, presented as a URL-encoded string. (string, optional)
3048  
3049 =item * C<channel> - Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. (string, required)
3050  
3051 =item * C<icon_emoji> - Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below. (string, optional)
3052  
3053 =item * C<icon_url> - URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. (string, optional)
3054  
3055 =item * C<link_names> - Find and link channel names and usernames. (boolean, optional)
3056  
3057 =item * C<mrkdwn> - Disable Slack markup parsing by setting to `false`. Enabled by default. (boolean, optional)
3058  
3059 =item * C<parse> - Change how messages are treated. Defaults to `none`. See [below](#formatting). (string, optional)
3060  
3061 =item * C<reply_broadcast> - Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. (boolean, optional)
3062  
3063 =item * C<text> - How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail. (string, optional)
3064  
3065 =item * C<thread_ts> - Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. (string, optional)
3066  
3067 =item * C<unfurl_links> - Pass true to enable unfurling of primarily text-based content. (boolean, optional)
3068  
3069 =item * C<unfurl_media> - Pass false to disable unfurling of media content. (boolean, optional)
3070  
3071 =item * C<username> - Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. (string, optional)
3072  
3073 =back
3074  
3075 Resolves to a structure representing the response.
3076  
3077 =cut
3078  
3079 0 ▶async sub chat_post_message {
Subroutine chat_post_message: not called CC=2 SCAR=17.9
Pod documented
3080 0 my ($self, %args) = @_;
3081 0 my $uri = $self->endpoint(
3082 'chat_post_message',
3083 );
3084 my $content = encode_json_utf8({
3085 0 %args{grep { exists $args{$_} } qw(as_user attachments blocks channel icon_emoji icon_url link_names mrkdwn parse reply_broadcast text thread_ts unfurl_links unfurl_media username)}
3086 });
3087 0 my ($res) = await $self->http_post(
3088 $uri,
3089 $content,
3090 content_type => 'application/json; charset=utf-8',
3091 );
3092 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3093 0 return $res;
3094 2 }
3095  
3096  
3097 =head2 chat_schedule_message
3098  
3099 Schedules a message to be sent to a channel.
3100  
3101 L<API method documentation|https://api.slack.com/methods/chat.scheduleMessage>
3102  
3103 Takes the following named parameters:
3104  
3105 =over 4
3106  
3107 =item * C<channel> - Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. (string, optional)
3108  
3109 =item * C<text> - How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail. (string, optional)
3110  
3111 =item * C<post_at> - Unix EPOCH timestamp of time in future to send the message. (string, optional)
3112  
3113 =item * C<parse> - Change how messages are treated. Defaults to `none`. See [chat.postMessage](chat.postMessage#formatting). (string, optional)
3114  
3115 =item * C<as_user> - Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [chat.postMessage](chat.postMessage#authorship). (boolean, optional)
3116  
3117 =item * C<link_names> - Find and link channel names and usernames. (boolean, optional)
3118  
3119 =item * C<attachments> - A JSON-based array of structured attachments, presented as a URL-encoded string. (string, optional)
3120  
3121 =item * C<blocks> - A JSON-based array of structured blocks, presented as a URL-encoded string. (string, optional)
3122  
3123 =item * C<unfurl_links> - Pass true to enable unfurling of primarily text-based content. (boolean, optional)
3124  
3125 =item * C<unfurl_media> - Pass false to disable unfurling of media content. (boolean, optional)
3126  
3127 =item * C<thread_ts> - Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. (number, optional)
3128  
3129 =item * C<reply_broadcast> - Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. (boolean, optional)
3130  
3131 =back
3132  
3133 Resolves to a structure representing the response.
3134  
3135 =cut
3136  
3137 0 ▶async sub chat_schedule_message {
Subroutine chat_schedule_message: not called CC=2 SCAR=17.9
Pod documented
3138 0 my ($self, %args) = @_;
3139 0 my $uri = $self->endpoint(
3140 'chat_schedule_message',
3141 );
3142 my $content = encode_json_utf8({
3143 0 %args{grep { exists $args{$_} } qw(channel text post_at parse as_user link_names attachments blocks unfurl_links unfurl_media thread_ts reply_broadcast)}
3144 });
3145 0 my ($res) = await $self->http_post(
3146 $uri,
3147 $content,
3148 content_type => 'application/json; charset=utf-8',
3149 );
3150 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3151 0 return $res;
3152 2 }
3153  
3154  
3155 =head2 chat_scheduled_messages_list
3156  
3157 Returns a list of scheduled messages.
3158  
3159 L<API method documentation|https://api.slack.com/methods/chat.scheduledMessages.list>
3160  
3161 Takes the following named parameters:
3162  
3163 =over 4
3164  
3165 =item * C<channel> - The channel of the scheduled messages (string, optional)
3166  
3167 =item * C<latest> - A UNIX timestamp of the latest value in the time range (number, optional)
3168  
3169 =item * C<oldest> - A UNIX timestamp of the oldest value in the time range (number, optional)
3170  
3171 =item * C<limit> - Maximum number of original entries to return. (integer, optional)
3172  
3173 =item * C<cursor> - For pagination purposes, this is the `cursor` value returned from a previous call to `chat.scheduledmessages.list` indicating where you want to start this call from. (string, optional)
3174  
3175 =back
3176  
3177 Resolves to a structure representing the response.
3178  
3179 =cut
3180  
3181 0 ▶async sub chat_scheduled_messages_list {
Subroutine chat_scheduled_messages_list: not called CC=2 SCAR=17.9
Pod documented
3182 0 my ($self, %args) = @_;
3183 0 my $uri = $self->endpoint(
3184 'chat_scheduled_messages_list',
3185 );
3186 my $content = encode_json_utf8({
3187 0 %args{grep { exists $args{$_} } qw(channel latest oldest limit cursor)}
3188 });
3189 0 my ($res) = await $self->http_post(
3190 $uri,
3191 $content,
3192 content_type => 'application/json; charset=utf-8',
3193 );
3194 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3195 0 return $res;
3196 2 }
3197  
3198  
3199 =head2 chat_unfurl
3200  
3201 Provide custom unfurl behavior for user-posted URLs
3202  
3203 L<API method documentation|https://api.slack.com/methods/chat.unfurl>
3204  
3205 Takes the following named parameters:
3206  
3207 =over 4
3208  
3209 =item * C<channel> - Channel ID of the message (string, required)
3210  
3211 =item * C<ts> - Timestamp of the message to add unfurl behavior to. (string, required)
3212  
3213 =item * C<unfurls> - URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. (string, optional)
3214  
3215 =item * C<user_auth_message> - Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior (string, optional)
3216  
3217 =item * C<user_auth_required> - Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain (boolean, optional)
3218  
3219 =item * C<user_auth_url> - Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded. (string, optional)
3220  
3221 =back
3222  
3223 Resolves to a structure representing the response.
3224  
3225 =cut
3226  
3227 0 ▶async sub chat_unfurl {
Subroutine chat_unfurl: not called CC=2 SCAR=17.9
Pod documented
3228 0 my ($self, %args) = @_;
3229 0 my $uri = $self->endpoint(
3230 'chat_unfurl',
3231 );
3232 my $content = encode_json_utf8({
3233 0 %args{grep { exists $args{$_} } qw(channel ts unfurls user_auth_message user_auth_required user_auth_url)}
3234 });
3235 0 my ($res) = await $self->http_post(
3236 $uri,
3237 $content,
3238 content_type => 'application/json; charset=utf-8',
3239 );
3240 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3241 0 return $res;
3242 2 }
3243  
3244  
3245 =head2 chat_update
3246  
3247 Updates a message.
3248  
3249 L<API method documentation|https://api.slack.com/methods/chat.update>
3250  
3251 Takes the following named parameters:
3252  
3253 =over 4
3254  
3255 =item * C<as_user> - Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users. (string, optional)
3256  
3257 =item * C<attachments> - A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting `text`. If you don't include this field, the message's previous `attachments` will be retained. To remove previous `attachments`, include an empty array for this field. (string, optional)
3258  
3259 =item * C<blocks> - A JSON-based array of [structured blocks](/block-kit/building), presented as a URL-encoded string. If you don't include this field, the message's previous `blocks` will be retained. To remove previous `blocks`, include an empty array for this field. (string, optional)
3260  
3261 =item * C<channel> - Channel containing the message to be updated. (string, required)
3262  
3263 =item * C<link_names> - Find and link channel names and usernames. Defaults to `none`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `none`. (string, optional)
3264  
3265 =item * C<parse> - Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or `full`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `client`. (string, optional)
3266  
3267 =item * C<text> - New text for the message, using the [default formatting rules](/reference/surfaces/formatting). It's not required when presenting `blocks` or `attachments`. (string, optional)
3268  
3269 =item * C<ts> - Timestamp of the message to be updated. (string, required)
3270  
3271 =back
3272  
3273 Resolves to a structure representing the response.
3274  
3275 =cut
3276  
3277 0 ▶async sub chat_update {
Subroutine chat_update: not called CC=2 SCAR=17.9
Pod documented
3278 0 my ($self, %args) = @_;
3279 0 my $uri = $self->endpoint(
3280 'chat_update',
3281 );
3282 my $content = encode_json_utf8({
3283 0 %args{grep { exists $args{$_} } qw(as_user attachments blocks channel link_names parse text ts)}
3284 });
3285 0 my ($res) = await $self->http_post(
3286 $uri,
3287 $content,
3288 content_type => 'application/json; charset=utf-8',
3289 );
3290 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3291 0 return $res;
3292 2 }
3293  
3294  
3295 =head2 conversations_archive
3296  
3297 Archives a conversation.
3298  
3299 L<API method documentation|https://api.slack.com/methods/conversations.archive>
3300  
3301 Takes the following named parameters:
3302  
3303 =over 4
3304  
3305 =item * C<channel> - ID of conversation to archive (string, optional)
3306  
3307 =back
3308  
3309 Resolves to a structure representing the response.
3310  
3311 =cut
3312  
3313 0 ▶async sub conversations_archive {
Subroutine conversations_archive: not called CC=2 SCAR=17.9
Pod documented
3314 0 my ($self, %args) = @_;
3315 0 my $uri = $self->endpoint(
3316 'conversations_archive',
3317 );
3318 my $content = encode_json_utf8({
3319 0 %args{grep { exists $args{$_} } qw(channel)}
3320 });
3321 0 my ($res) = await $self->http_post(
3322 $uri,
3323 $content,
3324 content_type => 'application/json; charset=utf-8',
3325 );
3326 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3327 0 return $res;
3328 2 }
3329  
3330  
3331 =head2 conversations_close
3332  
3333 Closes a direct message or multi-person direct message.
3334  
3335 L<API method documentation|https://api.slack.com/methods/conversations.close>
3336  
3337 Takes the following named parameters:
3338  
3339 =over 4
3340  
3341 =item * C<channel> - Conversation to close. (string, optional)
3342  
3343 =back
3344  
3345 Resolves to a structure representing the response.
3346  
3347 =cut
3348  
3349 0 ▶async sub conversations_close {
Subroutine conversations_close: not called CC=2 SCAR=17.9
Pod documented
3350 0 my ($self, %args) = @_;
3351 0 my $uri = $self->endpoint(
3352 'conversations_close',
3353 );
3354 my $content = encode_json_utf8({
3355 0 %args{grep { exists $args{$_} } qw(channel)}
3356 });
3357 0 my ($res) = await $self->http_post(
3358 $uri,
3359 $content,
3360 content_type => 'application/json; charset=utf-8',
3361 );
3362 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3363 0 return $res;
3364 2 }
3365  
3366  
3367 =head2 conversations_create
3368  
3369 Initiates a public or private channel-based conversation
3370  
3371 L<API method documentation|https://api.slack.com/methods/conversations.create>
3372  
3373 Takes the following named parameters:
3374  
3375 =over 4
3376  
3377 =item * C<name> - Name of the public or private channel to create (string, optional)
3378  
3379 =item * C<is_private> - Create a private channel instead of a public one (boolean, optional)
3380  
3381 =back
3382  
3383 Resolves to a structure representing the response.
3384  
3385 =cut
3386  
3387 0 ▶async sub conversations_create {
Subroutine conversations_create: not called CC=2 SCAR=17.9
Pod documented
3388 0 my ($self, %args) = @_;
3389 0 my $uri = $self->endpoint(
3390 'conversations_create',
3391 );
3392 my $content = encode_json_utf8({
3393 0 %args{grep { exists $args{$_} } qw(name is_private)}
3394 });
3395 0 my ($res) = await $self->http_post(
3396 $uri,
3397 $content,
3398 content_type => 'application/json; charset=utf-8',
3399 );
3400 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3401 0 return $res;
3402 2 }
3403  
3404  
3405 =head2 conversations_history
3406  
3407 Fetches a conversation's history of messages and events.
3408  
3409 L<API method documentation|https://api.slack.com/methods/conversations.history>
3410  
3411 Takes the following named parameters:
3412  
3413 =over 4
3414  
3415 =item * C<channel> - Conversation ID to fetch history for. (string, optional)
3416  
3417 =item * C<latest> - End of time range of messages to include in results. (number, optional)
3418  
3419 =item * C<oldest> - Start of time range of messages to include in results. (number, optional)
3420  
3421 =item * C<inclusive> - Include messages with latest or oldest timestamp in results only when either timestamp is specified. (boolean, optional)
3422  
3423 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. (integer, optional)
3424  
3425 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
3426  
3427 =back
3428  
3429 Resolves to a structure representing the response.
3430  
3431 =cut
3432  
3433 0 ▶async sub conversations_history {
Subroutine conversations_history: not called CC=2 SCAR=17.9
Pod documented
3434 0 my ($self, %args) = @_;
3435 my $uri = $self->endpoint(
3436 'conversations_history',
3437 0 %args{grep { exists $args{$_} } qw(channel latest oldest inclusive limit cursor)}
3438 );
3439 0 my ($res) = await $self->http_get(
3440 $uri,
3441 );
3442 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3443 0 return $res;
3444 2 }
3445  
3446  
3447 =head2 conversations_info
3448  
3449 Retrieve information about a conversation.
3450  
3451 L<API method documentation|https://api.slack.com/methods/conversations.info>
3452  
3453 Takes the following named parameters:
3454  
3455 =over 4
3456  
3457 =item * C<channel> - Conversation ID to learn more about (string, optional)
3458  
3459 =item * C<include_locale> - Set this to `true` to receive the locale for this conversation. Defaults to `false` (boolean, optional)
3460  
3461 =item * C<include_num_members> - Set to `true` to include the member count for the specified conversation. Defaults to `false` (boolean, optional)
3462  
3463 =back
3464  
3465 Resolves to a structure representing the response.
3466  
3467 =cut
3468  
3469 0 ▶async sub conversations_info {
Subroutine conversations_info: not called CC=2 SCAR=17.9
Pod documented
3470 0 my ($self, %args) = @_;
3471 my $uri = $self->endpoint(
3472 'conversations_info',
3473 0 %args{grep { exists $args{$_} } qw(channel include_locale include_num_members)}
3474 );
3475 0 my ($res) = await $self->http_get(
3476 $uri,
3477 );
3478 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3479 0 return $res;
3480 2 }
3481  
3482  
3483 =head2 conversations_invite
3484  
3485 Invites users to a channel.
3486  
3487 L<API method documentation|https://api.slack.com/methods/conversations.invite>
3488  
3489 Takes the following named parameters:
3490  
3491 =over 4
3492  
3493 =item * C<channel> - The ID of the public or private channel to invite user(s) to. (string, optional)
3494  
3495 =item * C<users> - A comma separated list of user IDs. Up to 1000 users may be listed. (string, optional)
3496  
3497 =back
3498  
3499 Resolves to a structure representing the response.
3500  
3501 =cut
3502  
3503 0 ▶async sub conversations_invite {
Subroutine conversations_invite: not called CC=2 SCAR=17.9
Pod documented
3504 0 my ($self, %args) = @_;
3505 0 my $uri = $self->endpoint(
3506 'conversations_invite',
3507 );
3508 my $content = encode_json_utf8({
3509 0 %args{grep { exists $args{$_} } qw(channel users)}
3510 });
3511 0 my ($res) = await $self->http_post(
3512 $uri,
3513 $content,
3514 content_type => 'application/json; charset=utf-8',
3515 );
3516 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3517 0 return $res;
3518 2 }
3519  
3520  
3521 =head2 conversations_join
3522  
3523 Joins an existing conversation.
3524  
3525 L<API method documentation|https://api.slack.com/methods/conversations.join>
3526  
3527 Takes the following named parameters:
3528  
3529 =over 4
3530  
3531 =item * C<channel> - ID of conversation to join (string, optional)
3532  
3533 =back
3534  
3535 Resolves to a structure representing the response.
3536  
3537 =cut
3538  
3539 0 ▶async sub conversations_join {
Subroutine conversations_join: not called CC=2 SCAR=17.9
Pod documented
3540 0 my ($self, %args) = @_;
3541 0 my $uri = $self->endpoint(
3542 'conversations_join',
3543 );
3544 my $content = encode_json_utf8({
3545 0 %args{grep { exists $args{$_} } qw(channel)}
3546 });
3547 0 my ($res) = await $self->http_post(
3548 $uri,
3549 $content,
3550 content_type => 'application/json; charset=utf-8',
3551 );
3552 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3553 0 return $res;
3554 2 }
3555  
3556  
3557 =head2 conversations_kick
3558  
3559 Removes a user from a conversation.
3560  
3561 L<API method documentation|https://api.slack.com/methods/conversations.kick>
3562  
3563 Takes the following named parameters:
3564  
3565 =over 4
3566  
3567 =item * C<channel> - ID of conversation to remove user from. (string, optional)
3568  
3569 =item * C<user> - User ID to be removed. (string, optional)
3570  
3571 =back
3572  
3573 Resolves to a structure representing the response.
3574  
3575 =cut
3576  
3577 0 ▶async sub conversations_kick {
Subroutine conversations_kick: not called CC=2 SCAR=17.9
Pod documented
3578 0 my ($self, %args) = @_;
3579 0 my $uri = $self->endpoint(
3580 'conversations_kick',
3581 );
3582 my $content = encode_json_utf8({
3583 0 %args{grep { exists $args{$_} } qw(channel user)}
3584 });
3585 0 my ($res) = await $self->http_post(
3586 $uri,
3587 $content,
3588 content_type => 'application/json; charset=utf-8',
3589 );
3590 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3591 0 return $res;
3592 2 }
3593  
3594  
3595 =head2 conversations_leave
3596  
3597 Leaves a conversation.
3598  
3599 L<API method documentation|https://api.slack.com/methods/conversations.leave>
3600  
3601 Takes the following named parameters:
3602  
3603 =over 4
3604  
3605 =item * C<channel> - Conversation to leave (string, optional)
3606  
3607 =back
3608  
3609 Resolves to a structure representing the response.
3610  
3611 =cut
3612  
3613 0 ▶async sub conversations_leave {
Subroutine conversations_leave: not called CC=2 SCAR=17.9
Pod documented
3614 0 my ($self, %args) = @_;
3615 0 my $uri = $self->endpoint(
3616 'conversations_leave',
3617 );
3618 my $content = encode_json_utf8({
3619 0 %args{grep { exists $args{$_} } qw(channel)}
3620 });
3621 0 my ($res) = await $self->http_post(
3622 $uri,
3623 $content,
3624 content_type => 'application/json; charset=utf-8',
3625 );
3626 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3627 0 return $res;
3628 2 }
3629  
3630  
3631 =head2 conversations_list
3632  
3633 Lists all channels in a Slack team.
3634  
3635 L<API method documentation|https://api.slack.com/methods/conversations.list>
3636  
3637 Takes the following named parameters:
3638  
3639 =over 4
3640  
3641 =item * C<exclude_archived> - Set to `true` to exclude archived channels from the list (boolean, optional)
3642  
3643 =item * C<types> - Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im` (string, optional)
3644  
3645 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000. (integer, optional)
3646  
3647 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
3648  
3649 =back
3650  
3651 Resolves to a structure representing the response.
3652  
3653 =cut
3654  
3655 0 ▶async sub conversations_list {
Subroutine conversations_list: not called CC=2 SCAR=17.9
Pod documented
3656 0 my ($self, %args) = @_;
3657 my $uri = $self->endpoint(
3658 'conversations_list',
3659 0 %args{grep { exists $args{$_} } qw(exclude_archived types limit cursor)}
3660 );
3661 0 my ($res) = await $self->http_get(
3662 $uri,
3663 );
3664 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3665 0 return $res;
3666 2 }
3667  
3668  
3669 =head2 conversations_mark
3670  
3671 Sets the read cursor in a channel.
3672  
3673 L<API method documentation|https://api.slack.com/methods/conversations.mark>
3674  
3675 Takes the following named parameters:
3676  
3677 =over 4
3678  
3679 =item * C<channel> - Channel or conversation to set the read cursor for. (string, optional)
3680  
3681 =item * C<ts> - Unique identifier of message you want marked as most recently seen in this conversation. (number, optional)
3682  
3683 =back
3684  
3685 Resolves to a structure representing the response.
3686  
3687 =cut
3688  
3689 0 ▶async sub conversations_mark {
Subroutine conversations_mark: not called CC=2 SCAR=17.9
Pod documented
3690 0 my ($self, %args) = @_;
3691 0 my $uri = $self->endpoint(
3692 'conversations_mark',
3693 );
3694 my $content = encode_json_utf8({
3695 0 %args{grep { exists $args{$_} } qw(channel ts)}
3696 });
3697 0 my ($res) = await $self->http_post(
3698 $uri,
3699 $content,
3700 content_type => 'application/json; charset=utf-8',
3701 );
3702 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3703 0 return $res;
3704 2 }
3705  
3706  
3707 =head2 conversations_members
3708  
3709 Retrieve members of a conversation.
3710  
3711 L<API method documentation|https://api.slack.com/methods/conversations.members>
3712  
3713 Takes the following named parameters:
3714  
3715 =over 4
3716  
3717 =item * C<channel> - ID of the conversation to retrieve members for (string, optional)
3718  
3719 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. (integer, optional)
3720  
3721 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
3722  
3723 =back
3724  
3725 Resolves to a structure representing the response.
3726  
3727 =cut
3728  
3729 0 ▶async sub conversations_members {
Subroutine conversations_members: not called CC=2 SCAR=17.9
Pod documented
3730 0 my ($self, %args) = @_;
3731 my $uri = $self->endpoint(
3732 'conversations_members',
3733 0 %args{grep { exists $args{$_} } qw(channel limit cursor)}
3734 );
3735 0 my ($res) = await $self->http_get(
3736 $uri,
3737 );
3738 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3739 0 return $res;
3740 2 }
3741  
3742  
3743 =head2 conversations_open
3744  
3745 Opens or resumes a direct message or multi-person direct message.
3746  
3747 L<API method documentation|https://api.slack.com/methods/conversations.open>
3748  
3749 Takes the following named parameters:
3750  
3751 =over 4
3752  
3753 =item * C<channel> - Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead. (string, optional)
3754  
3755 =item * C<users> - Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`. (string, optional)
3756  
3757 =item * C<return_im> - Boolean, indicates you want the full IM channel definition in the response. (boolean, optional)
3758  
3759 =back
3760  
3761 Resolves to a structure representing the response.
3762  
3763 =cut
3764  
3765 0 ▶async sub conversations_open {
Subroutine conversations_open: not called CC=2 SCAR=17.9
Pod documented
3766 0 my ($self, %args) = @_;
3767 0 my $uri = $self->endpoint(
3768 'conversations_open',
3769 );
3770 my $content = encode_json_utf8({
3771 0 %args{grep { exists $args{$_} } qw(channel users return_im)}
3772 });
3773 0 my ($res) = await $self->http_post(
3774 $uri,
3775 $content,
3776 content_type => 'application/json; charset=utf-8',
3777 );
3778 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3779 0 return $res;
3780 2 }
3781  
3782  
3783 =head2 conversations_rename
3784  
3785 Renames a conversation.
3786  
3787 L<API method documentation|https://api.slack.com/methods/conversations.rename>
3788  
3789 Takes the following named parameters:
3790  
3791 =over 4
3792  
3793 =item * C<channel> - ID of conversation to rename (string, optional)
3794  
3795 =item * C<name> - New name for conversation. (string, optional)
3796  
3797 =back
3798  
3799 Resolves to a structure representing the response.
3800  
3801 =cut
3802  
3803 0 ▶async sub conversations_rename {
Subroutine conversations_rename: not called CC=2 SCAR=17.9
Pod documented
3804 0 my ($self, %args) = @_;
3805 0 my $uri = $self->endpoint(
3806 'conversations_rename',
3807 );
3808 my $content = encode_json_utf8({
3809 0 %args{grep { exists $args{$_} } qw(channel name)}
3810 });
3811 0 my ($res) = await $self->http_post(
3812 $uri,
3813 $content,
3814 content_type => 'application/json; charset=utf-8',
3815 );
3816 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3817 0 return $res;
3818 2 }
3819  
3820  
3821 =head2 conversations_replies
3822  
3823 Retrieve a thread of messages posted to a conversation
3824  
3825 L<API method documentation|https://api.slack.com/methods/conversations.replies>
3826  
3827 Takes the following named parameters:
3828  
3829 =over 4
3830  
3831 =item * C<channel> - Conversation ID to fetch thread from. (string, optional)
3832  
3833 =item * C<ts> - Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message. (number, optional)
3834  
3835 =item * C<latest> - End of time range of messages to include in results. (number, optional)
3836  
3837 =item * C<oldest> - Start of time range of messages to include in results. (number, optional)
3838  
3839 =item * C<inclusive> - Include messages with latest or oldest timestamp in results only when either timestamp is specified. (boolean, optional)
3840  
3841 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. (integer, optional)
3842  
3843 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
3844  
3845 =back
3846  
3847 Resolves to a structure representing the response.
3848  
3849 =cut
3850  
3851 0 ▶async sub conversations_replies {
Subroutine conversations_replies: not called CC=2 SCAR=17.9
Pod documented
3852 0 my ($self, %args) = @_;
3853 my $uri = $self->endpoint(
3854 'conversations_replies',
3855 0 %args{grep { exists $args{$_} } qw(channel ts latest oldest inclusive limit cursor)}
3856 );
3857 0 my ($res) = await $self->http_get(
3858 $uri,
3859 );
3860 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3861 0 return $res;
3862 2 }
3863  
3864  
3865 =head2 conversations_set_purpose
3866  
3867 Sets the purpose for a conversation.
3868  
3869 L<API method documentation|https://api.slack.com/methods/conversations.setPurpose>
3870  
3871 Takes the following named parameters:
3872  
3873 =over 4
3874  
3875 =item * C<channel> - Conversation to set the purpose of (string, optional)
3876  
3877 =item * C<purpose> - A new, specialer purpose (string, optional)
3878  
3879 =back
3880  
3881 Resolves to a structure representing the response.
3882  
3883 =cut
3884  
3885 0 ▶async sub conversations_set_purpose {
Subroutine conversations_set_purpose: not called CC=2 SCAR=17.9
Pod documented
3886 0 my ($self, %args) = @_;
3887 0 my $uri = $self->endpoint(
3888 'conversations_set_purpose',
3889 );
3890 my $content = encode_json_utf8({
3891 0 %args{grep { exists $args{$_} } qw(channel purpose)}
3892 });
3893 0 my ($res) = await $self->http_post(
3894 $uri,
3895 $content,
3896 content_type => 'application/json; charset=utf-8',
3897 );
3898 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3899 0 return $res;
3900 2 }
3901  
3902  
3903 =head2 conversations_set_topic
3904  
3905 Sets the topic for a conversation.
3906  
3907 L<API method documentation|https://api.slack.com/methods/conversations.setTopic>
3908  
3909 Takes the following named parameters:
3910  
3911 =over 4
3912  
3913 =item * C<channel> - Conversation to set the topic of (string, optional)
3914  
3915 =item * C<topic> - The new topic string. Does not support formatting or linkification. (string, optional)
3916  
3917 =back
3918  
3919 Resolves to a structure representing the response.
3920  
3921 =cut
3922  
3923 0 ▶async sub conversations_set_topic {
Subroutine conversations_set_topic: not called CC=2 SCAR=17.9
Pod documented
3924 0 my ($self, %args) = @_;
3925 0 my $uri = $self->endpoint(
3926 'conversations_set_topic',
3927 );
3928 my $content = encode_json_utf8({
3929 0 %args{grep { exists $args{$_} } qw(channel topic)}
3930 });
3931 0 my ($res) = await $self->http_post(
3932 $uri,
3933 $content,
3934 content_type => 'application/json; charset=utf-8',
3935 );
3936 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3937 0 return $res;
3938 2 }
3939  
3940  
3941 =head2 conversations_unarchive
3942  
3943 Reverses conversation archival.
3944  
3945 L<API method documentation|https://api.slack.com/methods/conversations.unarchive>
3946  
3947 Takes the following named parameters:
3948  
3949 =over 4
3950  
3951 =item * C<channel> - ID of conversation to unarchive (string, optional)
3952  
3953 =back
3954  
3955 Resolves to a structure representing the response.
3956  
3957 =cut
3958  
3959 0 ▶async sub conversations_unarchive {
Subroutine conversations_unarchive: not called CC=2 SCAR=17.9
Pod documented
3960 0 my ($self, %args) = @_;
3961 0 my $uri = $self->endpoint(
3962 'conversations_unarchive',
3963 );
3964 my $content = encode_json_utf8({
3965 0 %args{grep { exists $args{$_} } qw(channel)}
3966 });
3967 0 my ($res) = await $self->http_post(
3968 $uri,
3969 $content,
3970 content_type => 'application/json; charset=utf-8',
3971 );
3972 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
3973 0 return $res;
3974 2 }
3975  
3976  
3977 =head2 dialog_open
3978  
3979 Open a dialog with a user
3980  
3981 L<API method documentation|https://api.slack.com/methods/dialog.open>
3982  
3983 Takes the following named parameters:
3984  
3985 =over 4
3986  
3987 =item * C<dialog> - The dialog definition. This must be a JSON-encoded string. (string, required)
3988  
3989 =item * C<trigger_id> - Exchange a trigger to post to the user. (string, required)
3990  
3991 =back
3992  
3993 Resolves to a structure representing the response.
3994  
3995 =cut
3996  
3997 0 ▶async sub dialog_open {
Subroutine dialog_open: not called CC=2 SCAR=17.9
Pod documented
3998 0 my ($self, %args) = @_;
3999 0 my $uri = $self->endpoint(
4000 'dialog_open',
4001 );
4002 my $content = encode_json_utf8({
4003 0 %args{grep { exists $args{$_} } qw(dialog trigger_id)}
4004 });
4005 0 my ($res) = await $self->http_post(
4006 $uri,
4007 $content,
4008 content_type => 'application/json; charset=utf-8',
4009 );
4010 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4011 0 return $res;
4012 2 }
4013  
4014  
4015 =head2 dnd_end_dnd
4016  
4017 Ends the current user's Do Not Disturb session immediately.
4018  
4019 L<API method documentation|https://api.slack.com/methods/dnd.endDnd>
4020  
4021 Resolves to a structure representing the response.
4022  
4023 =cut
4024  
4025 0 ▶async sub dnd_end_dnd {
Subroutine dnd_end_dnd: not called CC=2 SCAR=17.9
Pod documented
4026 0 my ($self, %args) = @_;
4027 0 my $uri = $self->endpoint(
4028 'dnd_end_dnd',
4029 );
4030 0 my ($res) = await $self->http_post(
4031 $uri,
4032 );
4033 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4034 0 return $res;
4035 2 }
4036  
4037  
4038 =head2 dnd_end_snooze
4039  
4040 Ends the current user's snooze mode immediately.
4041  
4042 L<API method documentation|https://api.slack.com/methods/dnd.endSnooze>
4043  
4044 Resolves to a structure representing the response.
4045  
4046 =cut
4047  
4048 0 ▶async sub dnd_end_snooze {
Subroutine dnd_end_snooze: not called CC=2 SCAR=17.9
Pod documented
4049 0 my ($self, %args) = @_;
4050 0 my $uri = $self->endpoint(
4051 'dnd_end_snooze',
4052 );
4053 0 my ($res) = await $self->http_post(
4054 $uri,
4055 );
4056 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4057 0 return $res;
4058 2 }
4059  
4060  
4061 =head2 dnd_info
4062  
4063 Retrieves a user's current Do Not Disturb status.
4064  
4065 L<API method documentation|https://api.slack.com/methods/dnd.info>
4066  
4067 Takes the following named parameters:
4068  
4069 =over 4
4070  
4071 =item * C<user> - User to fetch status for (defaults to current user) (string, optional)
4072  
4073 =back
4074  
4075 Resolves to a structure representing the response.
4076  
4077 =cut
4078  
4079 0 ▶async sub dnd_info {
Subroutine dnd_info: not called CC=2 SCAR=17.9
Pod documented
4080 0 my ($self, %args) = @_;
4081 my $uri = $self->endpoint(
4082 'dnd_info',
4083 0 %args{grep { exists $args{$_} } qw(user)}
4084 );
4085 0 my ($res) = await $self->http_get(
4086 $uri,
4087 );
4088 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4089 0 return $res;
4090 2 }
4091  
4092  
4093 =head2 dnd_set_snooze
4094  
4095 Turns on Do Not Disturb mode for the current user, or changes its duration.
4096  
4097 L<API method documentation|https://api.slack.com/methods/dnd.setSnooze>
4098  
4099 Takes the following named parameters:
4100  
4101 =over 4
4102  
4103 =item * C<num_minutes> - Number of minutes, from now, to snooze until. (string, required)
4104  
4105 =back
4106  
4107 Resolves to a structure representing the response.
4108  
4109 =cut
4110  
4111 0 ▶async sub dnd_set_snooze {
Subroutine dnd_set_snooze: not called CC=2 SCAR=17.9
Pod documented
4112 0 my ($self, %args) = @_;
4113 0 my $uri = $self->endpoint(
4114 'dnd_set_snooze',
4115 );
4116 my $content = encode_json_utf8({
4117 0 %args{grep { exists $args{$_} } qw(num_minutes)}
4118 });
4119 0 my ($res) = await $self->http_post(
4120 $uri,
4121 $content,
4122 content_type => 'application/json; charset=utf-8',
4123 );
4124 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4125 0 return $res;
4126 2 }
4127  
4128  
4129 =head2 dnd_team_info
4130  
4131 Retrieves the Do Not Disturb status for up to 50 users on a team.
4132  
4133 L<API method documentation|https://api.slack.com/methods/dnd.teamInfo>
4134  
4135 Takes the following named parameters:
4136  
4137 =over 4
4138  
4139 =item * C<users> - Comma-separated list of users to fetch Do Not Disturb status for (string, optional)
4140  
4141 =back
4142  
4143 Resolves to a structure representing the response.
4144  
4145 =cut
4146  
4147 0 ▶async sub dnd_team_info {
Subroutine dnd_team_info: not called CC=2 SCAR=17.9
Pod documented
4148 0 my ($self, %args) = @_;
4149 my $uri = $self->endpoint(
4150 'dnd_team_info',
4151 0 %args{grep { exists $args{$_} } qw(users)}
4152 );
4153 0 my ($res) = await $self->http_get(
4154 $uri,
4155 );
4156 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4157 0 return $res;
4158 2 }
4159  
4160  
4161 =head2 emoji_list
4162  
4163 Lists custom emoji for a team.
4164  
4165 L<API method documentation|https://api.slack.com/methods/emoji.list>
4166  
4167 Resolves to a structure representing the response.
4168  
4169 =cut
4170  
4171 0 ▶async sub emoji_list {
Subroutine emoji_list: not called CC=2 SCAR=17.9
Pod documented
4172 0 my ($self, %args) = @_;
4173 0 my $uri = $self->endpoint(
4174 'emoji_list',
4175 );
4176 0 my ($res) = await $self->http_get(
4177 $uri,
4178 );
4179 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4180 0 return $res;
4181 2 }
4182  
4183  
4184 =head2 files_comments_delete
4185  
4186 Deletes an existing comment on a file.
4187  
4188 L<API method documentation|https://api.slack.com/methods/files.comments.delete>
4189  
4190 Takes the following named parameters:
4191  
4192 =over 4
4193  
4194 =item * C<file> - File to delete a comment from. (string, optional)
4195  
4196 =item * C<id> - The comment to delete. (string, optional)
4197  
4198 =back
4199  
4200 Resolves to a structure representing the response.
4201  
4202 =cut
4203  
4204 0 ▶async sub files_comments_delete {
Subroutine files_comments_delete: not called CC=2 SCAR=17.9
Pod documented
4205 0 my ($self, %args) = @_;
4206 0 my $uri = $self->endpoint(
4207 'files_comments_delete',
4208 );
4209 my $content = encode_json_utf8({
4210 0 %args{grep { exists $args{$_} } qw(file id)}
4211 });
4212 0 my ($res) = await $self->http_post(
4213 $uri,
4214 $content,
4215 content_type => 'application/json; charset=utf-8',
4216 );
4217 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4218 0 return $res;
4219 2 }
4220  
4221  
4222 =head2 files_delete
4223  
4224 Deletes a file.
4225  
4226 L<API method documentation|https://api.slack.com/methods/files.delete>
4227  
4228 Takes the following named parameters:
4229  
4230 =over 4
4231  
4232 =item * C<file> - ID of file to delete. (string, optional)
4233  
4234 =back
4235  
4236 Resolves to a structure representing the response.
4237  
4238 =cut
4239  
4240 0 ▶async sub files_delete {
Subroutine files_delete: not called CC=2 SCAR=17.9
Pod documented
4241 0 my ($self, %args) = @_;
4242 0 my $uri = $self->endpoint(
4243 'files_delete',
4244 );
4245 my $content = encode_json_utf8({
4246 0 %args{grep { exists $args{$_} } qw(file)}
4247 });
4248 0 my ($res) = await $self->http_post(
4249 $uri,
4250 $content,
4251 content_type => 'application/json; charset=utf-8',
4252 );
4253 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4254 0 return $res;
4255 2 }
4256  
4257  
4258 =head2 files_info
4259  
4260 Gets information about a file.
4261  
4262 L<API method documentation|https://api.slack.com/methods/files.info>
4263  
4264 Takes the following named parameters:
4265  
4266 =over 4
4267  
4268 =item * C<file> - Specify a file by providing its ID. (string, optional)
4269  
4270 =item * C<count> - (string, optional)
4271  
4272 =item * C<page> - (string, optional)
4273  
4274 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. (integer, optional)
4275  
4276 =item * C<cursor> - Parameter for pagination. File comments are paginated for a single file. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection of comments. See [pagination](/docs/pagination) for more details. (string, optional)
4277  
4278 =back
4279  
4280 Resolves to a structure representing the response.
4281  
4282 =cut
4283  
4284 0 ▶async sub files_info {
Subroutine files_info: not called CC=2 SCAR=17.9
Pod documented
4285 0 my ($self, %args) = @_;
4286 my $uri = $self->endpoint(
4287 'files_info',
4288 0 %args{grep { exists $args{$_} } qw(file count page limit cursor)}
4289 );
4290 0 my ($res) = await $self->http_get(
4291 $uri,
4292 );
4293 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4294 0 return $res;
4295 2 }
4296  
4297  
4298 =head2 files_list
4299  
4300 List for a team, in a channel, or from a user with applied filters.
4301  
4302 L<API method documentation|https://api.slack.com/methods/files.list>
4303  
4304 Takes the following named parameters:
4305  
4306 =over 4
4307  
4308 =item * C<user> - Filter files created by a single user. (string, optional)
4309  
4310 =item * C<channel> - Filter files appearing in a specific channel, indicated by its ID. (string, optional)
4311  
4312 =item * C<ts_from> - Filter files created after this timestamp (inclusive). (number, optional)
4313  
4314 =item * C<ts_to> - Filter files created before this timestamp (inclusive). (number, optional)
4315  
4316 =item * C<types> - Filter files by type ([see below](#file_types)). You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list. (string, optional)
4317  
4318 =item * C<count> - (string, optional)
4319  
4320 =item * C<page> - (string, optional)
4321  
4322 =item * C<show_files_hidden_by_limit> - Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit. (boolean, optional)
4323  
4324 =back
4325  
4326 Resolves to a structure representing the response.
4327  
4328 =cut
4329  
4330 0 ▶async sub files_list {
Subroutine files_list: not called CC=2 SCAR=17.9
Pod documented
4331 0 my ($self, %args) = @_;
4332 my $uri = $self->endpoint(
4333 'files_list',
4334 0 %args{grep { exists $args{$_} } qw(user channel ts_from ts_to types count page show_files_hidden_by_limit)}
4335 );
4336 0 my ($res) = await $self->http_get(
4337 $uri,
4338 );
4339 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4340 0 return $res;
4341 2 }
4342  
4343  
4344 =head2 files_remote_add
4345  
4346 Adds a file from a remote service
4347  
4348 L<API method documentation|https://api.slack.com/methods/files.remote.add>
4349  
4350 Takes the following named parameters:
4351  
4352 =over 4
4353  
4354 =item * C<external_id> - Creator defined GUID for the file. (string, optional)
4355  
4356 =item * C<title> - Title of the file being shared. (string, optional)
4357  
4358 =item * C<filetype> - type of file (string, optional)
4359  
4360 =item * C<external_url> - URL of the remote file. (string, optional)
4361  
4362 =item * C<preview_image> - Preview of the document via `multipart/form-data`. (string, optional)
4363  
4364 =item * C<indexable_file_contents> - A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file. (string, optional)
4365  
4366 =back
4367  
4368 Resolves to a structure representing the response.
4369  
4370 =cut
4371  
4372 0 ▶async sub files_remote_add {
Subroutine files_remote_add: not called CC=2 SCAR=17.9
Pod documented
4373 0 my ($self, %args) = @_;
4374 0 my $uri = $self->endpoint(
4375 'files_remote_add',
4376 );
4377 my $content = encode_json_utf8({
4378 0 %args{grep { exists $args{$_} } qw(external_id title filetype external_url preview_image indexable_file_contents)}
4379 });
4380 0 my ($res) = await $self->http_post(
4381 $uri,
4382 $content,
4383 content_type => 'application/json; charset=utf-8',
4384 );
4385 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4386 0 return $res;
4387 2 }
4388  
4389  
4390 =head2 files_remote_info
4391  
4392 Retrieve information about a remote file added to Slack
4393  
4394 L<API method documentation|https://api.slack.com/methods/files.remote.info>
4395  
4396 Takes the following named parameters:
4397  
4398 =over 4
4399  
4400 =item * C<file> - Specify a file by providing its ID. (string, optional)
4401  
4402 =item * C<external_id> - Creator defined GUID for the file. (string, optional)
4403  
4404 =back
4405  
4406 Resolves to a structure representing the response.
4407  
4408 =cut
4409  
4410 0 ▶async sub files_remote_info {
Subroutine files_remote_info: not called CC=2 SCAR=17.9
Pod documented
4411 0 my ($self, %args) = @_;
4412 my $uri = $self->endpoint(
4413 'files_remote_info',
4414 0 %args{grep { exists $args{$_} } qw(file external_id)}
4415 );
4416 0 my ($res) = await $self->http_get(
4417 $uri,
4418 );
4419 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4420 0 return $res;
4421 2 }
4422  
4423  
4424 =head2 files_remote_list
4425  
4426 Retrieve information about a remote file added to Slack
4427  
4428 L<API method documentation|https://api.slack.com/methods/files.remote.list>
4429  
4430 Takes the following named parameters:
4431  
4432 =over 4
4433  
4434 =item * C<channel> - Filter files appearing in a specific channel, indicated by its ID. (string, optional)
4435  
4436 =item * C<ts_from> - Filter files created after this timestamp (inclusive). (number, optional)
4437  
4438 =item * C<ts_to> - Filter files created before this timestamp (inclusive). (number, optional)
4439  
4440 =item * C<limit> - The maximum number of items to return. (integer, optional)
4441  
4442 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
4443  
4444 =back
4445  
4446 Resolves to a structure representing the response.
4447  
4448 =cut
4449  
4450 0 ▶async sub files_remote_list {
Subroutine files_remote_list: not called CC=2 SCAR=17.9
Pod documented
4451 0 my ($self, %args) = @_;
4452 my $uri = $self->endpoint(
4453 'files_remote_list',
4454 0 %args{grep { exists $args{$_} } qw(channel ts_from ts_to limit cursor)}
4455 );
4456 0 my ($res) = await $self->http_get(
4457 $uri,
4458 );
4459 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4460 0 return $res;
4461 2 }
4462  
4463  
4464 =head2 files_remote_remove
4465  
4466 Remove a remote file.
4467  
4468 L<API method documentation|https://api.slack.com/methods/files.remote.remove>
4469  
4470 Takes the following named parameters:
4471  
4472 =over 4
4473  
4474 =item * C<file> - Specify a file by providing its ID. (string, optional)
4475  
4476 =item * C<external_id> - Creator defined GUID for the file. (string, optional)
4477  
4478 =back
4479  
4480 Resolves to a structure representing the response.
4481  
4482 =cut
4483  
4484 0 ▶async sub files_remote_remove {
Subroutine files_remote_remove: not called CC=2 SCAR=17.9
Pod documented
4485 0 my ($self, %args) = @_;
4486 0 my $uri = $self->endpoint(
4487 'files_remote_remove',
4488 );
4489 my $content = encode_json_utf8({
4490 0 %args{grep { exists $args{$_} } qw(file external_id)}
4491 });
4492 0 my ($res) = await $self->http_post(
4493 $uri,
4494 $content,
4495 content_type => 'application/json; charset=utf-8',
4496 );
4497 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4498 0 return $res;
4499 2 }
4500  
4501  
4502 =head2 files_remote_share
4503  
4504 Share a remote file into a channel.
4505  
4506 L<API method documentation|https://api.slack.com/methods/files.remote.share>
4507  
4508 Takes the following named parameters:
4509  
4510 =over 4
4511  
4512 =item * C<file> - Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required. (string, optional)
4513  
4514 =item * C<external_id> - The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack. Either this field or `file` or both are required. (string, optional)
4515  
4516 =item * C<channels> - Comma-separated list of channel IDs where the file will be shared. (string, optional)
4517  
4518 =back
4519  
4520 Resolves to a structure representing the response.
4521  
4522 =cut
4523  
4524 0 ▶async sub files_remote_share {
Subroutine files_remote_share: not called CC=2 SCAR=17.9
Pod documented
4525 0 my ($self, %args) = @_;
4526 my $uri = $self->endpoint(
4527 'files_remote_share',
4528 0 %args{grep { exists $args{$_} } qw(file external_id channels)}
4529 );
4530 0 my ($res) = await $self->http_get(
4531 $uri,
4532 );
4533 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4534 0 return $res;
4535 2 }
4536  
4537  
4538 =head2 files_remote_update
4539  
4540 Updates an existing remote file.
4541  
4542 L<API method documentation|https://api.slack.com/methods/files.remote.update>
4543  
4544 Takes the following named parameters:
4545  
4546 =over 4
4547  
4548 =item * C<file> - Specify a file by providing its ID. (string, optional)
4549  
4550 =item * C<external_id> - Creator defined GUID for the file. (string, optional)
4551  
4552 =item * C<title> - Title of the file being shared. (string, optional)
4553  
4554 =item * C<filetype> - type of file (string, optional)
4555  
4556 =item * C<external_url> - URL of the remote file. (string, optional)
4557  
4558 =item * C<preview_image> - Preview of the document via `multipart/form-data`. (string, optional)
4559  
4560 =item * C<indexable_file_contents> - File containing contents that can be used to improve searchability for the remote file. (string, optional)
4561  
4562 =back
4563  
4564 Resolves to a structure representing the response.
4565  
4566 =cut
4567  
4568 0 ▶async sub files_remote_update {
Subroutine files_remote_update: not called CC=2 SCAR=17.9
Pod documented
4569 0 my ($self, %args) = @_;
4570 0 my $uri = $self->endpoint(
4571 'files_remote_update',
4572 );
4573 my $content = encode_json_utf8({
4574 0 %args{grep { exists $args{$_} } qw(file external_id title filetype external_url preview_image indexable_file_contents)}
4575 });
4576 0 my ($res) = await $self->http_post(
4577 $uri,
4578 $content,
4579 content_type => 'application/json; charset=utf-8',
4580 );
4581 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4582 0 return $res;
4583 2 }
4584  
4585  
4586 =head2 files_revoke_public_url
4587  
4588 Revokes public/external sharing access for a file
4589  
4590 L<API method documentation|https://api.slack.com/methods/files.revokePublicURL>
4591  
4592 Takes the following named parameters:
4593  
4594 =over 4
4595  
4596 =item * C<file> - File to revoke (string, optional)
4597  
4598 =back
4599  
4600 Resolves to a structure representing the response.
4601  
4602 =cut
4603  
4604 0 ▶async sub files_revoke_public_url {
Subroutine files_revoke_public_url: not called CC=2 SCAR=17.9
Pod documented
4605 0 my ($self, %args) = @_;
4606 0 my $uri = $self->endpoint(
4607 'files_revoke_public_url',
4608 );
4609 my $content = encode_json_utf8({
4610 0 %args{grep { exists $args{$_} } qw(file)}
4611 });
4612 0 my ($res) = await $self->http_post(
4613 $uri,
4614 $content,
4615 content_type => 'application/json; charset=utf-8',
4616 );
4617 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4618 0 return $res;
4619 2 }
4620  
4621  
4622 =head2 files_shared_public_url
4623  
4624 Enables a file for public/external sharing.
4625  
4626 L<API method documentation|https://api.slack.com/methods/files.sharedPublicURL>
4627  
4628 Takes the following named parameters:
4629  
4630 =over 4
4631  
4632 =item * C<file> - File to share (string, optional)
4633  
4634 =back
4635  
4636 Resolves to a structure representing the response.
4637  
4638 =cut
4639  
4640 0 ▶async sub files_shared_public_url {
Subroutine files_shared_public_url: not called CC=2 SCAR=17.9
Pod documented
4641 0 my ($self, %args) = @_;
4642 0 my $uri = $self->endpoint(
4643 'files_shared_public_url',
4644 );
4645 my $content = encode_json_utf8({
4646 0 %args{grep { exists $args{$_} } qw(file)}
4647 });
4648 0 my ($res) = await $self->http_post(
4649 $uri,
4650 $content,
4651 content_type => 'application/json; charset=utf-8',
4652 );
4653 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4654 0 return $res;
4655 2 }
4656  
4657 =head2 migration_exchange
4658  
4659 For Enterprise Grid workspaces, map local user IDs to global user IDs
4660  
4661 L<API method documentation|https://api.slack.com/methods/migration.exchange>
4662  
4663 Takes the following named parameters:
4664  
4665 =over 4
4666  
4667 =item * C<users> - A comma-separated list of user ids, up to 400 per request (string, required)
4668  
4669 =item * C<team_id> - Specify team_id starts with `T` in case of Org Token (string, optional)
4670  
4671 =item * C<to_old> - Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`. (boolean, optional)
4672  
4673 =back
4674  
4675 Resolves to a structure representing the response.
4676  
4677 =cut
4678  
4679 0 ▶async sub migration_exchange {
Subroutine migration_exchange: not called CC=2 SCAR=17.9
Pod documented
4680 0 my ($self, %args) = @_;
4681 my $uri = $self->endpoint(
4682 'migration_exchange',
4683 0 %args{grep { exists $args{$_} } qw(users team_id to_old)}
4684 );
4685 0 my ($res) = await $self->http_get(
4686 $uri,
4687 );
4688 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4689 0 return $res;
4690 2 }
4691  
4692  
4693 =head2 oauth_access
4694  
4695 Exchanges a temporary OAuth verifier code for an access token.
4696  
4697 L<API method documentation|https://api.slack.com/methods/oauth.access>
4698  
4699 Takes the following named parameters:
4700  
4701 =over 4
4702  
4703 =item * C<client_id> - Issued when you created your application. (string, optional)
4704  
4705 =item * C<client_secret> - Issued when you created your application. (string, optional)
4706  
4707 =item * C<code> - The `code` param returned via the OAuth callback. (string, optional)
4708  
4709 =item * C<redirect_uri> - This must match the originally submitted URI (if one was sent). (string, optional)
4710  
4711 =item * C<single_channel> - Request the user to add your app only to a single channel. Only valid with a [legacy workspace app](https://api.slack.com/legacy-workspace-apps). (boolean, optional)
4712  
4713 =back
4714  
4715 Resolves to a structure representing the response.
4716  
4717 =cut
4718  
4719 0 ▶async sub oauth_access {
Subroutine oauth_access: not called CC=2 SCAR=17.9
Pod documented
4720 0 my ($self, %args) = @_;
4721 my $uri = $self->endpoint(
4722 'oauth_access',
4723 0 %args{grep { exists $args{$_} } qw(client_id client_secret code redirect_uri single_channel)}
4724 );
4725 0 my ($res) = await $self->http_get(
4726 $uri,
4727 );
4728 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4729 0 return $res;
4730 2 }
4731  
4732  
4733 =head2 oauth_token
4734  
4735 Exchanges a temporary OAuth verifier code for a workspace token.
4736  
4737 L<API method documentation|https://api.slack.com/methods/oauth.token>
4738  
4739 Takes the following named parameters:
4740  
4741 =over 4
4742  
4743 =item * C<client_id> - Issued when you created your application. (string, optional)
4744  
4745 =item * C<client_secret> - Issued when you created your application. (string, optional)
4746  
4747 =item * C<code> - The `code` param returned via the OAuth callback. (string, optional)
4748  
4749 =item * C<redirect_uri> - This must match the originally submitted URI (if one was sent). (string, optional)
4750  
4751 =item * C<single_channel> - Request the user to add your app only to a single channel. (boolean, optional)
4752  
4753 =back
4754  
4755 Resolves to a structure representing the response.
4756  
4757 =cut
4758  
4759 0 ▶async sub oauth_token {
Subroutine oauth_token: not called CC=2 SCAR=17.9
Pod documented
4760 0 my ($self, %args) = @_;
4761 my $uri = $self->endpoint(
4762 'oauth_token',
4763 0 %args{grep { exists $args{$_} } qw(client_id client_secret code redirect_uri single_channel)}
4764 );
4765 0 my ($res) = await $self->http_get(
4766 $uri,
4767 );
4768 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4769 0 return $res;
4770 2 }
4771  
4772  
4773 =head2 oauth_v2_access
4774  
4775 Exchanges a temporary OAuth verifier code for an access token.
4776  
4777 L<API method documentation|https://api.slack.com/methods/oauth.v2.access>
4778  
4779 Takes the following named parameters:
4780  
4781 =over 4
4782  
4783 =item * C<client_id> - Issued when you created your application. (string, optional)
4784  
4785 =item * C<client_secret> - Issued when you created your application. (string, optional)
4786  
4787 =item * C<code> - The `code` param returned via the OAuth callback. (string, required)
4788  
4789 =item * C<redirect_uri> - This must match the originally submitted URI (if one was sent). (string, optional)
4790  
4791 =back
4792  
4793 Resolves to a structure representing the response.
4794  
4795 =cut
4796  
4797 0 ▶async sub oauth_v2_access {
Subroutine oauth_v2_access: not called CC=2 SCAR=17.9
Pod documented
4798 0 my ($self, %args) = @_;
4799 my $uri = $self->endpoint(
4800 'oauth_v2_access',
4801 0 %args{grep { exists $args{$_} } qw(client_id client_secret code redirect_uri)}
4802 );
4803 0 my ($res) = await $self->http_get(
4804 $uri,
4805 );
4806 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4807 0 return $res;
4808 2 }
4809  
4810  
4811 =head2 pins_add
4812  
4813 Pins an item to a channel.
4814  
4815 L<API method documentation|https://api.slack.com/methods/pins.add>
4816  
4817 Takes the following named parameters:
4818  
4819 =over 4
4820  
4821 =item * C<channel> - Channel to pin the item in. (string, required)
4822  
4823 =item * C<timestamp> - Timestamp of the message to pin. (string, optional)
4824  
4825 =back
4826  
4827 Resolves to a structure representing the response.
4828  
4829 =cut
4830  
4831 0 ▶async sub pins_add {
Subroutine pins_add: not called CC=2 SCAR=17.9
Pod documented
4832 0 my ($self, %args) = @_;
4833 0 my $uri = $self->endpoint(
4834 'pins_add',
4835 );
4836 my $content = encode_json_utf8({
4837 0 %args{grep { exists $args{$_} } qw(channel timestamp)}
4838 });
4839 0 my ($res) = await $self->http_post(
4840 $uri,
4841 $content,
4842 content_type => 'application/json; charset=utf-8',
4843 );
4844 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4845 0 return $res;
4846 2 }
4847  
4848  
4849 =head2 pins_list
4850  
4851 Lists items pinned to a channel.
4852  
4853 L<API method documentation|https://api.slack.com/methods/pins.list>
4854  
4855 Takes the following named parameters:
4856  
4857 =over 4
4858  
4859 =item * C<channel> - Channel to get pinned items for. (string, required)
4860  
4861 =back
4862  
4863 Resolves to a structure representing the response.
4864  
4865 =cut
4866  
4867 0 ▶async sub pins_list {
Subroutine pins_list: not called CC=1 SCAR=6.9
Pod documented
4868 0 my ($self, %args) = @_;
4869 my $uri = $self->endpoint(
4870 'pins_list',
4871 0 %args{grep { exists $args{$_} } qw(channel)}
4872 );
4873 0 my ($res) = await $self->http_get(
4874 $uri,
4875 );
4876 0 return $res;
4877 2 }
4878  
4879  
4880 =head2 pins_remove
4881  
4882 Un-pins an item from a channel.
4883  
4884 L<API method documentation|https://api.slack.com/methods/pins.remove>
4885  
4886 Takes the following named parameters:
4887  
4888 =over 4
4889  
4890 =item * C<channel> - Channel where the item is pinned to. (string, required)
4891  
4892 =item * C<timestamp> - Timestamp of the message to un-pin. (string, optional)
4893  
4894 =back
4895  
4896 Resolves to a structure representing the response.
4897  
4898 =cut
4899  
4900 0 ▶async sub pins_remove {
Subroutine pins_remove: not called CC=2 SCAR=17.9
Pod documented
4901 0 my ($self, %args) = @_;
4902 0 my $uri = $self->endpoint(
4903 'pins_remove',
4904 );
4905 my $content = encode_json_utf8({
4906 0 %args{grep { exists $args{$_} } qw(channel timestamp)}
4907 });
4908 0 my ($res) = await $self->http_post(
4909 $uri,
4910 $content,
4911 content_type => 'application/json; charset=utf-8',
4912 );
4913 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4914 0 return $res;
4915 2 }
4916  
4917  
4918 =head2 reactions_add
4919  
4920 Adds a reaction to an item.
4921  
4922 L<API method documentation|https://api.slack.com/methods/reactions.add>
4923  
4924 Takes the following named parameters:
4925  
4926 =over 4
4927  
4928 =item * C<channel> - Channel where the message to add reaction to was posted. (string, required)
4929  
4930 =item * C<name> - Reaction (emoji) name. (string, required)
4931  
4932 =item * C<timestamp> - Timestamp of the message to add reaction to. (string, required)
4933  
4934 =back
4935  
4936 Resolves to a structure representing the response.
4937  
4938 =cut
4939  
4940 0 ▶async sub reactions_add {
Subroutine reactions_add: not called CC=2 SCAR=17.9
Pod documented
4941 0 my ($self, %args) = @_;
4942 0 my $uri = $self->endpoint(
4943 'reactions_add',
4944 );
4945 my $content = encode_json_utf8({
4946 0 %args{grep { exists $args{$_} } qw(channel name timestamp)}
4947 });
4948 0 my ($res) = await $self->http_post(
4949 $uri,
4950 $content,
4951 content_type => 'application/json; charset=utf-8',
4952 );
4953 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4954 0 return $res;
4955 2 }
4956  
4957  
4958 =head2 reactions_get
4959  
4960 Gets reactions for an item.
4961  
4962 L<API method documentation|https://api.slack.com/methods/reactions.get>
4963  
4964 Takes the following named parameters:
4965  
4966 =over 4
4967  
4968 =item * C<channel> - Channel where the message to get reactions for was posted. (string, optional)
4969  
4970 =item * C<file> - File to get reactions for. (string, optional)
4971  
4972 =item * C<file_comment> - File comment to get reactions for. (string, optional)
4973  
4974 =item * C<full> - If true always return the complete reaction list. (boolean, optional)
4975  
4976 =item * C<timestamp> - Timestamp of the message to get reactions for. (string, optional)
4977  
4978 =back
4979  
4980 Resolves to a structure representing the response.
4981  
4982 =cut
4983  
4984 0 ▶async sub reactions_get {
Subroutine reactions_get: not called CC=1 SCAR=6.9
Pod documented
4985 0 my ($self, %args) = @_;
4986 my $uri = $self->endpoint(
4987 'reactions_get',
4988 0 %args{grep { exists $args{$_} } qw(channel file file_comment full timestamp)}
4989 );
4990 0 my ($res) = await $self->http_get(
4991 $uri,
4992 );
4993 0 return $res;
4994 2 }
4995  
4996  
4997 =head2 reactions_list
4998  
4999 Lists reactions made by a user.
5000  
5001 L<API method documentation|https://api.slack.com/methods/reactions.list>
5002  
5003 Takes the following named parameters:
5004  
5005 =over 4
5006  
5007 =item * C<user> - Show reactions made by this user. Defaults to the authed user. (string, optional)
5008  
5009 =item * C<full> - If true always return the complete reaction list. (boolean, optional)
5010  
5011 =item * C<count> - (integer, optional)
5012  
5013 =item * C<page> - (integer, optional)
5014  
5015 =item * C<cursor> - Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See [pagination](/docs/pagination) for more details. (string, optional)
5016  
5017 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. (integer, optional)
5018  
5019 =back
5020  
5021 Resolves to a structure representing the response.
5022  
5023 =cut
5024  
5025 0 ▶async sub reactions_list {
Subroutine reactions_list: not called CC=2 SCAR=17.9
Pod documented
5026 0 my ($self, %args) = @_;
5027 my $uri = $self->endpoint(
5028 'reactions_list',
5029 0 %args{grep { exists $args{$_} } qw(user full count page cursor limit)}
5030 );
5031 0 my ($res) = await $self->http_get(
5032 $uri,
5033 );
5034 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5035 0 return $res;
5036 2 }
5037  
5038  
5039 =head2 reactions_remove
5040  
5041 Removes a reaction from an item.
5042  
5043 L<API method documentation|https://api.slack.com/methods/reactions.remove>
5044  
5045 Takes the following named parameters:
5046  
5047 =over 4
5048  
5049 =item * C<name> - Reaction (emoji) name. (string, required)
5050  
5051 =item * C<file> - File to remove reaction from. (string, optional)
5052  
5053 =item * C<file_comment> - File comment to remove reaction from. (string, optional)
5054  
5055 =item * C<channel> - Channel where the message to remove reaction from was posted. (string, optional)
5056  
5057 =item * C<timestamp> - Timestamp of the message to remove reaction from. (string, optional)
5058  
5059 =back
5060  
5061 Resolves to a structure representing the response.
5062  
5063 =cut
5064  
5065 0 ▶async sub reactions_remove {
Subroutine reactions_remove: not called CC=2 SCAR=17.9
Pod documented
5066 0 my ($self, %args) = @_;
5067 0 my $uri = $self->endpoint(
5068 'reactions_remove',
5069 );
5070 my $content = encode_json_utf8({
5071 0 %args{grep { exists $args{$_} } qw(name file file_comment channel timestamp)}
5072 });
5073 0 my ($res) = await $self->http_post(
5074 $uri,
5075 $content,
5076 content_type => 'application/json; charset=utf-8',
5077 );
5078 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5079 0 return $res;
5080 2 }
5081  
5082  
5083 =head2 reminders_add
5084  
5085 Creates a reminder.
5086  
5087 L<API method documentation|https://api.slack.com/methods/reminders.add>
5088  
5089 Takes the following named parameters:
5090  
5091 =over 4
5092  
5093 =item * C<text> - The content of the reminder (string, required)
5094  
5095 =item * C<time> - When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday") (string, required)
5096  
5097 =item * C<user> - The user who will receive the reminder. If no user is specified, the reminder will go to user who created it. (string, optional)
5098  
5099 =back
5100  
5101 Resolves to a structure representing the response.
5102  
5103 =cut
5104  
5105 0 ▶async sub reminders_add {
Subroutine reminders_add: not called CC=2 SCAR=17.9
Pod documented
5106 0 my ($self, %args) = @_;
5107 0 my $uri = $self->endpoint(
5108 'reminders_add',
5109 );
5110 my $content = encode_json_utf8({
5111 0 %args{grep { exists $args{$_} } qw(text time user)}
5112 });
5113 0 my ($res) = await $self->http_post(
5114 $uri,
5115 $content,
5116 content_type => 'application/json; charset=utf-8',
5117 );
5118 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5119 0 return $res;
5120 2 }
5121  
5122  
5123 =head2 reminders_complete
5124  
5125 Marks a reminder as complete.
5126  
5127 L<API method documentation|https://api.slack.com/methods/reminders.complete>
5128  
5129 Takes the following named parameters:
5130  
5131 =over 4
5132  
5133 =item * C<reminder> - The ID of the reminder to be marked as complete (string, optional)
5134  
5135 =back
5136  
5137 Resolves to a structure representing the response.
5138  
5139 =cut
5140  
5141 0 ▶async sub reminders_complete {
Subroutine reminders_complete: not called CC=2 SCAR=17.9
Pod documented
5142 0 my ($self, %args) = @_;
5143 0 my $uri = $self->endpoint(
5144 'reminders_complete',
5145 );
5146 my $content = encode_json_utf8({
5147 0 %args{grep { exists $args{$_} } qw(reminder)}
5148 });
5149 0 my ($res) = await $self->http_post(
5150 $uri,
5151 $content,
5152 content_type => 'application/json; charset=utf-8',
5153 );
5154 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5155 0 return $res;
5156 2 }
5157  
5158  
5159 =head2 reminders_delete
5160  
5161 Deletes a reminder.
5162  
5163 L<API method documentation|https://api.slack.com/methods/reminders.delete>
5164  
5165 Takes the following named parameters:
5166  
5167 =over 4
5168  
5169 =item * C<reminder> - The ID of the reminder (string, optional)
5170  
5171 =back
5172  
5173 Resolves to a structure representing the response.
5174  
5175 =cut
5176  
5177 0 ▶async sub reminders_delete {
Subroutine reminders_delete: not called CC=2 SCAR=17.9
Pod documented
5178 0 my ($self, %args) = @_;
5179 0 my $uri = $self->endpoint(
5180 'reminders_delete',
5181 );
5182 my $content = encode_json_utf8({
5183 0 %args{grep { exists $args{$_} } qw(reminder)}
5184 });
5185 0 my ($res) = await $self->http_post(
5186 $uri,
5187 $content,
5188 content_type => 'application/json; charset=utf-8',
5189 );
5190 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5191 0 return $res;
5192 2 }
5193  
5194  
5195 =head2 reminders_info
5196  
5197 Gets information about a reminder.
5198  
5199 L<API method documentation|https://api.slack.com/methods/reminders.info>
5200  
5201 Takes the following named parameters:
5202  
5203 =over 4
5204  
5205 =item * C<reminder> - The ID of the reminder (string, optional)
5206  
5207 =back
5208  
5209 Resolves to a structure representing the response.
5210  
5211 =cut
5212  
5213 0 ▶async sub reminders_info {
Subroutine reminders_info: not called CC=2 SCAR=17.9
Pod documented
5214 0 my ($self, %args) = @_;
5215 my $uri = $self->endpoint(
5216 'reminders_info',
5217 0 %args{grep { exists $args{$_} } qw(reminder)}
5218 );
5219 0 my ($res) = await $self->http_get(
5220 $uri,
5221 );
5222 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5223 0 return $res;
5224 2 }
5225  
5226  
5227 =head2 reminders_list
5228  
5229 Lists all reminders created by or for a given user.
5230  
5231 L<API method documentation|https://api.slack.com/methods/reminders.list>
5232  
5233 Resolves to a structure representing the response.
5234  
5235 =cut
5236  
5237 0 ▶async sub reminders_list {
Subroutine reminders_list: not called CC=2 SCAR=17.9
Pod documented
5238 0 my ($self, %args) = @_;
5239 0 my $uri = $self->endpoint(
5240 'reminders_list',
5241 );
5242 0 my ($res) = await $self->http_get(
5243 $uri,
5244 );
5245 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5246 0 return $res;
5247 2 }
5248  
5249  
5250 =head2 rtm_connect
5251  
5252 Starts a Real Time Messaging session.
5253  
5254 L<API method documentation|https://api.slack.com/methods/rtm.connect>
5255  
5256 Takes the following named parameters:
5257  
5258 =over 4
5259  
5260 =item * C<batch_presence_aware> - Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/docs/presence-and-status#batching). (boolean, optional)
5261  
5262 =item * C<presence_sub> - Only deliver presence events when requested by subscription. See [presence subscriptions](/docs/presence-and-status#subscriptions). (boolean, optional)
5263  
5264 =back
5265  
5266 Resolves to a structure representing the response.
5267  
5268 =cut
5269  
5270 0 ▶async sub rtm_connect {
Subroutine rtm_connect: not called CC=2 SCAR=17.9
Pod documented
5271 0 my ($self, %args) = @_;
5272 my $uri = $self->endpoint(
5273 'rtm_connect',
5274 0 %args{grep { exists $args{$_} } qw(batch_presence_aware presence_sub)}
5275 );
5276 0 my ($res) = await $self->http_get(
5277 $uri,
5278 );
5279 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5280 0 return $res;
5281 2 }
5282  
5283  
5284 =head2 search_messages
5285  
5286 Searches for messages matching a query.
5287  
5288 L<API method documentation|https://api.slack.com/methods/search.messages>
5289  
5290 Takes the following named parameters:
5291  
5292 =over 4
5293  
5294 =item * C<count> - Pass the number of results you want per "page". Maximum of `100`. (integer, optional)
5295  
5296 =item * C<highlight> - Pass a value of `true` to enable query highlight markers (see below). (boolean, optional)
5297  
5298 =item * C<page> - (integer, optional)
5299  
5300 =item * C<query> - Search query. (string, required)
5301  
5302 =item * C<sort> - Return matches sorted by either `score` or `timestamp`. (string, optional)
5303  
5304 =item * C<sort_dir> - Change sort direction to ascending (`asc`) or descending (`desc`). (string, optional)
5305  
5306 =back
5307  
5308 Resolves to a structure representing the response.
5309  
5310 =cut
5311  
5312 0 ▶async sub search_messages {
Subroutine search_messages: not called CC=2 SCAR=17.9
Pod documented
5313 0 my ($self, %args) = @_;
5314 my $uri = $self->endpoint(
5315 'search_messages',
5316 0 %args{grep { exists $args{$_} } qw(count highlight page query sort sort_dir)}
5317 );
5318 0 my ($res) = await $self->http_get(
5319 $uri,
5320 );
5321 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5322 0 return $res;
5323 2 }
5324  
5325  
5326 =head2 stars_add
5327  
5328 Adds a star to an item.
5329  
5330 L<API method documentation|https://api.slack.com/methods/stars.add>
5331  
5332 Takes the following named parameters:
5333  
5334 =over 4
5335  
5336 =item * C<channel> - Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`). (string, optional)
5337  
5338 =item * C<file> - File to add star to. (string, optional)
5339  
5340 =item * C<file_comment> - File comment to add star to. (string, optional)
5341  
5342 =item * C<timestamp> - Timestamp of the message to add star to. (string, optional)
5343  
5344 =back
5345  
5346 Resolves to a structure representing the response.
5347  
5348 =cut
5349  
5350 0 ▶async sub stars_add {
Subroutine stars_add: not called CC=2 SCAR=17.9
Pod documented
5351 0 my ($self, %args) = @_;
5352 0 my $uri = $self->endpoint(
5353 'stars_add',
5354 );
5355 my $content = encode_json_utf8({
5356 0 %args{grep { exists $args{$_} } qw(channel file file_comment timestamp)}
5357 });
5358 0 my ($res) = await $self->http_post(
5359 $uri,
5360 $content,
5361 content_type => 'application/json; charset=utf-8',
5362 );
5363 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5364 0 return $res;
5365 2 }
5366  
5367  
5368 =head2 stars_list
5369  
5370 Lists stars for a user.
5371  
5372 L<API method documentation|https://api.slack.com/methods/stars.list>
5373  
5374 Takes the following named parameters:
5375  
5376 =over 4
5377  
5378 =item * C<count> - (string, optional)
5379  
5380 =item * C<page> - (string, optional)
5381  
5382 =item * C<cursor> - Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See [pagination](/docs/pagination) for more details. (string, optional)
5383  
5384 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. (integer, optional)
5385  
5386 =back
5387  
5388 Resolves to a structure representing the response.
5389  
5390 =cut
5391  
5392 0 ▶async sub stars_list {
Subroutine stars_list: not called CC=2 SCAR=17.9
Pod documented
5393 0 my ($self, %args) = @_;
5394 my $uri = $self->endpoint(
5395 'stars_list',
5396 0 %args{grep { exists $args{$_} } qw(count page cursor limit)}
5397 );
5398 0 my ($res) = await $self->http_get(
5399 $uri,
5400 );
5401 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5402 0 return $res;
5403 2 }
5404  
5405  
5406 =head2 stars_remove
5407  
5408 Removes a star from an item.
5409  
5410 L<API method documentation|https://api.slack.com/methods/stars.remove>
5411  
5412 Takes the following named parameters:
5413  
5414 =over 4
5415  
5416 =item * C<channel> - Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`). (string, optional)
5417  
5418 =item * C<file> - File to remove star from. (string, optional)
5419  
5420 =item * C<file_comment> - File comment to remove star from. (string, optional)
5421  
5422 =item * C<timestamp> - Timestamp of the message to remove star from. (string, optional)
5423  
5424 =back
5425  
5426 Resolves to a structure representing the response.
5427  
5428 =cut
5429  
5430 0 ▶async sub stars_remove {
Subroutine stars_remove: not called CC=2 SCAR=17.9
Pod documented
5431 0 my ($self, %args) = @_;
5432 0 my $uri = $self->endpoint(
5433 'stars_remove',
5434 );
5435 my $content = encode_json_utf8({
5436 0 %args{grep { exists $args{$_} } qw(channel file file_comment timestamp)}
5437 });
5438 0 my ($res) = await $self->http_post(
5439 $uri,
5440 $content,
5441 content_type => 'application/json; charset=utf-8',
5442 );
5443 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5444 0 return $res;
5445 2 }
5446  
5447  
5448 =head2 team_access_logs
5449  
5450 Gets the access logs for the current team.
5451  
5452 L<API method documentation|https://api.slack.com/methods/team.accessLogs>
5453  
5454 Takes the following named parameters:
5455  
5456 =over 4
5457  
5458 =item * C<before> - End of time range of logs to include in results (inclusive). (string, optional)
5459  
5460 =item * C<count> - (string, optional)
5461  
5462 =item * C<page> - (string, optional)
5463  
5464 =back
5465  
5466 Resolves to a structure representing the response.
5467  
5468 =cut
5469  
5470 0 ▶async sub team_access_logs {
Subroutine team_access_logs: not called CC=2 SCAR=17.9
Pod documented
5471 0 my ($self, %args) = @_;
5472 my $uri = $self->endpoint(
5473 'team_access_logs',
5474 0 %args{grep { exists $args{$_} } qw(before count page)}
5475 );
5476 0 my ($res) = await $self->http_get(
5477 $uri,
5478 );
5479 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5480 0 return $res;
5481 2 }
5482  
5483  
5484 =head2 team_billable_info
5485  
5486 Gets billable users information for the current team.
5487  
5488 L<API method documentation|https://api.slack.com/methods/team.billableInfo>
5489  
5490 Takes the following named parameters:
5491  
5492 =over 4
5493  
5494 =item * C<user> - A user to retrieve the billable information for. Defaults to all users. (string, optional)
5495  
5496 =back
5497  
5498 Resolves to a structure representing the response.
5499  
5500 =cut
5501  
5502 0 ▶async sub team_billable_info {
Subroutine team_billable_info: not called CC=2 SCAR=17.9
Pod documented
5503 0 my ($self, %args) = @_;
5504 my $uri = $self->endpoint(
5505 'team_billable_info',
5506 0 %args{grep { exists $args{$_} } qw(user)}
5507 );
5508 0 my ($res) = await $self->http_get(
5509 $uri,
5510 );
5511 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5512 0 return $res;
5513 2 }
5514  
5515  
5516 =head2 team_info
5517  
5518 Gets information about the current team.
5519  
5520 L<API method documentation|https://api.slack.com/methods/team.info>
5521  
5522 Takes the following named parameters:
5523  
5524 =over 4
5525  
5526 =item * C<team> - Team to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allowed to see through external shared channels (string, optional)
5527  
5528 =back
5529  
5530 Resolves to a structure representing the response.
5531  
5532 =cut
5533  
5534 0 ▶async sub team_info {
Subroutine team_info: not called CC=2 SCAR=17.9
Pod documented
5535 0 my ($self, %args) = @_;
5536 my $uri = $self->endpoint(
5537 'team_info',
5538 0 %args{grep { exists $args{$_} } qw(team)}
5539 );
5540 0 my ($res) = await $self->http_get(
5541 $uri,
5542 );
5543 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5544 0 return $res;
5545 2 }
5546  
5547  
5548 =head2 team_integration_logs
5549  
5550 Gets the integration logs for the current team.
5551  
5552 L<API method documentation|https://api.slack.com/methods/team.integrationLogs>
5553  
5554 Takes the following named parameters:
5555  
5556 =over 4
5557  
5558 =item * C<app_id> - Filter logs to this Slack app. Defaults to all logs. (string, optional)
5559  
5560 =item * C<change_type> - Filter logs with this change type. Defaults to all logs. (string, optional)
5561  
5562 =item * C<count> - (string, optional)
5563  
5564 =item * C<page> - (string, optional)
5565  
5566 =item * C<service_id> - Filter logs to this service. Defaults to all logs. (string, optional)
5567  
5568 =item * C<user> - Filter logs generated by this user’s actions. Defaults to all logs. (string, optional)
5569  
5570 =back
5571  
5572 Resolves to a structure representing the response.
5573  
5574 =cut
5575  
5576 0 ▶async sub team_integration_logs {
Subroutine team_integration_logs: not called CC=2 SCAR=17.9
Pod documented
5577 0 my ($self, %args) = @_;
5578 my $uri = $self->endpoint(
5579 'team_integration_logs',
5580 0 %args{grep { exists $args{$_} } qw(app_id change_type count page service_id user)}
5581 );
5582 0 my ($res) = await $self->http_get(
5583 $uri,
5584 );
5585 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5586 0 return $res;
5587 2 }
5588  
5589  
5590 =head2 team_profile_get
5591  
5592 Retrieve a team's profile.
5593  
5594 L<API method documentation|https://api.slack.com/methods/team.profile.get>
5595  
5596 Takes the following named parameters:
5597  
5598 =over 4
5599  
5600 =item * C<visibility> - Filter by visibility. (string, optional)
5601  
5602 =back
5603  
5604 Resolves to a structure representing the response.
5605  
5606 =cut
5607  
5608 0 ▶async sub team_profile_get {
Subroutine team_profile_get: not called CC=2 SCAR=17.9
Pod documented
5609 0 my ($self, %args) = @_;
5610 my $uri = $self->endpoint(
5611 'team_profile_get',
5612 0 %args{grep { exists $args{$_} } qw(visibility)}
5613 );
5614 0 my ($res) = await $self->http_get(
5615 $uri,
5616 );
5617 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5618 0 return $res;
5619 2 }
5620  
5621  
5622 =head2 usergroups_create
5623  
5624 Create a User Group
5625  
5626 L<API method documentation|https://api.slack.com/methods/usergroups.create>
5627  
5628 Takes the following named parameters:
5629  
5630 =over 4
5631  
5632 =item * C<channels> - A comma separated string of encoded channel IDs for which the User Group uses as a default. (string, optional)
5633  
5634 =item * C<description> - A short description of the User Group. (string, optional)
5635  
5636 =item * C<handle> - A mention handle. Must be unique among channels, users and User Groups. (string, optional)
5637  
5638 =item * C<include_count> - Include the number of users in each User Group. (boolean, optional)
5639  
5640 =item * C<name> - A name for the User Group. Must be unique among User Groups. (string, required)
5641  
5642 =back
5643  
5644 Resolves to a structure representing the response.
5645  
5646 =cut
5647  
5648 0 ▶async sub usergroups_create {
Subroutine usergroups_create: not called CC=2 SCAR=17.9
Pod documented
5649 0 my ($self, %args) = @_;
5650 0 my $uri = $self->endpoint(
5651 'usergroups_create',
5652 );
5653 my $content = encode_json_utf8({
5654 0 %args{grep { exists $args{$_} } qw(channels description handle include_count name)}
5655 });
5656 0 my ($res) = await $self->http_post(
5657 $uri,
5658 $content,
5659 content_type => 'application/json; charset=utf-8',
5660 );
5661 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5662 0 return $res;
5663 2 }
5664  
5665  
5666 =head2 usergroups_disable
5667  
5668 Disable an existing User Group
5669  
5670 L<API method documentation|https://api.slack.com/methods/usergroups.disable>
5671  
5672 Takes the following named parameters:
5673  
5674 =over 4
5675  
5676 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5677  
5678 =item * C<usergroup> - The encoded ID of the User Group to disable. (string, required)
5679  
5680 =back
5681  
5682 Resolves to a structure representing the response.
5683  
5684 =cut
5685  
5686 0 ▶async sub usergroups_disable {
Subroutine usergroups_disable: not called CC=2 SCAR=17.9
Pod documented
5687 0 my ($self, %args) = @_;
5688 0 my $uri = $self->endpoint(
5689 'usergroups_disable',
5690 );
5691 my $content = encode_json_utf8({
5692 0 %args{grep { exists $args{$_} } qw(include_count usergroup)}
5693 });
5694 0 my ($res) = await $self->http_post(
5695 $uri,
5696 $content,
5697 content_type => 'application/json; charset=utf-8',
5698 );
5699 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5700 0 return $res;
5701 2 }
5702  
5703  
5704 =head2 usergroups_enable
5705  
5706 Enable a User Group
5707  
5708 L<API method documentation|https://api.slack.com/methods/usergroups.enable>
5709  
5710 Takes the following named parameters:
5711  
5712 =over 4
5713  
5714 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5715  
5716 =item * C<usergroup> - The encoded ID of the User Group to enable. (string, required)
5717  
5718 =back
5719  
5720 Resolves to a structure representing the response.
5721  
5722 =cut
5723  
5724 0 ▶async sub usergroups_enable {
Subroutine usergroups_enable: not called CC=2 SCAR=17.9
Pod documented
5725 0 my ($self, %args) = @_;
5726 0 my $uri = $self->endpoint(
5727 'usergroups_enable',
5728 );
5729 my $content = encode_json_utf8({
5730 0 %args{grep { exists $args{$_} } qw(include_count usergroup)}
5731 });
5732 0 my ($res) = await $self->http_post(
5733 $uri,
5734 $content,
5735 content_type => 'application/json; charset=utf-8',
5736 );
5737 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5738 0 return $res;
5739 2 }
5740  
5741  
5742 =head2 usergroups_list
5743  
5744 List all User Groups for a team
5745  
5746 L<API method documentation|https://api.slack.com/methods/usergroups.list>
5747  
5748 Takes the following named parameters:
5749  
5750 =over 4
5751  
5752 =item * C<include_users> - Include the list of users for each User Group. (boolean, optional)
5753  
5754 =item * C<include_count> - Include the number of users in each User Group. (boolean, optional)
5755  
5756 =item * C<include_disabled> - Include disabled User Groups. (boolean, optional)
5757  
5758 =back
5759  
5760 Resolves to a structure representing the response.
5761  
5762 =cut
5763  
5764 0 ▶async sub usergroups_list {
Subroutine usergroups_list: not called CC=2 SCAR=17.9
Pod documented
5765 0 my ($self, %args) = @_;
5766 my $uri = $self->endpoint(
5767 'usergroups_list',
5768 0 %args{grep { exists $args{$_} } qw(include_users include_count include_disabled)}
5769 );
5770 0 my ($res) = await $self->http_get(
5771 $uri,
5772 );
5773 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5774 0 return $res;
5775 2 }
5776  
5777  
5778 =head2 usergroups_update
5779  
5780 Update an existing User Group
5781  
5782 L<API method documentation|https://api.slack.com/methods/usergroups.update>
5783  
5784 Takes the following named parameters:
5785  
5786 =over 4
5787  
5788 =item * C<handle> - A mention handle. Must be unique among channels, users and User Groups. (string, optional)
5789  
5790 =item * C<description> - A short description of the User Group. (string, optional)
5791  
5792 =item * C<channels> - A comma separated string of encoded channel IDs for which the User Group uses as a default. (string, optional)
5793  
5794 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5795  
5796 =item * C<usergroup> - The encoded ID of the User Group to update. (string, required)
5797  
5798 =item * C<name> - A name for the User Group. Must be unique among User Groups. (string, optional)
5799  
5800 =back
5801  
5802 Resolves to a structure representing the response.
5803  
5804 =cut
5805  
5806 0 ▶async sub usergroups_update {
Subroutine usergroups_update: not called CC=2 SCAR=17.9
Pod documented
5807 0 my ($self, %args) = @_;
5808 0 my $uri = $self->endpoint(
5809 'usergroups_update',
5810 );
5811 my $content = encode_json_utf8({
5812 0 %args{grep { exists $args{$_} } qw(handle description channels include_count usergroup name)}
5813 });
5814 0 my ($res) = await $self->http_post(
5815 $uri,
5816 $content,
5817 content_type => 'application/json; charset=utf-8',
5818 );
5819 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5820 0 return $res;
5821 2 }
5822  
5823  
5824 =head2 usergroups_users_list
5825  
5826 List all users in a User Group
5827  
5828 L<API method documentation|https://api.slack.com/methods/usergroups.users.list>
5829  
5830 Takes the following named parameters:
5831  
5832 =over 4
5833  
5834 =item * C<include_disabled> - Allow results that involve disabled User Groups. (boolean, optional)
5835  
5836 =item * C<usergroup> - The encoded ID of the User Group to update. (string, required)
5837  
5838 =back
5839  
5840 Resolves to a structure representing the response.
5841  
5842 =cut
5843  
5844 0 ▶async sub usergroups_users_list {
Subroutine usergroups_users_list: not called CC=2 SCAR=17.9
Pod documented
5845 0 my ($self, %args) = @_;
5846 my $uri = $self->endpoint(
5847 'usergroups_users_list',
5848 0 %args{grep { exists $args{$_} } qw(include_disabled usergroup)}
5849 );
5850 0 my ($res) = await $self->http_get(
5851 $uri,
5852 );
5853 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5854 0 return $res;
5855 2 }
5856  
5857  
5858 =head2 usergroups_users_update
5859  
5860 Update the list of users for a User Group
5861  
5862 L<API method documentation|https://api.slack.com/methods/usergroups.users.update>
5863  
5864 Takes the following named parameters:
5865  
5866 =over 4
5867  
5868 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5869  
5870 =item * C<usergroup> - The encoded ID of the User Group to update. (string, required)
5871  
5872 =item * C<users> - A comma separated string of encoded user IDs that represent the entire list of users for the User Group. (string, required)
5873  
5874 =back
5875  
5876 Resolves to a structure representing the response.
5877  
5878 =cut
5879  
5880 0 ▶async sub usergroups_users_update {
Subroutine usergroups_users_update: not called CC=2 SCAR=17.9
Pod documented
5881 0 my ($self, %args) = @_;
5882 0 my $uri = $self->endpoint(
5883 'usergroups_users_update',
5884 );
5885 my $content = encode_json_utf8({
5886 0 %args{grep { exists $args{$_} } qw(include_count usergroup users)}
5887 });
5888 0 my ($res) = await $self->http_post(
5889 $uri,
5890 $content,
5891 content_type => 'application/json; charset=utf-8',
5892 );
5893 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5894 0 return $res;
5895 2 }
5896  
5897  
5898 =head2 users_conversations
5899  
5900 List conversations the calling user may access.
5901  
5902 L<API method documentation|https://api.slack.com/methods/users.conversations>
5903  
5904 Takes the following named parameters:
5905  
5906 =over 4
5907  
5908 =item * C<user> - Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership. (string, optional)
5909  
5910 =item * C<types> - Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im` (string, optional)
5911  
5912 =item * C<exclude_archived> - Set to `true` to exclude archived channels from the list (boolean, optional)
5913  
5914 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000. (integer, optional)
5915  
5916 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
5917  
5918 =back
5919  
5920 Resolves to a structure representing the response.
5921  
5922 =cut
5923  
5924 0 ▶async sub users_conversations {
Subroutine users_conversations: not called CC=2 SCAR=17.9
Pod documented
5925 0 my ($self, %args) = @_;
5926 my $uri = $self->endpoint(
5927 'users_conversations',
5928 0 %args{grep { exists $args{$_} } qw(user types exclude_archived limit cursor)}
5929 );
5930 0 my ($res) = await $self->http_get(
5931 $uri,
5932 );
5933 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5934 0 return $res;
5935 2 }
5936  
5937  
5938 =head2 users_delete_photo
5939  
5940 Delete the user profile photo
5941  
5942 L<API method documentation|https://api.slack.com/methods/users.deletePhoto>
5943  
5944 Resolves to a structure representing the response.
5945  
5946 =cut
5947  
5948 0 ▶async sub users_delete_photo {
Subroutine users_delete_photo: not called CC=2 SCAR=17.9
Pod documented
5949 0 my ($self, %args) = @_;
5950 0 my $uri = $self->endpoint(
5951 'users_delete_photo',
5952 );
5953 0 my ($res) = await $self->http_post(
5954 $uri,
5955 );
5956 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5957 0 return $res;
5958 2 }
5959  
5960  
5961 =head2 users_get_presence
5962  
5963 Gets user presence information.
5964  
5965 L<API method documentation|https://api.slack.com/methods/users.getPresence>
5966  
5967 Takes the following named parameters:
5968  
5969 =over 4
5970  
5971 =item * C<user> - User to get presence info on. Defaults to the authed user. (string, optional)
5972  
5973 =back
5974  
5975 Resolves to a structure representing the response.
5976  
5977 =cut
5978  
5979 0 ▶async sub users_get_presence {
Subroutine users_get_presence: not called CC=2 SCAR=17.9
Pod documented
5980 0 my ($self, %args) = @_;
5981 my $uri = $self->endpoint(
5982 'users_get_presence',
5983 0 %args{grep { exists $args{$_} } qw(user)}
5984 );
5985 0 my ($res) = await $self->http_get(
5986 $uri,
5987 );
5988 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5989 0 return $res;
5990 2 }
5991  
5992  
5993 =head2 users_identity
5994  
5995 Get a user's identity.
5996  
5997 L<API method documentation|https://api.slack.com/methods/users.identity>
5998  
5999 Resolves to a structure representing the response.
6000  
6001 =cut
6002  
6003 0 ▶async sub users_identity {
Subroutine users_identity: not called CC=1 SCAR=6.9
Pod documented
6004 0 my ($self, %args) = @_;
6005 0 my $uri = $self->endpoint(
6006 'users_identity',
6007 );
6008 0 my ($res) = await $self->http_get(
6009 $uri,
6010 );
6011 0 return $res;
6012 2 }
6013  
6014  
6015 =head2 users_info
6016  
6017 Gets information about a user.
6018  
6019 L<API method documentation|https://api.slack.com/methods/users.info>
6020  
6021 Takes the following named parameters:
6022  
6023 =over 4
6024  
6025 =item * C<include_locale> - Set this to `true` to receive the locale for this user. Defaults to `false` (boolean, optional)
6026  
6027 =item * C<user> - User to get info on (string, optional)
6028  
6029 =back
6030  
6031 Resolves to a structure representing the response.
6032  
6033 =cut
6034  
6035 0 ▶async sub users_info {
Subroutine users_info: not called CC=2 SCAR=17.9
Pod documented
6036 0 my ($self, %args) = @_;
6037 my $uri = $self->endpoint(
6038 'users_info',
6039 0 %args{grep { exists $args{$_} } qw(include_locale user)}
6040 );
6041 0 my ($res) = await $self->http_get(
6042 $uri,
6043 );
6044 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6045 0 return $res;
6046 2 }
6047  
6048  
6049 =head2 users_list
6050  
6051 Lists all users in a Slack team.
6052  
6053 L<API method documentation|https://api.slack.com/methods/users.list>
6054  
6055 Takes the following named parameters:
6056  
6057 =over 4
6058  
6059 =item * C<limit> - The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no `limit` value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience `limit_required` or HTTP 500 errors. (integer, optional)
6060  
6061 =item * C<cursor> - Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/docs/pagination) for more detail. (string, optional)
6062  
6063 =item * C<include_locale> - Set this to `true` to receive the locale for users. Defaults to `false` (boolean, optional)
6064  
6065 =back
6066  
6067 Resolves to a structure representing the response.
6068  
6069 =cut
6070  
6071 0 ▶async sub users_list {
Subroutine users_list: not called CC=2 SCAR=17.9
Pod documented
6072 0 my ($self, %args) = @_;
6073 my $uri = $self->endpoint(
6074 'users_list',
6075 0 %args{grep { exists $args{$_} } qw(limit cursor include_locale)}
6076 );
6077 0 my ($res) = await $self->http_get(
6078 $uri,
6079 );
6080 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6081 0 return $res;
6082 2 }
6083  
6084  
6085 =head2 users_lookup_by_email
6086  
6087 Find a user with an email address.
6088  
6089 L<API method documentation|https://api.slack.com/methods/users.lookupByEmail>
6090  
6091 Takes the following named parameters:
6092  
6093 =over 4
6094  
6095 =item * C<email> - An email address belonging to a user in the workspace (string, required)
6096  
6097 =back
6098  
6099 Resolves to a structure representing the response.
6100  
6101 =cut
6102  
6103 0 ▶async sub users_lookup_by_email {
Subroutine users_lookup_by_email: not called CC=2 SCAR=17.9
Pod documented
6104 0 my ($self, %args) = @_;
6105 my $uri = $self->endpoint(
6106 'users_lookup_by_email',
6107 0 %args{grep { exists $args{$_} } qw(email)}
6108 );
6109 0 my ($res) = await $self->http_get(
6110 $uri,
6111 );
6112 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6113 0 return $res;
6114 2 }
6115  
6116  
6117 =head2 users_profile_get
6118  
6119 Retrieves a user's profile information.
6120  
6121 L<API method documentation|https://api.slack.com/methods/users.profile.get>
6122  
6123 Takes the following named parameters:
6124  
6125 =over 4
6126  
6127 =item * C<include_labels> - Include labels for each ID in custom profile fields (boolean, optional)
6128  
6129 =item * C<user> - User to retrieve profile info for (string, optional)
6130  
6131 =back
6132  
6133 Resolves to a structure representing the response.
6134  
6135 =cut
6136  
6137 0 ▶async sub users_profile_get {
Subroutine users_profile_get: not called CC=2 SCAR=17.9
Pod documented
6138 0 my ($self, %args) = @_;
6139 my $uri = $self->endpoint(
6140 'users_profile_get',
6141 0 %args{grep { exists $args{$_} } qw(include_labels user)}
6142 );
6143 0 my ($res) = await $self->http_get(
6144 $uri,
6145 );
6146 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6147 0 return $res;
6148 2 }
6149  
6150  
6151 =head2 users_profile_set
6152  
6153 Set the profile information for a user.
6154  
6155 L<API method documentation|https://api.slack.com/methods/users.profile.set>
6156  
6157 Takes the following named parameters:
6158  
6159 =over 4
6160  
6161 =item * C<name> - Name of a single key to set. Usable only if `profile` is not passed. (string, optional)
6162  
6163 =item * C<profile> - Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters. (string, optional)
6164  
6165 =item * C<user> - ID of user to change. This argument may only be specified by team admins on paid teams. (string, optional)
6166  
6167 =item * C<value> - Value to set a single key to. Usable only if `profile` is not passed. (string, optional)
6168  
6169 =back
6170  
6171 Resolves to a structure representing the response.
6172  
6173 =cut
6174  
6175 0 ▶async sub users_profile_set {
Subroutine users_profile_set: not called CC=2 SCAR=17.9
Pod documented
6176 0 my ($self, %args) = @_;
6177 0 my $uri = $self->endpoint(
6178 'users_profile_set',
6179 );
6180 my $content = encode_json_utf8({
6181 0 %args{grep { exists $args{$_} } qw(name profile user value)}
6182 });
6183 0 my ($res) = await $self->http_post(
6184 $uri,
6185 $content,
6186 content_type => 'application/json; charset=utf-8',
6187 );
6188 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6189 0 return $res;
6190 2 }
6191  
6192  
6193 =head2 users_set_active
6194  
6195 Marked a user as active. Deprecated and non-functional.
6196  
6197 L<API method documentation|https://api.slack.com/methods/users.setActive>
6198  
6199 Resolves to a structure representing the response.
6200  
6201 =cut
6202  
6203 0 ▶async sub users_set_active {
Subroutine users_set_active: not called CC=2 SCAR=17.9
Pod documented
6204 0 my ($self, %args) = @_;
6205 0 my $uri = $self->endpoint(
6206 'users_set_active',
6207 );
6208 0 my ($res) = await $self->http_post(
6209 $uri,
6210 );
6211 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6212 0 return $res;
6213 2 }
6214  
6215  
6216 =head2 users_set_photo
6217  
6218 Set the user profile photo
6219  
6220 L<API method documentation|https://api.slack.com/methods/users.setPhoto>
6221  
6222 Takes the following named parameters:
6223  
6224 =over 4
6225  
6226 =item * C<crop_w> - Width/height of crop box (always square) (string, optional)
6227  
6228 =item * C<crop_x> - X coordinate of top-left corner of crop box (string, optional)
6229  
6230 =item * C<crop_y> - Y coordinate of top-left corner of crop box (string, optional)
6231  
6232 =item * C<image> - File contents via `multipart/form-data`. (string, optional)
6233  
6234 =back
6235  
6236 Resolves to a structure representing the response.
6237  
6238 =cut
6239  
6240 0 ▶async sub users_set_photo {
Subroutine users_set_photo: not called CC=2 SCAR=17.9
Pod documented
6241 0 my ($self, %args) = @_;
6242 0 my $uri = $self->endpoint(
6243 'users_set_photo',
6244 );
6245 my $content = encode_json_utf8({
6246 0 %args{grep { exists $args{$_} } qw(crop_w crop_x crop_y image)}
6247 });
6248 0 my ($res) = await $self->http_post(
6249 $uri,
6250 $content,
6251 content_type => 'application/json; charset=utf-8',
6252 );
6253 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6254 0 return $res;
6255 2 }
6256  
6257  
6258 =head2 users_set_presence
6259  
6260 Manually sets user presence.
6261  
6262 L<API method documentation|https://api.slack.com/methods/users.setPresence>
6263  
6264 Takes the following named parameters:
6265  
6266 =over 4
6267  
6268 =item * C<presence> - Either `auto` or `away` (string, required)
6269  
6270 =back
6271  
6272 Resolves to a structure representing the response.
6273  
6274 =cut
6275  
6276 0 ▶async sub users_set_presence {
Subroutine users_set_presence: not called CC=2 SCAR=17.9
Pod documented
6277 0 my ($self, %args) = @_;
6278 0 my $uri = $self->endpoint(
6279 'users_set_presence',
6280 );
6281 my $content = encode_json_utf8({
6282 0 %args{grep { exists $args{$_} } qw(presence)}
6283 });
6284 0 my ($res) = await $self->http_post(
6285 $uri,
6286 $content,
6287 content_type => 'application/json; charset=utf-8',
6288 );
6289 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6290 0 return $res;
6291 2 }
6292  
6293  
6294 =head2 views_open
6295  
6296 Open a view for a user.
6297  
6298 L<API method documentation|https://api.slack.com/methods/views.open>
6299  
6300 Takes the following named parameters:
6301  
6302 =over 4
6303  
6304 =item * C<trigger_id> - Exchange a trigger to post to the user. (string, required)
6305  
6306 =item * C<view> - A [view payload](/reference/surfaces/views). This must be a JSON-encoded string. (string, required)
6307  
6308 =back
6309  
6310 Resolves to a structure representing the response.
6311  
6312 =cut
6313  
6314 0 ▶async sub views_open {
Subroutine views_open: not called CC=2 SCAR=17.9
Pod documented
6315 0 my ($self, %args) = @_;
6316 0 my $uri = $self->endpoint(
6317 'views_open',
6318 );
6319 my $content = encode_json_utf8({
6320 0 %args{grep { exists $args{$_} } qw(trigger_id view)}
6321 });
6322 0 my ($res) = await $self->http_post(
6323 $uri,
6324 $content,
6325 content_type => 'application/json; charset=utf-8',
6326 );
6327 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6328 0 return $res;
6329 2 }
6330  
6331  
6332 =head2 views_publish
6333  
6334 Publish a static view for a User.
6335  
6336 L<API method documentation|https://api.slack.com/methods/views.publish>
6337  
6338 Takes the following named parameters:
6339  
6340 =over 4
6341  
6342 =item * C<user_id> - `id` of the user you want publish a view to. (string, required)
6343  
6344 =item * C<view> - A [view payload](/reference/surfaces/views). This must be a JSON-encoded string. (string, required)
6345  
6346 =item * C<hash> - A string that represents view state to protect against possible race conditions. (string, optional)
6347  
6348 =back
6349  
6350 Resolves to a structure representing the response.
6351  
6352 =cut
6353  
6354 0 ▶async sub views_publish {
Subroutine views_publish: not called CC=2 SCAR=17.9
Pod documented
6355 0 my ($self, %args) = @_;
6356 0 my $uri = $self->endpoint(
6357 'views_publish',
6358 );
6359 my $content = encode_json_utf8({
6360 0 %args{grep { exists $args{$_} } qw(user_id view hash)}
6361 });
6362 0 my ($res) = await $self->http_post(
6363 $uri,
6364 $content,
6365 content_type => 'application/json; charset=utf-8',
6366 );
6367 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6368 0 return $res;
6369 2 }
6370  
6371  
6372 =head2 views_push
6373  
6374 Push a view onto the stack of a root view.
6375  
6376 L<API method documentation|https://api.slack.com/methods/views.push>
6377  
6378 Takes the following named parameters:
6379  
6380 =over 4
6381  
6382 =item * C<trigger_id> - Exchange a trigger to post to the user. (string, required)
6383  
6384 =item * C<view> - A [view payload](/reference/surfaces/views). This must be a JSON-encoded string. (string, required)
6385  
6386 =back
6387  
6388 Resolves to a structure representing the response.
6389  
6390 =cut
6391  
6392 0 ▶async sub views_push {
Subroutine views_push: not called CC=2 SCAR=17.9
Pod documented
6393 0 my ($self, %args) = @_;
6394 0 my $uri = $self->endpoint(
6395 'views_push',
6396 );
6397 my $content = encode_json_utf8({
6398 0 %args{grep { exists $args{$_} } qw(trigger_id view)}
6399 });
6400 0 my ($res) = await $self->http_post(
6401 $uri,
6402 $content,
6403 content_type => 'application/json; charset=utf-8',
6404 );
6405 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6406 0 return $res;
6407 2 }
6408  
6409  
6410 =head2 views_update
6411  
6412 Update an existing view.
6413  
6414 L<API method documentation|https://api.slack.com/methods/views.update>
6415  
6416 Takes the following named parameters:
6417  
6418 =over 4
6419  
6420 =item * C<view_id> - A unique identifier of the view to be updated. Either `view_id` or `external_id` is required. (string, optional)
6421  
6422 =item * C<external_id> - A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either `view_id` or `external_id` is required. (string, optional)
6423  
6424 =item * C<view> - A [view object](/reference/surfaces/views). This must be a JSON-encoded string. (string, optional)
6425  
6426 =item * C<hash> - A string that represents view state to protect against possible race conditions. (string, optional)
6427  
6428 =back
6429  
6430 Resolves to a structure representing the response.
6431  
6432 =cut
6433  
6434 0 ▶async sub views_update {
Subroutine views_update: not called CC=2 SCAR=17.9
Pod documented
6435 0 my ($self, %args) = @_;
6436 0 my $uri = $self->endpoint(
6437 'views_update',
6438 );
6439 my $content = encode_json_utf8({
6440 0 %args{grep { exists $args{$_} } qw(view_id external_id view hash)}
6441 });
6442 0 my ($res) = await $self->http_post(
6443 $uri,
6444 $content,
6445 content_type => 'application/json; charset=utf-8',
6446 );
6447 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6448 0 return $res;
6449 2 }
6450  
6451  
6452 =head2 workflows_step_completed
6453  
6454 Indicate that an app's step in a workflow completed execution.
6455  
6456 L<API method documentation|https://api.slack.com/methods/workflows.stepCompleted>
6457  
6458 Takes the following named parameters:
6459  
6460 =over 4
6461  
6462 =item * C<workflow_step_execute_id> - Context identifier that maps to the correct workflow step execution. (string, required)
6463  
6464 =item * C<outputs> - Key-value object of outputs from your step. Keys of this object reflect the configured `key` properties of your [`outputs`](/reference/workflows/workflow_step#output) array from your `workflow_step` object. (string, optional)
6465  
6466 =back
6467  
6468 Resolves to a structure representing the response.
6469  
6470 =cut
6471  
6472 0 ▶async sub workflows_step_completed {
Subroutine workflows_step_completed: not called CC=2 SCAR=17.9
Pod documented
6473 0 my ($self, %args) = @_;
6474 0 my $uri = $self->endpoint(
6475 'workflows_step_completed',
6476 );
6477 my $content = encode_json_utf8({
6478 0 %args{grep { exists $args{$_} } qw(workflow_step_execute_id outputs)}
6479 });
6480 0 my ($res) = await $self->http_post(
6481 $uri,
6482 $content,
6483 content_type => 'application/json; charset=utf-8',
6484 );
6485 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6486 0 return $res;
6487 2 }
6488  
6489  
6490 =head2 workflows_step_failed
6491  
6492 Indicate that an app's step in a workflow failed to execute.
6493  
6494 L<API method documentation|https://api.slack.com/methods/workflows.stepFailed>
6495  
6496 Takes the following named parameters:
6497  
6498 =over 4
6499  
6500 =item * C<workflow_step_execute_id> - Context identifier that maps to the correct workflow step execution. (string, required)
6501  
6502 =item * C<error> - A JSON-based object with a `message` property that should contain a human readable error message. (string, required)
6503  
6504 =back
6505  
6506 Resolves to a structure representing the response.
6507  
6508 =cut
6509  
6510 0 ▶async sub workflows_step_failed {
Subroutine workflows_step_failed: not called CC=2 SCAR=17.9
Pod documented
6511 0 my ($self, %args) = @_;
6512 0 my $uri = $self->endpoint(
6513 'workflows_step_failed',
6514 );
6515 my $content = encode_json_utf8({
6516 0 %args{grep { exists $args{$_} } qw(workflow_step_execute_id error)}
6517 });
6518 0 my ($res) = await $self->http_post(
6519 $uri,
6520 $content,
6521 content_type => 'application/json; charset=utf-8',
6522 );
6523 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6524 0 return $res;
6525 2 }
6526  
6527  
6528 =head2 workflows_update_step
6529  
6530 Update the configuration for a workflow extension step.
6531  
6532 L<API method documentation|https://api.slack.com/methods/workflows.updateStep>
6533  
6534 Takes the following named parameters:
6535  
6536 =over 4
6537  
6538 =item * C<workflow_step_edit_id> - A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`. (string, required)
6539  
6540 =item * C<inputs> - A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. **Please note**: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. [Read more about variables in workflow steps here](/workflows/steps#variables). (string, optional)
6541  
6542 =item * C<outputs> - An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed. (string, optional)
6543  
6544 =item * C<step_name> - An optional field that can be used to override the step name that is shown in the Workflow Builder. (string, optional)
6545  
6546 =item * C<step_image_url> - An optional field that can be used to override app image that is shown in the Workflow Builder. (string, optional)
6547  
6548 =back
6549  
6550 Resolves to a structure representing the response.
6551  
6552 =cut
6553  
6554 0 ▶async sub workflows_update_step {
Subroutine workflows_update_step: not called CC=2 SCAR=17.9
Pod documented
6555 0 my ($self, %args) = @_;
6556 0 my $uri = $self->endpoint(
6557 'workflows_update_step',
6558 );
6559 my $content = encode_json_utf8({
6560 0 %args{grep { exists $args{$_} } qw(workflow_step_edit_id inputs outputs step_name step_image_url)}
6561 });
6562 0 my ($res) = await $self->http_post(
6563 $uri,
6564 $content,
6565 content_type => 'application/json; charset=utf-8',
6566 );
6567 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6568 0 return $res;
6569 2 }
6570  
6571 2 1;
« Slack/EventType.pm ↑ Summary Slack/Event/Channel.pm »