Slack/Commands.pm

filter: Statementstmt 12.7% 192 / 1508 Branchbran 0.0% 0 / 340 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 2.7% 5 / 179 Podpod 100% 174 / 174 totaltotal 16.8% 371 / 2201 CC 171 SCAR 17.7
CC
171
Cov
10%
admin_apps_approve
6.0
admin_apps_approved_list
6.0
admin_apps_requests_list
6.0
CRAP 5.9
« Slack/Socket.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.006'; # 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  
4658 =head2 files_upload
4659  
4660 Uploads or creates a file.
4661  
4662 L<API method documentation|https://api.slack.com/methods/files.upload>
4663  
4664 Takes the following named parameters:
4665  
4666 =over 4
4667  
4668 =item * C<file> - File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`. (string, optional)
4669  
4670 =item * C<content> - File contents via a POST variable. If omitting this parameter, you must provide a `file`. (string, optional)
4671  
4672 =item * C<filetype> - A [file type](/types/file#file_types) identifier. (string, optional)
4673  
4674 =item * C<filename> - Filename of file. (string, optional)
4675  
4676 =item * C<title> - Title of file. (string, optional)
4677  
4678 =item * C<initial_comment> - The message text introducing the file in specified `channels`. (string, optional)
4679  
4680 =item * C<channels> - Comma-separated list of channel names or IDs where the file will be shared. (string, optional)
4681  
4682 =item * C<thread_ts> - Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead. (number, optional)
4683  
4684 =back
4685  
4686 Resolves to a structure representing the response.
4687  
4688 =cut
4689  
4690 0 ▶async sub files_upload {
Subroutine files_upload: not called CC=2 SCAR=17.9
Pod documented
4691 0 my ($self, %args) = @_;
4692 0 my $uri = $self->endpoint(
4693 'files_upload',
4694 );
4695 my $content = encode_json_utf8({
4696 0 %args{grep { exists $args{$_} } qw(file content filetype filename title initial_comment channels thread_ts)}
4697 });
4698 0 my ($res) = await $self->http_post(
4699 $uri,
4700 $content,
4701 content_type => 'application/json; charset=utf-8',
4702 );
4703 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4704 0 return $res;
4705 2 }
4706  
4707  
4708 =head2 migration_exchange
4709  
4710 For Enterprise Grid workspaces, map local user IDs to global user IDs
4711  
4712 L<API method documentation|https://api.slack.com/methods/migration.exchange>
4713  
4714 Takes the following named parameters:
4715  
4716 =over 4
4717  
4718 =item * C<users> - A comma-separated list of user ids, up to 400 per request (string, required)
4719  
4720 =item * C<team_id> - Specify team_id starts with `T` in case of Org Token (string, optional)
4721  
4722 =item * C<to_old> - Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`. (boolean, optional)
4723  
4724 =back
4725  
4726 Resolves to a structure representing the response.
4727  
4728 =cut
4729  
4730 0 ▶async sub migration_exchange {
Subroutine migration_exchange: not called CC=2 SCAR=17.9
Pod documented
4731 0 my ($self, %args) = @_;
4732 my $uri = $self->endpoint(
4733 'migration_exchange',
4734 0 %args{grep { exists $args{$_} } qw(users team_id to_old)}
4735 );
4736 0 my ($res) = await $self->http_get(
4737 $uri,
4738 );
4739 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4740 0 return $res;
4741 2 }
4742  
4743  
4744 =head2 oauth_access
4745  
4746 Exchanges a temporary OAuth verifier code for an access token.
4747  
4748 L<API method documentation|https://api.slack.com/methods/oauth.access>
4749  
4750 Takes the following named parameters:
4751  
4752 =over 4
4753  
4754 =item * C<client_id> - Issued when you created your application. (string, optional)
4755  
4756 =item * C<client_secret> - Issued when you created your application. (string, optional)
4757  
4758 =item * C<code> - The `code` param returned via the OAuth callback. (string, optional)
4759  
4760 =item * C<redirect_uri> - This must match the originally submitted URI (if one was sent). (string, optional)
4761  
4762 =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)
4763  
4764 =back
4765  
4766 Resolves to a structure representing the response.
4767  
4768 =cut
4769  
4770 0 ▶async sub oauth_access {
Subroutine oauth_access: not called CC=2 SCAR=17.9
Pod documented
4771 0 my ($self, %args) = @_;
4772 my $uri = $self->endpoint(
4773 'oauth_access',
4774 0 %args{grep { exists $args{$_} } qw(client_id client_secret code redirect_uri single_channel)}
4775 );
4776 0 my ($res) = await $self->http_get(
4777 $uri,
4778 );
4779 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4780 0 return $res;
4781 2 }
4782  
4783  
4784 =head2 oauth_token
4785  
4786 Exchanges a temporary OAuth verifier code for a workspace token.
4787  
4788 L<API method documentation|https://api.slack.com/methods/oauth.token>
4789  
4790 Takes the following named parameters:
4791  
4792 =over 4
4793  
4794 =item * C<client_id> - Issued when you created your application. (string, optional)
4795  
4796 =item * C<client_secret> - Issued when you created your application. (string, optional)
4797  
4798 =item * C<code> - The `code` param returned via the OAuth callback. (string, optional)
4799  
4800 =item * C<redirect_uri> - This must match the originally submitted URI (if one was sent). (string, optional)
4801  
4802 =item * C<single_channel> - Request the user to add your app only to a single channel. (boolean, optional)
4803  
4804 =back
4805  
4806 Resolves to a structure representing the response.
4807  
4808 =cut
4809  
4810 0 ▶async sub oauth_token {
Subroutine oauth_token: not called CC=2 SCAR=17.9
Pod documented
4811 0 my ($self, %args) = @_;
4812 my $uri = $self->endpoint(
4813 'oauth_token',
4814 0 %args{grep { exists $args{$_} } qw(client_id client_secret code redirect_uri single_channel)}
4815 );
4816 0 my ($res) = await $self->http_get(
4817 $uri,
4818 );
4819 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4820 0 return $res;
4821 2 }
4822  
4823  
4824 =head2 oauth_v2_access
4825  
4826 Exchanges a temporary OAuth verifier code for an access token.
4827  
4828 L<API method documentation|https://api.slack.com/methods/oauth.v2.access>
4829  
4830 Takes the following named parameters:
4831  
4832 =over 4
4833  
4834 =item * C<client_id> - Issued when you created your application. (string, optional)
4835  
4836 =item * C<client_secret> - Issued when you created your application. (string, optional)
4837  
4838 =item * C<code> - The `code` param returned via the OAuth callback. (string, required)
4839  
4840 =item * C<redirect_uri> - This must match the originally submitted URI (if one was sent). (string, optional)
4841  
4842 =back
4843  
4844 Resolves to a structure representing the response.
4845  
4846 =cut
4847  
4848 0 ▶async sub oauth_v2_access {
Subroutine oauth_v2_access: not called CC=2 SCAR=17.9
Pod documented
4849 0 my ($self, %args) = @_;
4850 my $uri = $self->endpoint(
4851 'oauth_v2_access',
4852 0 %args{grep { exists $args{$_} } qw(client_id client_secret code redirect_uri)}
4853 );
4854 0 my ($res) = await $self->http_get(
4855 $uri,
4856 );
4857 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4858 0 return $res;
4859 2 }
4860  
4861  
4862 =head2 pins_add
4863  
4864 Pins an item to a channel.
4865  
4866 L<API method documentation|https://api.slack.com/methods/pins.add>
4867  
4868 Takes the following named parameters:
4869  
4870 =over 4
4871  
4872 =item * C<channel> - Channel to pin the item in. (string, required)
4873  
4874 =item * C<timestamp> - Timestamp of the message to pin. (string, optional)
4875  
4876 =back
4877  
4878 Resolves to a structure representing the response.
4879  
4880 =cut
4881  
4882 0 ▶async sub pins_add {
Subroutine pins_add: not called CC=2 SCAR=17.9
Pod documented
4883 0 my ($self, %args) = @_;
4884 0 my $uri = $self->endpoint(
4885 'pins_add',
4886 );
4887 my $content = encode_json_utf8({
4888 0 %args{grep { exists $args{$_} } qw(channel timestamp)}
4889 });
4890 0 my ($res) = await $self->http_post(
4891 $uri,
4892 $content,
4893 content_type => 'application/json; charset=utf-8',
4894 );
4895 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4896 0 return $res;
4897 2 }
4898  
4899  
4900 =head2 pins_list
4901  
4902 Lists items pinned to a channel.
4903  
4904 L<API method documentation|https://api.slack.com/methods/pins.list>
4905  
4906 Takes the following named parameters:
4907  
4908 =over 4
4909  
4910 =item * C<channel> - Channel to get pinned items for. (string, required)
4911  
4912 =back
4913  
4914 Resolves to a structure representing the response.
4915  
4916 =cut
4917  
4918 0 ▶async sub pins_list {
Subroutine pins_list: not called CC=1 SCAR=6.9
Pod documented
4919 0 my ($self, %args) = @_;
4920 my $uri = $self->endpoint(
4921 'pins_list',
4922 0 %args{grep { exists $args{$_} } qw(channel)}
4923 );
4924 0 my ($res) = await $self->http_get(
4925 $uri,
4926 );
4927 0 return $res;
4928 2 }
4929  
4930  
4931 =head2 pins_remove
4932  
4933 Un-pins an item from a channel.
4934  
4935 L<API method documentation|https://api.slack.com/methods/pins.remove>
4936  
4937 Takes the following named parameters:
4938  
4939 =over 4
4940  
4941 =item * C<channel> - Channel where the item is pinned to. (string, required)
4942  
4943 =item * C<timestamp> - Timestamp of the message to un-pin. (string, optional)
4944  
4945 =back
4946  
4947 Resolves to a structure representing the response.
4948  
4949 =cut
4950  
4951 0 ▶async sub pins_remove {
Subroutine pins_remove: not called CC=2 SCAR=17.9
Pod documented
4952 0 my ($self, %args) = @_;
4953 0 my $uri = $self->endpoint(
4954 'pins_remove',
4955 );
4956 my $content = encode_json_utf8({
4957 0 %args{grep { exists $args{$_} } qw(channel timestamp)}
4958 });
4959 0 my ($res) = await $self->http_post(
4960 $uri,
4961 $content,
4962 content_type => 'application/json; charset=utf-8',
4963 );
4964 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
4965 0 return $res;
4966 2 }
4967  
4968  
4969 =head2 reactions_add
4970  
4971 Adds a reaction to an item.
4972  
4973 L<API method documentation|https://api.slack.com/methods/reactions.add>
4974  
4975 Takes the following named parameters:
4976  
4977 =over 4
4978  
4979 =item * C<channel> - Channel where the message to add reaction to was posted. (string, required)
4980  
4981 =item * C<name> - Reaction (emoji) name. (string, required)
4982  
4983 =item * C<timestamp> - Timestamp of the message to add reaction to. (string, required)
4984  
4985 =back
4986  
4987 Resolves to a structure representing the response.
4988  
4989 =cut
4990  
4991 0 ▶async sub reactions_add {
Subroutine reactions_add: not called CC=2 SCAR=17.9
Pod documented
4992 0 my ($self, %args) = @_;
4993 0 my $uri = $self->endpoint(
4994 'reactions_add',
4995 );
4996 my $content = encode_json_utf8({
4997 0 %args{grep { exists $args{$_} } qw(channel name timestamp)}
4998 });
4999 0 my ($res) = await $self->http_post(
5000 $uri,
5001 $content,
5002 content_type => 'application/json; charset=utf-8',
5003 );
5004 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5005 0 return $res;
5006 2 }
5007  
5008  
5009 =head2 reactions_get
5010  
5011 Gets reactions for an item.
5012  
5013 L<API method documentation|https://api.slack.com/methods/reactions.get>
5014  
5015 Takes the following named parameters:
5016  
5017 =over 4
5018  
5019 =item * C<channel> - Channel where the message to get reactions for was posted. (string, optional)
5020  
5021 =item * C<file> - File to get reactions for. (string, optional)
5022  
5023 =item * C<file_comment> - File comment to get reactions for. (string, optional)
5024  
5025 =item * C<full> - If true always return the complete reaction list. (boolean, optional)
5026  
5027 =item * C<timestamp> - Timestamp of the message to get reactions for. (string, optional)
5028  
5029 =back
5030  
5031 Resolves to a structure representing the response.
5032  
5033 =cut
5034  
5035 0 ▶async sub reactions_get {
Subroutine reactions_get: not called CC=1 SCAR=6.9
Pod documented
5036 0 my ($self, %args) = @_;
5037 my $uri = $self->endpoint(
5038 'reactions_get',
5039 0 %args{grep { exists $args{$_} } qw(channel file file_comment full timestamp)}
5040 );
5041 0 my ($res) = await $self->http_get(
5042 $uri,
5043 );
5044 0 return $res;
5045 2 }
5046  
5047  
5048 =head2 reactions_list
5049  
5050 Lists reactions made by a user.
5051  
5052 L<API method documentation|https://api.slack.com/methods/reactions.list>
5053  
5054 Takes the following named parameters:
5055  
5056 =over 4
5057  
5058 =item * C<user> - Show reactions made by this user. Defaults to the authed user. (string, optional)
5059  
5060 =item * C<full> - If true always return the complete reaction list. (boolean, optional)
5061  
5062 =item * C<count> - (integer, optional)
5063  
5064 =item * C<page> - (integer, optional)
5065  
5066 =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)
5067  
5068 =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)
5069  
5070 =back
5071  
5072 Resolves to a structure representing the response.
5073  
5074 =cut
5075  
5076 0 ▶async sub reactions_list {
Subroutine reactions_list: not called CC=2 SCAR=17.9
Pod documented
5077 0 my ($self, %args) = @_;
5078 my $uri = $self->endpoint(
5079 'reactions_list',
5080 0 %args{grep { exists $args{$_} } qw(user full count page cursor limit)}
5081 );
5082 0 my ($res) = await $self->http_get(
5083 $uri,
5084 );
5085 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5086 0 return $res;
5087 2 }
5088  
5089  
5090 =head2 reactions_remove
5091  
5092 Removes a reaction from an item.
5093  
5094 L<API method documentation|https://api.slack.com/methods/reactions.remove>
5095  
5096 Takes the following named parameters:
5097  
5098 =over 4
5099  
5100 =item * C<name> - Reaction (emoji) name. (string, required)
5101  
5102 =item * C<file> - File to remove reaction from. (string, optional)
5103  
5104 =item * C<file_comment> - File comment to remove reaction from. (string, optional)
5105  
5106 =item * C<channel> - Channel where the message to remove reaction from was posted. (string, optional)
5107  
5108 =item * C<timestamp> - Timestamp of the message to remove reaction from. (string, optional)
5109  
5110 =back
5111  
5112 Resolves to a structure representing the response.
5113  
5114 =cut
5115  
5116 0 ▶async sub reactions_remove {
Subroutine reactions_remove: not called CC=2 SCAR=17.9
Pod documented
5117 0 my ($self, %args) = @_;
5118 0 my $uri = $self->endpoint(
5119 'reactions_remove',
5120 );
5121 my $content = encode_json_utf8({
5122 0 %args{grep { exists $args{$_} } qw(name file file_comment channel timestamp)}
5123 });
5124 0 my ($res) = await $self->http_post(
5125 $uri,
5126 $content,
5127 content_type => 'application/json; charset=utf-8',
5128 );
5129 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5130 0 return $res;
5131 2 }
5132  
5133  
5134 =head2 reminders_add
5135  
5136 Creates a reminder.
5137  
5138 L<API method documentation|https://api.slack.com/methods/reminders.add>
5139  
5140 Takes the following named parameters:
5141  
5142 =over 4
5143  
5144 =item * C<text> - The content of the reminder (string, required)
5145  
5146 =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)
5147  
5148 =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)
5149  
5150 =back
5151  
5152 Resolves to a structure representing the response.
5153  
5154 =cut
5155  
5156 0 ▶async sub reminders_add {
Subroutine reminders_add: not called CC=2 SCAR=17.9
Pod documented
5157 0 my ($self, %args) = @_;
5158 0 my $uri = $self->endpoint(
5159 'reminders_add',
5160 );
5161 my $content = encode_json_utf8({
5162 0 %args{grep { exists $args{$_} } qw(text time user)}
5163 });
5164 0 my ($res) = await $self->http_post(
5165 $uri,
5166 $content,
5167 content_type => 'application/json; charset=utf-8',
5168 );
5169 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5170 0 return $res;
5171 2 }
5172  
5173  
5174 =head2 reminders_complete
5175  
5176 Marks a reminder as complete.
5177  
5178 L<API method documentation|https://api.slack.com/methods/reminders.complete>
5179  
5180 Takes the following named parameters:
5181  
5182 =over 4
5183  
5184 =item * C<reminder> - The ID of the reminder to be marked as complete (string, optional)
5185  
5186 =back
5187  
5188 Resolves to a structure representing the response.
5189  
5190 =cut
5191  
5192 0 ▶async sub reminders_complete {
Subroutine reminders_complete: not called CC=2 SCAR=17.9
Pod documented
5193 0 my ($self, %args) = @_;
5194 0 my $uri = $self->endpoint(
5195 'reminders_complete',
5196 );
5197 my $content = encode_json_utf8({
5198 0 %args{grep { exists $args{$_} } qw(reminder)}
5199 });
5200 0 my ($res) = await $self->http_post(
5201 $uri,
5202 $content,
5203 content_type => 'application/json; charset=utf-8',
5204 );
5205 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5206 0 return $res;
5207 2 }
5208  
5209  
5210 =head2 reminders_delete
5211  
5212 Deletes a reminder.
5213  
5214 L<API method documentation|https://api.slack.com/methods/reminders.delete>
5215  
5216 Takes the following named parameters:
5217  
5218 =over 4
5219  
5220 =item * C<reminder> - The ID of the reminder (string, optional)
5221  
5222 =back
5223  
5224 Resolves to a structure representing the response.
5225  
5226 =cut
5227  
5228 0 ▶async sub reminders_delete {
Subroutine reminders_delete: not called CC=2 SCAR=17.9
Pod documented
5229 0 my ($self, %args) = @_;
5230 0 my $uri = $self->endpoint(
5231 'reminders_delete',
5232 );
5233 my $content = encode_json_utf8({
5234 0 %args{grep { exists $args{$_} } qw(reminder)}
5235 });
5236 0 my ($res) = await $self->http_post(
5237 $uri,
5238 $content,
5239 content_type => 'application/json; charset=utf-8',
5240 );
5241 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5242 0 return $res;
5243 2 }
5244  
5245  
5246 =head2 reminders_info
5247  
5248 Gets information about a reminder.
5249  
5250 L<API method documentation|https://api.slack.com/methods/reminders.info>
5251  
5252 Takes the following named parameters:
5253  
5254 =over 4
5255  
5256 =item * C<reminder> - The ID of the reminder (string, optional)
5257  
5258 =back
5259  
5260 Resolves to a structure representing the response.
5261  
5262 =cut
5263  
5264 0 ▶async sub reminders_info {
Subroutine reminders_info: not called CC=2 SCAR=17.9
Pod documented
5265 0 my ($self, %args) = @_;
5266 my $uri = $self->endpoint(
5267 'reminders_info',
5268 0 %args{grep { exists $args{$_} } qw(reminder)}
5269 );
5270 0 my ($res) = await $self->http_get(
5271 $uri,
5272 );
5273 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5274 0 return $res;
5275 2 }
5276  
5277  
5278 =head2 reminders_list
5279  
5280 Lists all reminders created by or for a given user.
5281  
5282 L<API method documentation|https://api.slack.com/methods/reminders.list>
5283  
5284 Resolves to a structure representing the response.
5285  
5286 =cut
5287  
5288 0 ▶async sub reminders_list {
Subroutine reminders_list: not called CC=2 SCAR=17.9
Pod documented
5289 0 my ($self, %args) = @_;
5290 0 my $uri = $self->endpoint(
5291 'reminders_list',
5292 );
5293 0 my ($res) = await $self->http_get(
5294 $uri,
5295 );
5296 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5297 0 return $res;
5298 2 }
5299  
5300  
5301 =head2 rtm_connect
5302  
5303 Starts a Real Time Messaging session.
5304  
5305 L<API method documentation|https://api.slack.com/methods/rtm.connect>
5306  
5307 Takes the following named parameters:
5308  
5309 =over 4
5310  
5311 =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)
5312  
5313 =item * C<presence_sub> - Only deliver presence events when requested by subscription. See [presence subscriptions](/docs/presence-and-status#subscriptions). (boolean, optional)
5314  
5315 =back
5316  
5317 Resolves to a structure representing the response.
5318  
5319 =cut
5320  
5321 0 ▶async sub rtm_connect {
Subroutine rtm_connect: not called CC=2 SCAR=17.9
Pod documented
5322 0 my ($self, %args) = @_;
5323 my $uri = $self->endpoint(
5324 'rtm_connect',
5325 0 %args{grep { exists $args{$_} } qw(batch_presence_aware presence_sub)}
5326 );
5327 0 my ($res) = await $self->http_get(
5328 $uri,
5329 );
5330 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5331 0 return $res;
5332 2 }
5333  
5334  
5335 =head2 search_messages
5336  
5337 Searches for messages matching a query.
5338  
5339 L<API method documentation|https://api.slack.com/methods/search.messages>
5340  
5341 Takes the following named parameters:
5342  
5343 =over 4
5344  
5345 =item * C<count> - Pass the number of results you want per "page". Maximum of `100`. (integer, optional)
5346  
5347 =item * C<highlight> - Pass a value of `true` to enable query highlight markers (see below). (boolean, optional)
5348  
5349 =item * C<page> - (integer, optional)
5350  
5351 =item * C<query> - Search query. (string, required)
5352  
5353 =item * C<sort> - Return matches sorted by either `score` or `timestamp`. (string, optional)
5354  
5355 =item * C<sort_dir> - Change sort direction to ascending (`asc`) or descending (`desc`). (string, optional)
5356  
5357 =back
5358  
5359 Resolves to a structure representing the response.
5360  
5361 =cut
5362  
5363 0 ▶async sub search_messages {
Subroutine search_messages: not called CC=2 SCAR=17.9
Pod documented
5364 0 my ($self, %args) = @_;
5365 my $uri = $self->endpoint(
5366 'search_messages',
5367 0 %args{grep { exists $args{$_} } qw(count highlight page query sort sort_dir)}
5368 );
5369 0 my ($res) = await $self->http_get(
5370 $uri,
5371 );
5372 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5373 0 return $res;
5374 2 }
5375  
5376  
5377 =head2 stars_add
5378  
5379 Adds a star to an item.
5380  
5381 L<API method documentation|https://api.slack.com/methods/stars.add>
5382  
5383 Takes the following named parameters:
5384  
5385 =over 4
5386  
5387 =item * C<channel> - Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`). (string, optional)
5388  
5389 =item * C<file> - File to add star to. (string, optional)
5390  
5391 =item * C<file_comment> - File comment to add star to. (string, optional)
5392  
5393 =item * C<timestamp> - Timestamp of the message to add star to. (string, optional)
5394  
5395 =back
5396  
5397 Resolves to a structure representing the response.
5398  
5399 =cut
5400  
5401 0 ▶async sub stars_add {
Subroutine stars_add: not called CC=2 SCAR=17.9
Pod documented
5402 0 my ($self, %args) = @_;
5403 0 my $uri = $self->endpoint(
5404 'stars_add',
5405 );
5406 my $content = encode_json_utf8({
5407 0 %args{grep { exists $args{$_} } qw(channel file file_comment timestamp)}
5408 });
5409 0 my ($res) = await $self->http_post(
5410 $uri,
5411 $content,
5412 content_type => 'application/json; charset=utf-8',
5413 );
5414 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5415 0 return $res;
5416 2 }
5417  
5418  
5419 =head2 stars_list
5420  
5421 Lists stars for a user.
5422  
5423 L<API method documentation|https://api.slack.com/methods/stars.list>
5424  
5425 Takes the following named parameters:
5426  
5427 =over 4
5428  
5429 =item * C<count> - (string, optional)
5430  
5431 =item * C<page> - (string, optional)
5432  
5433 =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)
5434  
5435 =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)
5436  
5437 =back
5438  
5439 Resolves to a structure representing the response.
5440  
5441 =cut
5442  
5443 0 ▶async sub stars_list {
Subroutine stars_list: not called CC=2 SCAR=17.9
Pod documented
5444 0 my ($self, %args) = @_;
5445 my $uri = $self->endpoint(
5446 'stars_list',
5447 0 %args{grep { exists $args{$_} } qw(count page cursor limit)}
5448 );
5449 0 my ($res) = await $self->http_get(
5450 $uri,
5451 );
5452 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5453 0 return $res;
5454 2 }
5455  
5456  
5457 =head2 stars_remove
5458  
5459 Removes a star from an item.
5460  
5461 L<API method documentation|https://api.slack.com/methods/stars.remove>
5462  
5463 Takes the following named parameters:
5464  
5465 =over 4
5466  
5467 =item * C<channel> - Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`). (string, optional)
5468  
5469 =item * C<file> - File to remove star from. (string, optional)
5470  
5471 =item * C<file_comment> - File comment to remove star from. (string, optional)
5472  
5473 =item * C<timestamp> - Timestamp of the message to remove star from. (string, optional)
5474  
5475 =back
5476  
5477 Resolves to a structure representing the response.
5478  
5479 =cut
5480  
5481 0 ▶async sub stars_remove {
Subroutine stars_remove: not called CC=2 SCAR=17.9
Pod documented
5482 0 my ($self, %args) = @_;
5483 0 my $uri = $self->endpoint(
5484 'stars_remove',
5485 );
5486 my $content = encode_json_utf8({
5487 0 %args{grep { exists $args{$_} } qw(channel file file_comment timestamp)}
5488 });
5489 0 my ($res) = await $self->http_post(
5490 $uri,
5491 $content,
5492 content_type => 'application/json; charset=utf-8',
5493 );
5494 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5495 0 return $res;
5496 2 }
5497  
5498  
5499 =head2 team_access_logs
5500  
5501 Gets the access logs for the current team.
5502  
5503 L<API method documentation|https://api.slack.com/methods/team.accessLogs>
5504  
5505 Takes the following named parameters:
5506  
5507 =over 4
5508  
5509 =item * C<before> - End of time range of logs to include in results (inclusive). (string, optional)
5510  
5511 =item * C<count> - (string, optional)
5512  
5513 =item * C<page> - (string, optional)
5514  
5515 =back
5516  
5517 Resolves to a structure representing the response.
5518  
5519 =cut
5520  
5521 0 ▶async sub team_access_logs {
Subroutine team_access_logs: not called CC=2 SCAR=17.9
Pod documented
5522 0 my ($self, %args) = @_;
5523 my $uri = $self->endpoint(
5524 'team_access_logs',
5525 0 %args{grep { exists $args{$_} } qw(before count page)}
5526 );
5527 0 my ($res) = await $self->http_get(
5528 $uri,
5529 );
5530 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5531 0 return $res;
5532 2 }
5533  
5534  
5535 =head2 team_billable_info
5536  
5537 Gets billable users information for the current team.
5538  
5539 L<API method documentation|https://api.slack.com/methods/team.billableInfo>
5540  
5541 Takes the following named parameters:
5542  
5543 =over 4
5544  
5545 =item * C<user> - A user to retrieve the billable information for. Defaults to all users. (string, optional)
5546  
5547 =back
5548  
5549 Resolves to a structure representing the response.
5550  
5551 =cut
5552  
5553 0 ▶async sub team_billable_info {
Subroutine team_billable_info: not called CC=2 SCAR=17.9
Pod documented
5554 0 my ($self, %args) = @_;
5555 my $uri = $self->endpoint(
5556 'team_billable_info',
5557 0 %args{grep { exists $args{$_} } qw(user)}
5558 );
5559 0 my ($res) = await $self->http_get(
5560 $uri,
5561 );
5562 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5563 0 return $res;
5564 2 }
5565  
5566  
5567 =head2 team_info
5568  
5569 Gets information about the current team.
5570  
5571 L<API method documentation|https://api.slack.com/methods/team.info>
5572  
5573 Takes the following named parameters:
5574  
5575 =over 4
5576  
5577 =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)
5578  
5579 =back
5580  
5581 Resolves to a structure representing the response.
5582  
5583 =cut
5584  
5585 0 ▶async sub team_info {
Subroutine team_info: not called CC=2 SCAR=17.9
Pod documented
5586 0 my ($self, %args) = @_;
5587 my $uri = $self->endpoint(
5588 'team_info',
5589 0 %args{grep { exists $args{$_} } qw(team)}
5590 );
5591 0 my ($res) = await $self->http_get(
5592 $uri,
5593 );
5594 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5595 0 return $res;
5596 2 }
5597  
5598  
5599 =head2 team_integration_logs
5600  
5601 Gets the integration logs for the current team.
5602  
5603 L<API method documentation|https://api.slack.com/methods/team.integrationLogs>
5604  
5605 Takes the following named parameters:
5606  
5607 =over 4
5608  
5609 =item * C<app_id> - Filter logs to this Slack app. Defaults to all logs. (string, optional)
5610  
5611 =item * C<change_type> - Filter logs with this change type. Defaults to all logs. (string, optional)
5612  
5613 =item * C<count> - (string, optional)
5614  
5615 =item * C<page> - (string, optional)
5616  
5617 =item * C<service_id> - Filter logs to this service. Defaults to all logs. (string, optional)
5618  
5619 =item * C<user> - Filter logs generated by this user’s actions. Defaults to all logs. (string, optional)
5620  
5621 =back
5622  
5623 Resolves to a structure representing the response.
5624  
5625 =cut
5626  
5627 0 ▶async sub team_integration_logs {
Subroutine team_integration_logs: not called CC=2 SCAR=17.9
Pod documented
5628 0 my ($self, %args) = @_;
5629 my $uri = $self->endpoint(
5630 'team_integration_logs',
5631 0 %args{grep { exists $args{$_} } qw(app_id change_type count page service_id user)}
5632 );
5633 0 my ($res) = await $self->http_get(
5634 $uri,
5635 );
5636 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5637 0 return $res;
5638 2 }
5639  
5640  
5641 =head2 team_profile_get
5642  
5643 Retrieve a team's profile.
5644  
5645 L<API method documentation|https://api.slack.com/methods/team.profile.get>
5646  
5647 Takes the following named parameters:
5648  
5649 =over 4
5650  
5651 =item * C<visibility> - Filter by visibility. (string, optional)
5652  
5653 =back
5654  
5655 Resolves to a structure representing the response.
5656  
5657 =cut
5658  
5659 0 ▶async sub team_profile_get {
Subroutine team_profile_get: not called CC=2 SCAR=17.9
Pod documented
5660 0 my ($self, %args) = @_;
5661 my $uri = $self->endpoint(
5662 'team_profile_get',
5663 0 %args{grep { exists $args{$_} } qw(visibility)}
5664 );
5665 0 my ($res) = await $self->http_get(
5666 $uri,
5667 );
5668 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5669 0 return $res;
5670 2 }
5671  
5672  
5673 =head2 usergroups_create
5674  
5675 Create a User Group
5676  
5677 L<API method documentation|https://api.slack.com/methods/usergroups.create>
5678  
5679 Takes the following named parameters:
5680  
5681 =over 4
5682  
5683 =item * C<channels> - A comma separated string of encoded channel IDs for which the User Group uses as a default. (string, optional)
5684  
5685 =item * C<description> - A short description of the User Group. (string, optional)
5686  
5687 =item * C<handle> - A mention handle. Must be unique among channels, users and User Groups. (string, optional)
5688  
5689 =item * C<include_count> - Include the number of users in each User Group. (boolean, optional)
5690  
5691 =item * C<name> - A name for the User Group. Must be unique among User Groups. (string, required)
5692  
5693 =back
5694  
5695 Resolves to a structure representing the response.
5696  
5697 =cut
5698  
5699 0 ▶async sub usergroups_create {
Subroutine usergroups_create: not called CC=2 SCAR=17.9
Pod documented
5700 0 my ($self, %args) = @_;
5701 0 my $uri = $self->endpoint(
5702 'usergroups_create',
5703 );
5704 my $content = encode_json_utf8({
5705 0 %args{grep { exists $args{$_} } qw(channels description handle include_count name)}
5706 });
5707 0 my ($res) = await $self->http_post(
5708 $uri,
5709 $content,
5710 content_type => 'application/json; charset=utf-8',
5711 );
5712 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5713 0 return $res;
5714 2 }
5715  
5716  
5717 =head2 usergroups_disable
5718  
5719 Disable an existing User Group
5720  
5721 L<API method documentation|https://api.slack.com/methods/usergroups.disable>
5722  
5723 Takes the following named parameters:
5724  
5725 =over 4
5726  
5727 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5728  
5729 =item * C<usergroup> - The encoded ID of the User Group to disable. (string, required)
5730  
5731 =back
5732  
5733 Resolves to a structure representing the response.
5734  
5735 =cut
5736  
5737 0 ▶async sub usergroups_disable {
Subroutine usergroups_disable: not called CC=2 SCAR=17.9
Pod documented
5738 0 my ($self, %args) = @_;
5739 0 my $uri = $self->endpoint(
5740 'usergroups_disable',
5741 );
5742 my $content = encode_json_utf8({
5743 0 %args{grep { exists $args{$_} } qw(include_count usergroup)}
5744 });
5745 0 my ($res) = await $self->http_post(
5746 $uri,
5747 $content,
5748 content_type => 'application/json; charset=utf-8',
5749 );
5750 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5751 0 return $res;
5752 2 }
5753  
5754  
5755 =head2 usergroups_enable
5756  
5757 Enable a User Group
5758  
5759 L<API method documentation|https://api.slack.com/methods/usergroups.enable>
5760  
5761 Takes the following named parameters:
5762  
5763 =over 4
5764  
5765 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5766  
5767 =item * C<usergroup> - The encoded ID of the User Group to enable. (string, required)
5768  
5769 =back
5770  
5771 Resolves to a structure representing the response.
5772  
5773 =cut
5774  
5775 0 ▶async sub usergroups_enable {
Subroutine usergroups_enable: not called CC=2 SCAR=17.9
Pod documented
5776 0 my ($self, %args) = @_;
5777 0 my $uri = $self->endpoint(
5778 'usergroups_enable',
5779 );
5780 my $content = encode_json_utf8({
5781 0 %args{grep { exists $args{$_} } qw(include_count usergroup)}
5782 });
5783 0 my ($res) = await $self->http_post(
5784 $uri,
5785 $content,
5786 content_type => 'application/json; charset=utf-8',
5787 );
5788 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5789 0 return $res;
5790 2 }
5791  
5792  
5793 =head2 usergroups_list
5794  
5795 List all User Groups for a team
5796  
5797 L<API method documentation|https://api.slack.com/methods/usergroups.list>
5798  
5799 Takes the following named parameters:
5800  
5801 =over 4
5802  
5803 =item * C<include_users> - Include the list of users for each User Group. (boolean, optional)
5804  
5805 =item * C<include_count> - Include the number of users in each User Group. (boolean, optional)
5806  
5807 =item * C<include_disabled> - Include disabled User Groups. (boolean, optional)
5808  
5809 =back
5810  
5811 Resolves to a structure representing the response.
5812  
5813 =cut
5814  
5815 0 ▶async sub usergroups_list {
Subroutine usergroups_list: not called CC=2 SCAR=17.9
Pod documented
5816 0 my ($self, %args) = @_;
5817 my $uri = $self->endpoint(
5818 'usergroups_list',
5819 0 %args{grep { exists $args{$_} } qw(include_users include_count include_disabled)}
5820 );
5821 0 my ($res) = await $self->http_get(
5822 $uri,
5823 );
5824 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5825 0 return $res;
5826 2 }
5827  
5828  
5829 =head2 usergroups_update
5830  
5831 Update an existing User Group
5832  
5833 L<API method documentation|https://api.slack.com/methods/usergroups.update>
5834  
5835 Takes the following named parameters:
5836  
5837 =over 4
5838  
5839 =item * C<handle> - A mention handle. Must be unique among channels, users and User Groups. (string, optional)
5840  
5841 =item * C<description> - A short description of the User Group. (string, optional)
5842  
5843 =item * C<channels> - A comma separated string of encoded channel IDs for which the User Group uses as a default. (string, optional)
5844  
5845 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5846  
5847 =item * C<usergroup> - The encoded ID of the User Group to update. (string, required)
5848  
5849 =item * C<name> - A name for the User Group. Must be unique among User Groups. (string, optional)
5850  
5851 =back
5852  
5853 Resolves to a structure representing the response.
5854  
5855 =cut
5856  
5857 0 ▶async sub usergroups_update {
Subroutine usergroups_update: not called CC=2 SCAR=17.9
Pod documented
5858 0 my ($self, %args) = @_;
5859 0 my $uri = $self->endpoint(
5860 'usergroups_update',
5861 );
5862 my $content = encode_json_utf8({
5863 0 %args{grep { exists $args{$_} } qw(handle description channels include_count usergroup name)}
5864 });
5865 0 my ($res) = await $self->http_post(
5866 $uri,
5867 $content,
5868 content_type => 'application/json; charset=utf-8',
5869 );
5870 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5871 0 return $res;
5872 2 }
5873  
5874  
5875 =head2 usergroups_users_list
5876  
5877 List all users in a User Group
5878  
5879 L<API method documentation|https://api.slack.com/methods/usergroups.users.list>
5880  
5881 Takes the following named parameters:
5882  
5883 =over 4
5884  
5885 =item * C<include_disabled> - Allow results that involve disabled User Groups. (boolean, optional)
5886  
5887 =item * C<usergroup> - The encoded ID of the User Group to update. (string, required)
5888  
5889 =back
5890  
5891 Resolves to a structure representing the response.
5892  
5893 =cut
5894  
5895 0 ▶async sub usergroups_users_list {
Subroutine usergroups_users_list: not called CC=2 SCAR=17.9
Pod documented
5896 0 my ($self, %args) = @_;
5897 my $uri = $self->endpoint(
5898 'usergroups_users_list',
5899 0 %args{grep { exists $args{$_} } qw(include_disabled usergroup)}
5900 );
5901 0 my ($res) = await $self->http_get(
5902 $uri,
5903 );
5904 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5905 0 return $res;
5906 2 }
5907  
5908  
5909 =head2 usergroups_users_update
5910  
5911 Update the list of users for a User Group
5912  
5913 L<API method documentation|https://api.slack.com/methods/usergroups.users.update>
5914  
5915 Takes the following named parameters:
5916  
5917 =over 4
5918  
5919 =item * C<include_count> - Include the number of users in the User Group. (boolean, optional)
5920  
5921 =item * C<usergroup> - The encoded ID of the User Group to update. (string, required)
5922  
5923 =item * C<users> - A comma separated string of encoded user IDs that represent the entire list of users for the User Group. (string, required)
5924  
5925 =back
5926  
5927 Resolves to a structure representing the response.
5928  
5929 =cut
5930  
5931 0 ▶async sub usergroups_users_update {
Subroutine usergroups_users_update: not called CC=2 SCAR=17.9
Pod documented
5932 0 my ($self, %args) = @_;
5933 0 my $uri = $self->endpoint(
5934 'usergroups_users_update',
5935 );
5936 my $content = encode_json_utf8({
5937 0 %args{grep { exists $args{$_} } qw(include_count usergroup users)}
5938 });
5939 0 my ($res) = await $self->http_post(
5940 $uri,
5941 $content,
5942 content_type => 'application/json; charset=utf-8',
5943 );
5944 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5945 0 return $res;
5946 2 }
5947  
5948  
5949 =head2 users_conversations
5950  
5951 List conversations the calling user may access.
5952  
5953 L<API method documentation|https://api.slack.com/methods/users.conversations>
5954  
5955 Takes the following named parameters:
5956  
5957 =over 4
5958  
5959 =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)
5960  
5961 =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)
5962  
5963 =item * C<exclude_archived> - Set to `true` to exclude archived channels from the list (boolean, optional)
5964  
5965 =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)
5966  
5967 =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)
5968  
5969 =back
5970  
5971 Resolves to a structure representing the response.
5972  
5973 =cut
5974  
5975 0 ▶async sub users_conversations {
Subroutine users_conversations: not called CC=2 SCAR=17.9
Pod documented
5976 0 my ($self, %args) = @_;
5977 my $uri = $self->endpoint(
5978 'users_conversations',
5979 0 %args{grep { exists $args{$_} } qw(user types exclude_archived limit cursor)}
5980 );
5981 0 my ($res) = await $self->http_get(
5982 $uri,
5983 );
5984 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
5985 0 return $res;
5986 2 }
5987  
5988  
5989 =head2 users_delete_photo
5990  
5991 Delete the user profile photo
5992  
5993 L<API method documentation|https://api.slack.com/methods/users.deletePhoto>
5994  
5995 Resolves to a structure representing the response.
5996  
5997 =cut
5998  
5999 0 ▶async sub users_delete_photo {
Subroutine users_delete_photo: not called CC=2 SCAR=17.9
Pod documented
6000 0 my ($self, %args) = @_;
6001 0 my $uri = $self->endpoint(
6002 'users_delete_photo',
6003 );
6004 0 my ($res) = await $self->http_post(
6005 $uri,
6006 );
6007 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6008 0 return $res;
6009 2 }
6010  
6011  
6012 =head2 users_get_presence
6013  
6014 Gets user presence information.
6015  
6016 L<API method documentation|https://api.slack.com/methods/users.getPresence>
6017  
6018 Takes the following named parameters:
6019  
6020 =over 4
6021  
6022 =item * C<user> - User to get presence info on. Defaults to the authed user. (string, optional)
6023  
6024 =back
6025  
6026 Resolves to a structure representing the response.
6027  
6028 =cut
6029  
6030 0 ▶async sub users_get_presence {
Subroutine users_get_presence: not called CC=2 SCAR=17.9
Pod documented
6031 0 my ($self, %args) = @_;
6032 my $uri = $self->endpoint(
6033 'users_get_presence',
6034 0 %args{grep { exists $args{$_} } qw(user)}
6035 );
6036 0 my ($res) = await $self->http_get(
6037 $uri,
6038 );
6039 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6040 0 return $res;
6041 2 }
6042  
6043  
6044 =head2 users_identity
6045  
6046 Get a user's identity.
6047  
6048 L<API method documentation|https://api.slack.com/methods/users.identity>
6049  
6050 Resolves to a structure representing the response.
6051  
6052 =cut
6053  
6054 0 ▶async sub users_identity {
Subroutine users_identity: not called CC=1 SCAR=6.9
Pod documented
6055 0 my ($self, %args) = @_;
6056 0 my $uri = $self->endpoint(
6057 'users_identity',
6058 );
6059 0 my ($res) = await $self->http_get(
6060 $uri,
6061 );
6062 0 return $res;
6063 2 }
6064  
6065  
6066 =head2 users_info
6067  
6068 Gets information about a user.
6069  
6070 L<API method documentation|https://api.slack.com/methods/users.info>
6071  
6072 Takes the following named parameters:
6073  
6074 =over 4
6075  
6076 =item * C<include_locale> - Set this to `true` to receive the locale for this user. Defaults to `false` (boolean, optional)
6077  
6078 =item * C<user> - User to get info on (string, optional)
6079  
6080 =back
6081  
6082 Resolves to a structure representing the response.
6083  
6084 =cut
6085  
6086 0 ▶async sub users_info {
Subroutine users_info: not called CC=2 SCAR=17.9
Pod documented
6087 0 my ($self, %args) = @_;
6088 my $uri = $self->endpoint(
6089 'users_info',
6090 0 %args{grep { exists $args{$_} } qw(include_locale user)}
6091 );
6092 0 my ($res) = await $self->http_get(
6093 $uri,
6094 );
6095 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6096 0 return $res;
6097 2 }
6098  
6099  
6100 =head2 users_list
6101  
6102 Lists all users in a Slack team.
6103  
6104 L<API method documentation|https://api.slack.com/methods/users.list>
6105  
6106 Takes the following named parameters:
6107  
6108 =over 4
6109  
6110 =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)
6111  
6112 =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)
6113  
6114 =item * C<include_locale> - Set this to `true` to receive the locale for users. Defaults to `false` (boolean, optional)
6115  
6116 =back
6117  
6118 Resolves to a structure representing the response.
6119  
6120 =cut
6121  
6122 0 ▶async sub users_list {
Subroutine users_list: not called CC=2 SCAR=17.9
Pod documented
6123 0 my ($self, %args) = @_;
6124 my $uri = $self->endpoint(
6125 'users_list',
6126 0 %args{grep { exists $args{$_} } qw(limit cursor include_locale)}
6127 );
6128 0 my ($res) = await $self->http_get(
6129 $uri,
6130 );
6131 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6132 0 return $res;
6133 2 }
6134  
6135  
6136 =head2 users_lookup_by_email
6137  
6138 Find a user with an email address.
6139  
6140 L<API method documentation|https://api.slack.com/methods/users.lookupByEmail>
6141  
6142 Takes the following named parameters:
6143  
6144 =over 4
6145  
6146 =item * C<email> - An email address belonging to a user in the workspace (string, required)
6147  
6148 =back
6149  
6150 Resolves to a structure representing the response.
6151  
6152 =cut
6153  
6154 0 ▶async sub users_lookup_by_email {
Subroutine users_lookup_by_email: not called CC=2 SCAR=17.9
Pod documented
6155 0 my ($self, %args) = @_;
6156 my $uri = $self->endpoint(
6157 'users_lookup_by_email',
6158 0 %args{grep { exists $args{$_} } qw(email)}
6159 );
6160 0 my ($res) = await $self->http_get(
6161 $uri,
6162 );
6163 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6164 0 return $res;
6165 2 }
6166  
6167  
6168 =head2 users_profile_get
6169  
6170 Retrieves a user's profile information.
6171  
6172 L<API method documentation|https://api.slack.com/methods/users.profile.get>
6173  
6174 Takes the following named parameters:
6175  
6176 =over 4
6177  
6178 =item * C<include_labels> - Include labels for each ID in custom profile fields (boolean, optional)
6179  
6180 =item * C<user> - User to retrieve profile info for (string, optional)
6181  
6182 =back
6183  
6184 Resolves to a structure representing the response.
6185  
6186 =cut
6187  
6188 0 ▶async sub users_profile_get {
Subroutine users_profile_get: not called CC=2 SCAR=17.9
Pod documented
6189 0 my ($self, %args) = @_;
6190 my $uri = $self->endpoint(
6191 'users_profile_get',
6192 0 %args{grep { exists $args{$_} } qw(include_labels user)}
6193 );
6194 0 my ($res) = await $self->http_get(
6195 $uri,
6196 );
6197 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6198 0 return $res;
6199 2 }
6200  
6201  
6202 =head2 users_profile_set
6203  
6204 Set the profile information for a user.
6205  
6206 L<API method documentation|https://api.slack.com/methods/users.profile.set>
6207  
6208 Takes the following named parameters:
6209  
6210 =over 4
6211  
6212 =item * C<name> - Name of a single key to set. Usable only if `profile` is not passed. (string, optional)
6213  
6214 =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)
6215  
6216 =item * C<user> - ID of user to change. This argument may only be specified by team admins on paid teams. (string, optional)
6217  
6218 =item * C<value> - Value to set a single key to. Usable only if `profile` is not passed. (string, optional)
6219  
6220 =back
6221  
6222 Resolves to a structure representing the response.
6223  
6224 =cut
6225  
6226 0 ▶async sub users_profile_set {
Subroutine users_profile_set: not called CC=2 SCAR=17.9
Pod documented
6227 0 my ($self, %args) = @_;
6228 0 my $uri = $self->endpoint(
6229 'users_profile_set',
6230 );
6231 my $content = encode_json_utf8({
6232 0 %args{grep { exists $args{$_} } qw(name profile user value)}
6233 });
6234 0 my ($res) = await $self->http_post(
6235 $uri,
6236 $content,
6237 content_type => 'application/json; charset=utf-8',
6238 );
6239 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6240 0 return $res;
6241 2 }
6242  
6243  
6244 =head2 users_set_active
6245  
6246 Marked a user as active. Deprecated and non-functional.
6247  
6248 L<API method documentation|https://api.slack.com/methods/users.setActive>
6249  
6250 Resolves to a structure representing the response.
6251  
6252 =cut
6253  
6254 0 ▶async sub users_set_active {
Subroutine users_set_active: not called CC=2 SCAR=17.9
Pod documented
6255 0 my ($self, %args) = @_;
6256 0 my $uri = $self->endpoint(
6257 'users_set_active',
6258 );
6259 0 my ($res) = await $self->http_post(
6260 $uri,
6261 );
6262 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6263 0 return $res;
6264 2 }
6265  
6266  
6267 =head2 users_set_photo
6268  
6269 Set the user profile photo
6270  
6271 L<API method documentation|https://api.slack.com/methods/users.setPhoto>
6272  
6273 Takes the following named parameters:
6274  
6275 =over 4
6276  
6277 =item * C<crop_w> - Width/height of crop box (always square) (string, optional)
6278  
6279 =item * C<crop_x> - X coordinate of top-left corner of crop box (string, optional)
6280  
6281 =item * C<crop_y> - Y coordinate of top-left corner of crop box (string, optional)
6282  
6283 =item * C<image> - File contents via `multipart/form-data`. (string, optional)
6284  
6285 =back
6286  
6287 Resolves to a structure representing the response.
6288  
6289 =cut
6290  
6291 0 ▶async sub users_set_photo {
Subroutine users_set_photo: not called CC=2 SCAR=17.9
Pod documented
6292 0 my ($self, %args) = @_;
6293 0 my $uri = $self->endpoint(
6294 'users_set_photo',
6295 );
6296 my $content = encode_json_utf8({
6297 0 %args{grep { exists $args{$_} } qw(crop_w crop_x crop_y image)}
6298 });
6299 0 my ($res) = await $self->http_post(
6300 $uri,
6301 $content,
6302 content_type => 'application/json; charset=utf-8',
6303 );
6304 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6305 0 return $res;
6306 2 }
6307  
6308  
6309 =head2 users_set_presence
6310  
6311 Manually sets user presence.
6312  
6313 L<API method documentation|https://api.slack.com/methods/users.setPresence>
6314  
6315 Takes the following named parameters:
6316  
6317 =over 4
6318  
6319 =item * C<presence> - Either `auto` or `away` (string, required)
6320  
6321 =back
6322  
6323 Resolves to a structure representing the response.
6324  
6325 =cut
6326  
6327 0 ▶async sub users_set_presence {
Subroutine users_set_presence: not called CC=2 SCAR=17.9
Pod documented
6328 0 my ($self, %args) = @_;
6329 0 my $uri = $self->endpoint(
6330 'users_set_presence',
6331 );
6332 my $content = encode_json_utf8({
6333 0 %args{grep { exists $args{$_} } qw(presence)}
6334 });
6335 0 my ($res) = await $self->http_post(
6336 $uri,
6337 $content,
6338 content_type => 'application/json; charset=utf-8',
6339 );
6340 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6341 0 return $res;
6342 2 }
6343  
6344  
6345 =head2 views_open
6346  
6347 Open a view for a user.
6348  
6349 L<API method documentation|https://api.slack.com/methods/views.open>
6350  
6351 Takes the following named parameters:
6352  
6353 =over 4
6354  
6355 =item * C<trigger_id> - Exchange a trigger to post to the user. (string, required)
6356  
6357 =item * C<view> - A [view payload](/reference/surfaces/views). This must be a JSON-encoded string. (string, required)
6358  
6359 =back
6360  
6361 Resolves to a structure representing the response.
6362  
6363 =cut
6364  
6365 0 ▶async sub views_open {
Subroutine views_open: not called CC=2 SCAR=17.9
Pod documented
6366 0 my ($self, %args) = @_;
6367 0 my $uri = $self->endpoint(
6368 'views_open',
6369 );
6370 my $content = encode_json_utf8({
6371 0 %args{grep { exists $args{$_} } qw(trigger_id view)}
6372 });
6373 0 my ($res) = await $self->http_post(
6374 $uri,
6375 $content,
6376 content_type => 'application/json; charset=utf-8',
6377 );
6378 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6379 0 return $res;
6380 2 }
6381  
6382  
6383 =head2 views_publish
6384  
6385 Publish a static view for a User.
6386  
6387 L<API method documentation|https://api.slack.com/methods/views.publish>
6388  
6389 Takes the following named parameters:
6390  
6391 =over 4
6392  
6393 =item * C<user_id> - `id` of the user you want publish a view to. (string, required)
6394  
6395 =item * C<view> - A [view payload](/reference/surfaces/views). This must be a JSON-encoded string. (string, required)
6396  
6397 =item * C<hash> - A string that represents view state to protect against possible race conditions. (string, optional)
6398  
6399 =back
6400  
6401 Resolves to a structure representing the response.
6402  
6403 =cut
6404  
6405 0 ▶async sub views_publish {
Subroutine views_publish: not called CC=2 SCAR=17.9
Pod documented
6406 0 my ($self, %args) = @_;
6407 0 my $uri = $self->endpoint(
6408 'views_publish',
6409 );
6410 my $content = encode_json_utf8({
6411 0 %args{grep { exists $args{$_} } qw(user_id view hash)}
6412 });
6413 0 my ($res) = await $self->http_post(
6414 $uri,
6415 $content,
6416 content_type => 'application/json; charset=utf-8',
6417 );
6418 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6419 0 return $res;
6420 2 }
6421  
6422  
6423 =head2 views_push
6424  
6425 Push a view onto the stack of a root view.
6426  
6427 L<API method documentation|https://api.slack.com/methods/views.push>
6428  
6429 Takes the following named parameters:
6430  
6431 =over 4
6432  
6433 =item * C<trigger_id> - Exchange a trigger to post to the user. (string, required)
6434  
6435 =item * C<view> - A [view payload](/reference/surfaces/views). This must be a JSON-encoded string. (string, required)
6436  
6437 =back
6438  
6439 Resolves to a structure representing the response.
6440  
6441 =cut
6442  
6443 0 ▶async sub views_push {
Subroutine views_push: not called CC=2 SCAR=17.9
Pod documented
6444 0 my ($self, %args) = @_;
6445 0 my $uri = $self->endpoint(
6446 'views_push',
6447 );
6448 my $content = encode_json_utf8({
6449 0 %args{grep { exists $args{$_} } qw(trigger_id view)}
6450 });
6451 0 my ($res) = await $self->http_post(
6452 $uri,
6453 $content,
6454 content_type => 'application/json; charset=utf-8',
6455 );
6456 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6457 0 return $res;
6458 2 }
6459  
6460  
6461 =head2 views_update
6462  
6463 Update an existing view.
6464  
6465 L<API method documentation|https://api.slack.com/methods/views.update>
6466  
6467 Takes the following named parameters:
6468  
6469 =over 4
6470  
6471 =item * C<view_id> - A unique identifier of the view to be updated. Either `view_id` or `external_id` is required. (string, optional)
6472  
6473 =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)
6474  
6475 =item * C<view> - A [view object](/reference/surfaces/views). This must be a JSON-encoded string. (string, optional)
6476  
6477 =item * C<hash> - A string that represents view state to protect against possible race conditions. (string, optional)
6478  
6479 =back
6480  
6481 Resolves to a structure representing the response.
6482  
6483 =cut
6484  
6485 0 ▶async sub views_update {
Subroutine views_update: not called CC=2 SCAR=17.9
Pod documented
6486 0 my ($self, %args) = @_;
6487 0 my $uri = $self->endpoint(
6488 'views_update',
6489 );
6490 my $content = encode_json_utf8({
6491 0 %args{grep { exists $args{$_} } qw(view_id external_id view hash)}
6492 });
6493 0 my ($res) = await $self->http_post(
6494 $uri,
6495 $content,
6496 content_type => 'application/json; charset=utf-8',
6497 );
6498 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6499 0 return $res;
6500 2 }
6501  
6502  
6503 =head2 workflows_step_completed
6504  
6505 Indicate that an app's step in a workflow completed execution.
6506  
6507 L<API method documentation|https://api.slack.com/methods/workflows.stepCompleted>
6508  
6509 Takes the following named parameters:
6510  
6511 =over 4
6512  
6513 =item * C<workflow_step_execute_id> - Context identifier that maps to the correct workflow step execution. (string, required)
6514  
6515 =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)
6516  
6517 =back
6518  
6519 Resolves to a structure representing the response.
6520  
6521 =cut
6522  
6523 0 ▶async sub workflows_step_completed {
Subroutine workflows_step_completed: not called CC=2 SCAR=17.9
Pod documented
6524 0 my ($self, %args) = @_;
6525 0 my $uri = $self->endpoint(
6526 'workflows_step_completed',
6527 );
6528 my $content = encode_json_utf8({
6529 0 %args{grep { exists $args{$_} } qw(workflow_step_execute_id outputs)}
6530 });
6531 0 my ($res) = await $self->http_post(
6532 $uri,
6533 $content,
6534 content_type => 'application/json; charset=utf-8',
6535 );
6536 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6537 0 return $res;
6538 2 }
6539  
6540  
6541 =head2 workflows_step_failed
6542  
6543 Indicate that an app's step in a workflow failed to execute.
6544  
6545 L<API method documentation|https://api.slack.com/methods/workflows.stepFailed>
6546  
6547 Takes the following named parameters:
6548  
6549 =over 4
6550  
6551 =item * C<workflow_step_execute_id> - Context identifier that maps to the correct workflow step execution. (string, required)
6552  
6553 =item * C<error> - A JSON-based object with a `message` property that should contain a human readable error message. (string, required)
6554  
6555 =back
6556  
6557 Resolves to a structure representing the response.
6558  
6559 =cut
6560  
6561 0 ▶async sub workflows_step_failed {
Subroutine workflows_step_failed: not called CC=2 SCAR=17.9
Pod documented
6562 0 my ($self, %args) = @_;
6563 0 my $uri = $self->endpoint(
6564 'workflows_step_failed',
6565 );
6566 my $content = encode_json_utf8({
6567 0 %args{grep { exists $args{$_} } qw(workflow_step_execute_id error)}
6568 });
6569 0 my ($res) = await $self->http_post(
6570 $uri,
6571 $content,
6572 content_type => 'application/json; charset=utf-8',
6573 );
6574 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6575 0 return $res;
6576 2 }
6577  
6578  
6579 =head2 workflows_update_step
6580  
6581 Update the configuration for a workflow extension step.
6582  
6583 L<API method documentation|https://api.slack.com/methods/workflows.updateStep>
6584  
6585 Takes the following named parameters:
6586  
6587 =over 4
6588  
6589 =item * C<workflow_step_edit_id> - A context identifier provided with `view_submission` payloads used to call back to `workflows.updateStep`. (string, required)
6590  
6591 =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)
6592  
6593 =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)
6594  
6595 =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)
6596  
6597 =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)
6598  
6599 =back
6600  
6601 Resolves to a structure representing the response.
6602  
6603 =cut
6604  
6605 0 ▶async sub workflows_update_step {
Subroutine workflows_update_step: not called CC=2 SCAR=17.9
Pod documented
6606 0 my ($self, %args) = @_;
6607 0 my $uri = $self->endpoint(
6608 'workflows_update_step',
6609 );
6610 my $content = encode_json_utf8({
6611 0 %args{grep { exists $args{$_} } qw(workflow_step_edit_id inputs outputs step_name step_image_url)}
6612 });
6613 0 my ($res) = await $self->http_post(
6614 $uri,
6615 $content,
6616 content_type => 'application/json; charset=utf-8',
6617 );
6618 0 ▶ die $res unless $res->{ok};
Branch: 1 branch
BranchTrueFalseTotal
unless $res->{"ok"} 0 0 0
6619 0 return $res;
6620 2 }
6621  
6622 2 1;
« Slack/Socket.pm ↑ Summary Slack/Event/Channel.pm »