- COPYRIGHT AND LICENSE
Slack-Notify - Trigger Slack incoming webhooks
use Slack::Notify; my $n = Slack::Notify->new( hook_url => 'https://hooks.slack.com/services/...', ); $n->post( text => "something happened", );
This is a simple client for Slack incoming webhooks.
Slack::Notify object with the URL of an incoming hook, then call the
post method to trigger it.
my $n = Slack::Notify->new;
This constructor returns a new Slack::Notify object. Valid arguments include:
The Slack incoming hook URL. Create one of these in the Slack integrations config.
$n->post( text => 'something happened',
Triggers the hook. There's several arguments you can supply, which are described in more detail in the incoming hook documentation.
A simple, multi-line message without special formatting.
Value to use for the username, overriding the one set in the hook config.
URL of an image to use for the icon, overriding the one set in the hook config.
An emoji code (eg
:+1:) to use for the icon, overriding the one set in the hook config.
An arrayref containing some attachment objects. See the attachment guide for details. At the moment this module supports attachment fields, but not buttons, menus and other interactive ocontent.
Please report any bugs or feature requests through the issue tracker at https://github.com/robn/Slack-Notify/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
git clone https://github.com/robn/Slack-Notify.git
Rob N ★ <email@example.com>
This software is copyright (c) 2017 by Rob N ★
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.