NAME
LINE::Notify::Simple
VERSION
1.01
SYNOPSIS
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use feature qw(say);
use LINE::Notify::Simple;
my $access_token = 'your line access token';
my $message = "\nThis is test message.";
my $line = LINE::Notify->new({access_token => $access_token});
my $res = $line->notify($message);
if ($res->is_success) {
say $res->message;
} else {
say $res->status_line . ". ". $res->message;
}
exit;
DESCRIPTION
LINE Notify API simple & easy POST request module.
METHOD
notify
POST https://notify-api.line.me/api/notify. Return LINE::Notify::Simple::Response.
my $message = "\nThis is test message.";
my $res = $line->notify($message);
if ($res->is_success) {
say $res->message;
} else {
say $res->status_line . ". ". $res->message;
}
message(required)
notify_detail
Hashref keys are message, stickerPackageId, stickerId, notificationDisabled
# see https://developers.line.biz/ja/docs/messaging-api/sticker-list/
my $data = {
message => "\nThis is test message.",
stickerPackageId => 11539,
stickerId => 52114110
};
my $res = $line->notify_detail($data);
if ($res->is_success) {
say $res->message;
} else {
say $res->status_line . ". ". $res->message;
}
message(required)
stickerPackageId(optional)
stickerId(optional)
notificationDisabled(optional).
imageThumbnail(not supported)
imageFullsize(not supported)
AUTHOR
Akira Horimoto <emperor.kurt _at_ gmail.com>
SEE ALSO
https://notify-bot.line.me/doc/ja/
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.