=encoding utf8 =for comment POD_DERIVED_INDEX_GENERATED The following documentation is automatically generated. Please do not edit this file, but rather the original, inline with Net::Async::Slack at lib/Net/Async/Slack.pm (on the system that originally ran this). If you do edit this file, and don't want your changes to be removed, make sure you change the first line. =cut =head1 NAME Net::Async::Slack - support for the L APIs with L =head1 SYNOPSIS use IO::Async::Loop; use Net::Async::Slack; my $loop = IO::Async::Loop->new; $loop->add( my $gh = Net::Async::Slack->new( token => '...', ) ); =head1 DESCRIPTION This is a basic wrapper for Slack's API. It's an early version, the module API is likely to change somewhat over time. See the C directory for usage. =head1 METHODS =head2 rtm Establishes a connection to the Slack RTM websocket API, and resolves to a L instance. =head2 send_message Send a message to a user or channel. Supports the following named parameters: =over 4 =item * channel - who to send the message to, can be a channel ID or C<#channel> name, or user ID =item * text - the message, see L for details =item * attachments - more advanced messages, see L =item * parse - whether to parse content and convert things like links =back and the following named boolean parameters: =over 4 =item * link_names - convert C<@user> and C<#channel> to links =item * unfurl_links - show preview for URLs =item * unfurl_media - show preview for things that look like media links =item * as_user - send as user =item * reply_broadcast - send to all users when replying to a thread =back Returns a L, although the content of the response is subject to change. =head2 conversations_info Provide information about a channel. Takes the following named parameters: =over 4 =item * C - the channel ID to look up =back and returns a L which will resolve to a hashref containing C<< { channel => { name => '...' } } >>. =head2 join_channel Attempt to join the given channel. Takes the following named parameters: =over 4 =item * C - the channel ID or name to join =back =head1 METHODS - Internal =head2 endpoints Returns the hashref of API endpoints, loading them on first call from the C file. =head2 endpoint Processes the given endpoint as a template, using the named parameters passed to the method. =head2 oauth_request =head2 token API token. =head2 http Returns the HTTP instance used for communicating with the API. Currently autocreates a L instance. =head2 http_get Issues an HTTP GET request. =head2 http_post Issues an HTTP POST request. =head1 SEE ALSO =over 4 =item * L - low-level API wrapper around RTM =item * L - another RTM-specific wrapper, this time based on Mojolicious =item * L - more RTM support, this time via LWP and a subprocess/thread for handling the websocket part =item * L - Furl-based wrapper around the REST API =item * L - another AnyEvent RTM implementation =back =head1 INHERITED METHODS =over 4 =item L L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L =back =head1 AUTHOR Tom Molesworth =head1 LICENSE Copyright Tom Molesworth 2016-2020. Licensed under the same terms as Perl itself.