WebService::Jandi::WebHook - Perl interface to Jandi Service Incoming Webhook
my $jandi = WebService::Jandi::WebHook->new('https://wh.jandi.com/connect-api/webhook/md5sum'); my $msg = { body => '[[PizzaHouse]](http://url_to_text) You have a new Pizza order.', connectColor => '#FAC11B', connectInfo => [ { title => 'Topping', description => 'Pepperoni', }, { title => 'Location', description => 'Empire State Building, 5th Ave, New York', imageUrl => 'http://url_to_text' } ] }; my $res = $jandi->request($msg); # HTTP::Tiny response or my $res = $jandi->request('Hello, world'); die "Failed!\n" unless $res->{success};
my $res = $self->request($message);
$message is a simple string or hashref.
$message
$res is HTTP::Tiny $response.
$res
$response
Hashref format.
{ body => '[[PizzaHouse]](http://url_to_text) You have a new Pizza order.', connectColor => '#FAC11B', connectInfo => [ { title => 'Topping', description => 'Pepperoni', }, { title => 'Location', description => 'Empire State Building, 5th Ave, New York', imageUrl => 'http://url_to_text' } ] }
body and simple string support markdown link format.
body
[text](url)
The MIT License (MIT)
Copyright (c) 2017 Hyungsuk Hong
To install WebService::Jandi::WebHook, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Jandi::WebHook
CPAN shell
perl -MCPAN -e shell install WebService::Jandi::WebHook
For more information on module installation, please visit the detailed CPAN module installation guide.