NAME
WebService::Slack::IncomingWebHook - slack incoming webhook client
SYNOPSIS
# for perl program
my
$client
= WebService::Slack::IncomingWebHook->new(
);
$client
->post(
text
=>
'yahoooooo!!'
,
);
# for cli
DESCRIPTION
WebService::Slack::IncomingWebHook is slack incoming webhooks client. Slack is chat web service. For cli, this distribution provides post-slack command.
METHOD
- WebService::Slack::IncomingWebHook->new(%params)
-
my
$client
= WebService::Slack::IncomingWebHook->new(
channel
=>
'#general'
, # optional
username
=>
'masasuzu'
,
# optional
icon_emoji
=>
':sushi:'
,
# optional
);
Creates new object.
- $client->post(%params)
-
$client
->post(
text
=>
'yahoooooo!!'
,
channel
=>
'#general'
,
username
=>
'masasuzu'
,
icon_emoji
=>
':sushi:'
,
);
Posts to slack incoming webhooks. channel, username, icon_emoji and icon_url parameters can override constructor's parameter.
text, pretext, color, fields and attachments parameter are available. See also slack incoming webhook document.
SCRIPT
available options are ...
- --webhook_url (required)
- --text (required)
- --channel (optional)
- --username (optional)
- --icon_url (optional)
- --icon_emoji (optional)
SEE ALSO
https://my.slack.com/services/new/incoming-webhook
LICENSE
Copyright (C) SUZUKI Masashi.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
SUZUKI Masashi <m15.suzuki.masashi@gmail.com>