« API/Response/AudienceGroupForClickRetargeting.pm
↑ Summary
API/Response/AudienceGroupForImpressionRetargeting.pm »
| 1 | package LINE::Bot::API; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 52 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 52 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 52 | our $VERSION = '1.21'; | |||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 52 | ▶ | use LINE::Bot::API::Builder::SendMessage; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 52 | ▶ | use LINE::Bot::API::Client; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 52 | ▶ | use LINE::Bot::API::Event; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 52 | ▶ | use LINE::Bot::API::Response::Common; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 52 | ▶ | use LINE::Bot::API::Response::Content; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 52 | ▶ | use LINE::Bot::API::Response::Count; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 52 | ▶ | use LINE::Bot::API::Response::FriendDemographics; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | 52 | ▶ | use LINE::Bot::API::Response::NumberOfSentMessages; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 52 | ▶ | use LINE::Bot::API::Response::NumberOfMessageDeliveries; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | 52 | ▶ | use LINE::Bot::API::Response::Profile; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | 52 | ▶ | use LINE::Bot::API::Response::GroupMemberProfile; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | 52 | ▶ | use LINE::Bot::API::Response::GroupSummary; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | 52 | ▶ | use LINE::Bot::API::Response::RoomMemberProfile; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | 52 | ▶ | use LINE::Bot::API::Response::IssueLinkToken; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 52 | ▶ | use LINE::Bot::API::Response::RichMenu; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | 52 | ▶ | use LINE::Bot::API::Response::RichMenuList; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | 52 | ▶ | use LINE::Bot::API::Response::TargetLimit; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 23 | 52 | ▶ | use LINE::Bot::API::Response::TotalUsage; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 52 | ▶ | use LINE::Bot::API::Response::Token; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | 52 | ▶ | use LINE::Bot::API::Response::NumberOfFollowers; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 52 | ▶ | use LINE::Bot::API::Response::UserInteractionStatistics; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | 52 | ▶ | use LINE::Bot::API::Response::BotInfo; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | 52 | ▶ | use LINE::Bot::API::Response::WebhookInformation; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | 52 | ▶ | use LINE::Bot::API::Response::WebhookTest; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | 52 | ▶ | use LINE::Bot::API::Response::Followers; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | 52 | ▶ | use constant { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 33 | 52 | DEFAULT_MESSAGING_API_ENDPOINT => 'https://api.line.me/v2/bot/', | |||||||||||||||||||||||||||||||||||||||||
| 34 | DEFAULT_SOCIAL_API_ENDPOINT => 'https://api.line.me/v2/oauth/', | ||||||||||||||||||||||||||||||||||||||||||
| 35 | DEFAULT_CONTENT_API_ENDPOINT => 'https://api-data.line.me/v2/bot/', | ||||||||||||||||||||||||||||||||||||||||||
| 36 | DEFAULT_OAUTH2_API_ENDPOINT => 'https://api.line.me/oauth2/v2.1/', | ||||||||||||||||||||||||||||||||||||||||||
| 37 | 52 | }; | |||||||||||||||||||||||||||||||||||||||||
| 38 | 52 | ▶ | use Furl; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 52 | ▶ | use Carp 'croak'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | 52 | ▶ | use URI; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 41 | 52 | ▶ | use URI::Escape; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 42 | 52 | ▶ | use URI::QueryParam; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||
| 44 | 40 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=5 SCAR=18.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | 40 | my($class, %args) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||
| 47 | 40 | my $client = LINE::Bot::API::Client->new(%args); | |||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||
| 49 | bless { | ||||||||||||||||||||||||||||||||||||||||||
| 50 | client => $client, | ||||||||||||||||||||||||||||||||||||||||||
| 51 | channel_secret => $args{channel_secret}, | ||||||||||||||||||||||||||||||||||||||||||
| 52 | channel_access_token => $args{channel_access_token}, | ||||||||||||||||||||||||||||||||||||||||||
| 53 | messaging_api_endpoint => $args{messaging_api_endpoint} // DEFAULT_MESSAGING_API_ENDPOINT, | ||||||||||||||||||||||||||||||||||||||||||
| 54 | social_api_endpoint => $args{social_api_endpoint} // DEFAULT_SOCIAL_API_ENDPOINT, | ||||||||||||||||||||||||||||||||||||||||||
| 55 | content_api_endpoint => $args{content_api_endpoint} // DEFAULT_CONTENT_API_ENDPOINT, | ||||||||||||||||||||||||||||||||||||||||||
| 56 | 40 | ▶ | oauth_api_endpoint => $args{oauth_api_endpoint} // DEFAULT_OAUTH2_API_ENDPOINT, | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%4/8
$args{"messaging_api_endpoint"} // "https://api.line.me/v2/bot/"
$args{"social_api_endpoint"} // "https://api.line.me/v2/oauth/"
$args{"content_api_endpoint"} // "https://api-data.line.me/v2/bot/"
$args{"oauth_api_endpoint"} // "https://api.line.me/oauth2/v2.1/"
MC/DC0%0/1
$args{"messaging_api_endpoint"} // "https://api.line.me/v2/bot/"
$args{"messaging_api_endpoint"}
MC/DC0%0/1
$args{"social_api_endpoint"} // "https://api.line.me/v2/oauth/"
$args{"social_api_endpoint"}
MC/DC0%0/1
$args{"content_api_endpoint"} // "https://api-data.line.me/v2/bot/"
$args{"content_api_endpoint"}
MC/DC0%0/1
$args{"oauth_api_endpoint"} // "https://api.line.me/oauth2/v2.1/"
$args{"oauth_api_endpoint"}
Truth table50%1/2
A
A= $args{"messaging_api_endpoint"}
Truth table50%1/2
A
A= $args{"social_api_endpoint"}
Truth table50%1/2
A
A= $args{"content_api_endpoint"}
Truth table50%1/2
A
A= $args{"oauth_api_endpoint"}
| |||||||||||||||||||||||||||||||||||||||||||
| 57 | }, $class; | ||||||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | 82 | ▶ | sub request { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
request: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 61 | 82 | my ($self, $method, $path, @payload) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||
| 63 | return $self->{client}->$method( | ||||||||||||||||||||||||||||||||||||||||||
| 64 | 82 | $self->{messaging_api_endpoint} . $path, | |||||||||||||||||||||||||||||||||||||||||
| 65 | @payload, | ||||||||||||||||||||||||||||||||||||||||||
| 66 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | sub request_content { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
request_content: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | my ($self, $method, $path, @payload) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | return $self->{client}->$method( | ||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | $self->{content_api_endpoint} . $path, | |||||||||||||||||||||||||||||||||||||||||
| 74 | @payload, | ||||||||||||||||||||||||||||||||||||||||||
| 75 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | 11 | ▶ | sub reply_message { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
reply_message: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 79 | 11 | my($self, $reply_token, $messages) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||
| 81 | 11 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 82 | post => 'message/reply', | ||||||||||||||||||||||||||||||||||||||||||
| 83 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 84 | replyToken => $reply_token, | ||||||||||||||||||||||||||||||||||||||||||
| 85 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||||||||||||||||
| 87 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||
| 89 | 11 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||
| 92 | 25 | ▶ | sub push_message { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
push_message: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 93 | 25 | my($self, $to_id, $messages, $options) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||
| 95 | 25 | my @headers = (); | |||||||||||||||||||||||||||||||||||||||||
| 96 | 25 | ▶ | if ($options && defined($options->{'retry_key'})) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$options and defined $options->{"retry_key"}
MC/DC50%1/2
$options and defined $options->{"retry_key"}
$options
defined $options->{"retry_key"}
Truth table66%2/3
A and B
A= $optionsB= defined $options->{"retry_key"}
| |||||||||||||||||||||||||||||||||||||||||||
| 97 | 1 | push @headers, 'X-Line-Retry-Key' => $options->{'retry_key'}; | |||||||||||||||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||||
| 100 | 25 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 101 | post => 'message/push', | ||||||||||||||||||||||||||||||||||||||||||
| 102 | \@headers, | ||||||||||||||||||||||||||||||||||||||||||
| 103 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 104 | to => $to_id, | ||||||||||||||||||||||||||||||||||||||||||
| 105 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||||||||||||
| 107 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 108 | 25 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||
| 111 | 1 | ▶ | sub multicast { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
multicast: called CC=3 SCAR=12.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | 1 | my($self, $to_ids, $messages, $options) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||||||
| 114 | 1 | my @headers = (); | |||||||||||||||||||||||||||||||||||||||||
| 115 | 1 | ▶ | if ($options && defined($options->{'retry_key'})) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$options and defined $options->{"retry_key"}
MC/DC0%0/2
$options and defined $options->{"retry_key"}
$options
defined $options->{"retry_key"}
Truth table33%1/3
A and B
A= $optionsB= defined $options->{"retry_key"}
| |||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | push @headers, 'X-Line-Retry-Key' => $options->{'retry_key'}; | |||||||||||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||||||||||
| 119 | 1 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 120 | post => 'message/multicast', | ||||||||||||||||||||||||||||||||||||||||||
| 121 | \@headers, | ||||||||||||||||||||||||||||||||||||||||||
| 122 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 123 | to => $to_ids, | ||||||||||||||||||||||||||||||||||||||||||
| 124 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||||||||||
| 126 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 127 | 1 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | 2 | ▶ | sub broadcast { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
broadcast: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 131 | 2 | my($self, $messages, $options) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||
| 133 | 2 | my @headers = (); | |||||||||||||||||||||||||||||||||||||||||
| 134 | 2 | ▶ | if (defined($options->{'retry_key'})) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 135 | 1 | push @headers, 'X-Line-Retry-Key' => $options->{'retry_key'}; | |||||||||||||||||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||
| 138 | 2 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 139 | post => 'message/broadcast', | ||||||||||||||||||||||||||||||||||||||||||
| 140 | \@headers, | ||||||||||||||||||||||||||||||||||||||||||
| 141 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 142 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||||||||||||
| 144 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 145 | 2 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | ▶ | sub get_message_content { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_message_content: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | my($self, $message_id, %options) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | my $res = $self->request_content( | |||||||||||||||||||||||||||||||||||||||||
| 151 | 'contents_download' => "message/$message_id/content", | ||||||||||||||||||||||||||||||||||||||||||
| 152 | %options | ||||||||||||||||||||||||||||||||||||||||||
| 153 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | LINE::Bot::API::Response::Content->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 155 | } | ||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||
| 157 | 1 | ▶ | sub get_profile { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_profile: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 158 | 1 | my($self, $user_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 159 | 1 | my $res = $self->request(get => "profile/$user_id"); | |||||||||||||||||||||||||||||||||||||||||
| 160 | 1 | LINE::Bot::API::Response::Profile->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||||||
| 163 | 1 | ▶ | sub get_group_member_profile { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_group_member_profile: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 164 | 1 | my($self, $group_id, $user_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 165 | 1 | my $res = $self->request(get => "group/$group_id/member/$user_id"); | |||||||||||||||||||||||||||||||||||||||||
| 166 | 1 | LINE::Bot::API::Response::GroupMemberProfile->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||
| 169 | 1 | ▶ | sub get_room_member_profile { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_room_member_profile: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 170 | 1 | my($self, $room_id, $user_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 171 | 1 | my $res = $self->request(get => "room/$room_id/member/$user_id"); | |||||||||||||||||||||||||||||||||||||||||
| 172 | 1 | LINE::Bot::API::Response::RoomMemberProfile->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | ▶ | sub leave_room { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
leave_room: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | my($self, $room_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | my $res = $self->request(post => "room/$room_id/leave", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | 0 | ▶ | sub leave_group { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
leave_group: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | my($self, $group_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | my $res = $self->request(post => "group/$group_id/leave", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||
| 187 | 1 | ▶ | sub get_friend_demographics { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_friend_demographics: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 188 | 1 | my($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 189 | 1 | my $res = $self->request(get => "insight/demographic"); | |||||||||||||||||||||||||||||||||||||||||
| 190 | 1 | LINE::Bot::API::Response::FriendDemographics->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | 1 | ▶ | sub get_target_limit_for_additional_messages { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_target_limit_for_additional_messages: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 194 | 1 | my($self, $date) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 195 | 1 | my $res = $self->request(get => "message/quota"); | |||||||||||||||||||||||||||||||||||||||||
| 196 | 1 | LINE::Bot::API::Response::TargetLimit->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||
| 199 | 1 | ▶ | sub get_number_of_messages_sent_this_month { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_number_of_messages_sent_this_month: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 200 | 1 | my($self, $date) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 201 | 1 | my $res = $self->request(get => "message/quota/consumption"); | |||||||||||||||||||||||||||||||||||||||||
| 202 | 1 | LINE::Bot::API::Response::TotalUsage->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||||||||||
| 205 | 1 | ▶ | sub get_number_of_sent_reply_messages { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_number_of_sent_reply_messages: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 206 | 1 | my($self, $date) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 207 | 1 | my $res = $self->request(get => "message/delivery/reply?date=${date}"); | |||||||||||||||||||||||||||||||||||||||||
| 208 | 1 | LINE::Bot::API::Response::NumberOfSentMessages->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 209 | } | ||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||
| 211 | 1 | ▶ | sub get_number_of_sent_push_messages { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_number_of_sent_push_messages: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 212 | 1 | my($self, $date) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 213 | 1 | my $res = $self->request(get => "message/delivery/push?date=${date}", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 214 | 1 | LINE::Bot::API::Response::NumberOfSentMessages->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 215 | } | ||||||||||||||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||||||||||||||
| 217 | 1 | ▶ | sub get_number_of_sent_multicast_messages { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_number_of_sent_multicast_messages: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 218 | 1 | my($self, $date) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 219 | 1 | my $res = $self->request(get => "message/delivery/multicast?date=${date}", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 220 | 1 | LINE::Bot::API::Response::NumberOfSentMessages->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 221 | } | ||||||||||||||||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||||||||||||||||
| 223 | 1 | ▶ | sub get_number_of_send_broadcast_messages { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_number_of_send_broadcast_messages: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 224 | 1 | my($self, $date) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 225 | 1 | my $res = $self->request(get => "message/delivery/broadcast?date=${date}", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 226 | 1 | LINE::Bot::API::Response::NumberOfSentMessages->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 227 | } | ||||||||||||||||||||||||||||||||||||||||||
| 228 | |||||||||||||||||||||||||||||||||||||||||||
| 229 | 1 | ▶ | sub get_number_of_message_deliveries { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_number_of_message_deliveries: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 230 | 1 | my($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 231 | 1 | ▶ | my $date = $opts->{date} or croak "get_number_of_message_deliveries: Missing a `date` parameter."; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||||||
| 233 | 1 | my $res = $self->request(get => "insight/message/delivery?date=${date}", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 234 | 1 | LINE::Bot::API::Response::NumberOfMessageDeliveries->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 235 | } | ||||||||||||||||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||||||||||||||||
| 237 | 1 | ▶ | sub get_member_in_room_count { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_member_in_room_count: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 238 | 1 | my ($self, $room_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||||
| 240 | 1 | my $res = $self->request(get => "room/${room_id}/members/count", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 241 | 1 | LINE::Bot::API::Response::Count->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||||||
| 244 | 1 | ▶ | sub get_member_in_group_count { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_member_in_group_count: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 245 | 1 | my ($self, $group_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||||||||||||||||
| 247 | 1 | my $res = $self->request(get => "group/${group_id}/members/count", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 248 | 1 | LINE::Bot::API::Response::Count->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 249 | } | ||||||||||||||||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||||||||||||||||
| 251 | 1 | ▶ | sub get_group_summary { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_group_summary: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 252 | 1 | my ($self, $group_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||||
| 254 | 1 | my $res = $self->request(get => "group/${group_id}/summary", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 255 | 1 | LINE::Bot::API::Response::GroupSummary->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 256 | } | ||||||||||||||||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||||||||||||||||
| 258 | 2 | ▶ | sub validate_signature { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_signature: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 259 | 2 | my($self, $json, $signature) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 260 | 2 | LINE::Bot::API::Event->validate_signature($json, $self->{channel_secret}, $signature); | |||||||||||||||||||||||||||||||||||||||||
| 261 | } | ||||||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||||||
| 263 | 1 | ▶ | sub parse_events_from_json { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse_events_from_json: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 264 | 1 | my($self, $json) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 265 | 1 | LINE::Bot::API::Event->parse_events_json($json); | |||||||||||||||||||||||||||||||||||||||||
| 266 | } | ||||||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||||||
| 268 | 1 | ▶ | sub issue_link_token { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
issue_link_token: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 269 | 1 | my($self, $user_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 270 | 1 | my $res = $self->request(post => "user/${user_id}/linkToken", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 271 | 1 | LINE::Bot::API::Response::IssueLinkToken->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 272 | } | ||||||||||||||||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||||||||||||||||
| 274 | 1 | ▶ | sub create_rich_menu { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create_rich_menu: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 275 | 1 | my ($self, $rich_menu) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 276 | 1 | my $res = $self->request(post => "richmenu", $rich_menu); | |||||||||||||||||||||||||||||||||||||||||
| 277 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 278 | } | ||||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||||
| 280 | 1 | ▶ | sub get_rich_menu { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_rich_menu: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 281 | 1 | my ($self, $rich_menu_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 282 | 1 | my $res = $self->request(get => "richmenu/${rich_menu_id}"); | |||||||||||||||||||||||||||||||||||||||||
| 283 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||
| 286 | 1 | ▶ | sub delete_rich_menu { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
delete_rich_menu: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 287 | 1 | my ($self, $rich_menu_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 288 | 1 | my $res = $self->request(delete => "richmenu/${rich_menu_id}"); | |||||||||||||||||||||||||||||||||||||||||
| 289 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 290 | } | ||||||||||||||||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||||||||||||||||
| 292 | 1 | ▶ | sub get_rich_menu_list { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_rich_menu_list: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 293 | 1 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 294 | 1 | my $res = $self->request(get => "richmenu/list"); | |||||||||||||||||||||||||||||||||||||||||
| 295 | 1 | LINE::Bot::API::Response::RichMenuList->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 296 | } | ||||||||||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||||||||||
| 298 | 1 | ▶ | sub set_default_rich_menu { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
set_default_rich_menu: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 299 | 1 | my ($self, $rich_menu_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 300 | 1 | my $res = $self->request(post => "user/all/richmenu/${rich_menu_id}", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 301 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 302 | } | ||||||||||||||||||||||||||||||||||||||||||
| 303 | |||||||||||||||||||||||||||||||||||||||||||
| 304 | 1 | ▶ | sub get_default_rich_menu_id { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_default_rich_menu_id: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 305 | 1 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 306 | 1 | my $res = $self->request(get => "user/all/richmenu"); | |||||||||||||||||||||||||||||||||||||||||
| 307 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 308 | } | ||||||||||||||||||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||||||||||||||||||
| 310 | 1 | ▶ | sub cancel_default_rich_menu { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cancel_default_rich_menu: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 311 | 1 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 312 | 1 | my $res = $self->request(delete => "user/all/richmenu"); | |||||||||||||||||||||||||||||||||||||||||
| 313 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 314 | } | ||||||||||||||||||||||||||||||||||||||||||
| 315 | |||||||||||||||||||||||||||||||||||||||||||
| 316 | 1 | ▶ | sub link_rich_menu_to_user { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
link_rich_menu_to_user: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 317 | 1 | my ($self, $user_id, $rich_menu_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 318 | 1 | my $res = $self->request(post => "user/${user_id}/richmenu/${rich_menu_id}", +{}); | |||||||||||||||||||||||||||||||||||||||||
| 319 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 320 | } | ||||||||||||||||||||||||||||||||||||||||||
| 321 | |||||||||||||||||||||||||||||||||||||||||||
| 322 | 1 | ▶ | sub link_rich_menu_to_multiple_users { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
link_rich_menu_to_multiple_users: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 323 | 1 | my ($self, $user_ids, $rich_menu_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 324 | 1 | my $res = $self->request(post => "richmenu/bulk/link", +{ | |||||||||||||||||||||||||||||||||||||||||
| 325 | richMenuId => $rich_menu_id, | ||||||||||||||||||||||||||||||||||||||||||
| 326 | userIds => $user_ids, | ||||||||||||||||||||||||||||||||||||||||||
| 327 | }); | ||||||||||||||||||||||||||||||||||||||||||
| 328 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 329 | } | ||||||||||||||||||||||||||||||||||||||||||
| 330 | |||||||||||||||||||||||||||||||||||||||||||
| 331 | 1 | ▶ | sub get_rich_menu_id_of_user { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_rich_menu_id_of_user: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 332 | 1 | my ($self, $user_id, $rich_menu_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 333 | 1 | my $res = $self->request(get => "user/${user_id}/richmenu"); | |||||||||||||||||||||||||||||||||||||||||
| 334 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 335 | } | ||||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||
| 337 | 1 | ▶ | sub unlink_rich_menu_from_user { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
unlink_rich_menu_from_user: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 338 | 1 | my ($self, $user_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 339 | 1 | my $res = $self->request(delete => "user/${user_id}/richmenu"); | |||||||||||||||||||||||||||||||||||||||||
| 340 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 341 | } | ||||||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||||||
| 343 | 1 | ▶ | sub unlink_rich_menu_from_multiple_users { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
unlink_rich_menu_from_multiple_users: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 344 | 1 | my ($self, $user_ids) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 345 | 1 | my $res = $self->request(post => "richmenu/bulk/unlink", +{ | |||||||||||||||||||||||||||||||||||||||||
| 346 | userIds => $user_ids, | ||||||||||||||||||||||||||||||||||||||||||
| 347 | }); | ||||||||||||||||||||||||||||||||||||||||||
| 348 | 1 | LINE::Bot::API::Response::RichMenu->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 349 | } | ||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||
| 351 | 1 | ▶ | sub upload_rich_menu_image { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
upload_rich_menu_image: called CC=3 SCAR=12.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 352 | 1 | my ($self, $rich_menu_id, $content_type, $file_path) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 353 | |||||||||||||||||||||||||||||||||||||||||||
| 354 | 1 | ▶ | if (!$content_type) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 355 | 0 | croak 'Need content_type'; | |||||||||||||||||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||
| 358 | my $res = $self->{client}->post_image( | ||||||||||||||||||||||||||||||||||||||||||
| 359 | 1 | $self->{content_api_endpoint} . "richmenu/$rich_menu_id/content", | |||||||||||||||||||||||||||||||||||||||||
| 360 | [ | ||||||||||||||||||||||||||||||||||||||||||
| 361 | 'Content-Type' => $content_type, | ||||||||||||||||||||||||||||||||||||||||||
| 362 | ], | ||||||||||||||||||||||||||||||||||||||||||
| 363 | $file_path | ||||||||||||||||||||||||||||||||||||||||||
| 364 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 365 | |||||||||||||||||||||||||||||||||||||||||||
| 366 | 1 | ▶ | if ($res->{http_status} eq '200') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 367 | 1 | return LINE::Bot::API::Response::Token->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 368 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | return LINE::Bot::API::Response::Error->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 370 | } | ||||||||||||||||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||||||||||||||||
| 372 | } | ||||||||||||||||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||||||||||||||||
| 374 | 1 | ▶ | sub download_rich_menu_image { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
download_rich_menu_image: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 375 | 1 | my ($self, $rich_menu_id) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||||||
| 377 | return $self->{client}->get_content( | ||||||||||||||||||||||||||||||||||||||||||
| 378 | 1 | $self->{content_api_endpoint} . "richmenu/$rich_menu_id/content" | |||||||||||||||||||||||||||||||||||||||||
| 379 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 380 | } | ||||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||
| 382 | 1 | ▶ | sub validate_rich_menu_object { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_rich_menu_object: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 383 | 1 | my ($self, $rich_menu) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 384 | 1 | my $res = $self->request(post => "richmenu/validate", $rich_menu); | |||||||||||||||||||||||||||||||||||||||||
| 385 | 1 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 386 | } | ||||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||
| 388 | 1 | ▶ | sub issue_channel_access_token { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
issue_channel_access_token: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 389 | 1 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||||||||||||
| 391 | my $res = $self->{client}->post_form( | ||||||||||||||||||||||||||||||||||||||||||
| 392 | $self->{social_api_endpoint} . 'accessToken', | ||||||||||||||||||||||||||||||||||||||||||
| 393 | [ | ||||||||||||||||||||||||||||||||||||||||||
| 394 | grant_type => 'client_credentials', | ||||||||||||||||||||||||||||||||||||||||||
| 395 | client_id => $opts->{client_id}, | ||||||||||||||||||||||||||||||||||||||||||
| 396 | client_secret => $opts->{client_secret}, | ||||||||||||||||||||||||||||||||||||||||||
| 397 | 1 | ] | |||||||||||||||||||||||||||||||||||||||||
| 398 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||
| 400 | 1 | ▶ | if ($res->{http_status} eq '200') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 401 | 1 | return LINE::Bot::API::Response::Token->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 402 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 403 | 0 | return LINE::Bot::API::Response::Error->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 404 | } | ||||||||||||||||||||||||||||||||||||||||||
| 405 | } | ||||||||||||||||||||||||||||||||||||||||||
| 406 | |||||||||||||||||||||||||||||||||||||||||||
| 407 | 1 | ▶ | sub issue_channel_access_token_v2_1 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
issue_channel_access_token_v2_1: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 408 | 1 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 409 | |||||||||||||||||||||||||||||||||||||||||||
| 410 | my $res = $self->{client}->post_form( | ||||||||||||||||||||||||||||||||||||||||||
| 411 | $self->{oauth_api_endpoint} . 'token', | ||||||||||||||||||||||||||||||||||||||||||
| 412 | undef, | ||||||||||||||||||||||||||||||||||||||||||
| 413 | [ | ||||||||||||||||||||||||||||||||||||||||||
| 414 | grant_type => 'client_credentials', | ||||||||||||||||||||||||||||||||||||||||||
| 415 | client_assertion_type => 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', | ||||||||||||||||||||||||||||||||||||||||||
| 416 | client_assertion => $opts->{jwt}, | ||||||||||||||||||||||||||||||||||||||||||
| 417 | 1 | ] | |||||||||||||||||||||||||||||||||||||||||
| 418 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||||||||||||||||
| 420 | 1 | ▶ | if ($res->{http_status} eq '200') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 421 | 1 | return LINE::Bot::API::Response::Token->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 422 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | return LINE::Bot::API::Response::Error->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 424 | } | ||||||||||||||||||||||||||||||||||||||||||
| 425 | } | ||||||||||||||||||||||||||||||||||||||||||
| 426 | |||||||||||||||||||||||||||||||||||||||||||
| 427 | 1 | ▶ | sub get_valid_channel_access_token_v2_1 { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_valid_channel_access_token_v2_1: called CC=2 SCAR=7.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 428 | 1 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 429 | |||||||||||||||||||||||||||||||||||||||||||
| 430 | 1 | my $jwt = uri_escape($opts->{jwt}); | |||||||||||||||||||||||||||||||||||||||||
| 431 | 1 | my $assertion_type = uri_escape('urn:ietf:params:oauth:client-assertion-type:jwt-bearer'); | |||||||||||||||||||||||||||||||||||||||||
| 432 | |||||||||||||||||||||||||||||||||||||||||||
| 433 | my $res = $self->{client}->get( | ||||||||||||||||||||||||||||||||||||||||||
| 434 | 1 | $self->{oauth_api_endpoint} . 'tokens/kid' . "?client_assertion_type=$assertion_type&client_assertion=$jwt", | |||||||||||||||||||||||||||||||||||||||||
| 435 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 436 | |||||||||||||||||||||||||||||||||||||||||||
| 437 | 1 | ▶ | if ($res->{http_status} eq '200') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 438 | 1 | return LINE::Bot::API::Response::Token->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 439 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 440 | 0 | return LINE::Bot::API::Response::Error->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 441 | } | ||||||||||||||||||||||||||||||||||||||||||
| 442 | } | ||||||||||||||||||||||||||||||||||||||||||
| 443 | |||||||||||||||||||||||||||||||||||||||||||
| 444 | 2 | ▶ | sub revoke_channel_access_token { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
revoke_channel_access_token: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 445 | 2 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 446 | |||||||||||||||||||||||||||||||||||||||||||
| 447 | my $res = $self->{client}->post_form( | ||||||||||||||||||||||||||||||||||||||||||
| 448 | $self->{social_api_endpoint} . 'revoke', | ||||||||||||||||||||||||||||||||||||||||||
| 449 | [ | ||||||||||||||||||||||||||||||||||||||||||
| 450 | access_token => $opts->{access_token}, | ||||||||||||||||||||||||||||||||||||||||||
| 451 | 2 | ] | |||||||||||||||||||||||||||||||||||||||||
| 452 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 453 | |||||||||||||||||||||||||||||||||||||||||||
| 454 | 2 | ▶ | if ($res->{http_status} eq '200') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 455 | 1 | return LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 456 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 457 | 1 | return LINE::Bot::API::Response::Error->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 458 | } | ||||||||||||||||||||||||||||||||||||||||||
| 459 | } | ||||||||||||||||||||||||||||||||||||||||||
| 460 | |||||||||||||||||||||||||||||||||||||||||||
| 461 | 1 | ▶ | sub get_number_of_followers { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_number_of_followers: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 462 | 1 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 463 | 1 | ▶ | my $date = $opts->{date} or croak "get_number_of_followers: Missing a `date` parameter."; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 464 | |||||||||||||||||||||||||||||||||||||||||||
| 465 | 1 | my $res = $self->request(get => "insight/followers?date=${date}"); | |||||||||||||||||||||||||||||||||||||||||
| 466 | 1 | LINE::Bot::API::Response::NumberOfFollowers->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 467 | } | ||||||||||||||||||||||||||||||||||||||||||
| 468 | |||||||||||||||||||||||||||||||||||||||||||
| 469 | 1 | ▶ | sub get_user_interaction_statistics { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_user_interaction_statistics: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 470 | 1 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 471 | 1 | ▶ | my $requestId = $opts->{requestId} or croak "get_user_interaction_statistics: Missing a `requestId` parameter."; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 472 | |||||||||||||||||||||||||||||||||||||||||||
| 473 | 1 | my $res = $self->request(get => "insight/message/event?requestId=${requestId}"); | |||||||||||||||||||||||||||||||||||||||||
| 474 | 1 | LINE::Bot::API::Response::UserInteractionStatistics->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 475 | } | ||||||||||||||||||||||||||||||||||||||||||
| 476 | |||||||||||||||||||||||||||||||||||||||||||
| 477 | 1 | ▶ | sub get_bot_info { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_bot_info: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 478 | 1 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 479 | 1 | my $res = $self->request(get => "info"); | |||||||||||||||||||||||||||||||||||||||||
| 480 | 1 | LINE::Bot::API::Response::BotInfo->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 481 | } | ||||||||||||||||||||||||||||||||||||||||||
| 482 | |||||||||||||||||||||||||||||||||||||||||||
| 483 | 1 | ▶ | sub set_webhook_url { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
set_webhook_url: called CC=3 SCAR=12.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 484 | 1 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 485 | 1 | ▶ | defined($opts->{endpoint}) or croak "set_webhook_url: Missing a mandatory parameter: `endpoint`"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||||||||||||||||
| 487 | my $res = $self->request( | ||||||||||||||||||||||||||||||||||||||||||
| 488 | 'put' => "channel/webhook/endpoint", | ||||||||||||||||||||||||||||||||||||||||||
| 489 | [], | ||||||||||||||||||||||||||||||||||||||||||
| 490 | +{ endpoint => $opts->{endpoint} }, | ||||||||||||||||||||||||||||||||||||||||||
| 491 | 1 | ); | |||||||||||||||||||||||||||||||||||||||||
| 492 | |||||||||||||||||||||||||||||||||||||||||||
| 493 | 1 | ▶ | if ($res->{http_status} eq '200') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 494 | 1 | return LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 495 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 496 | 0 | return LINE::Bot::API::Response::Error->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 497 | } | ||||||||||||||||||||||||||||||||||||||||||
| 498 | } | ||||||||||||||||||||||||||||||||||||||||||
| 499 | |||||||||||||||||||||||||||||||||||||||||||
| 500 | 1 | ▶ | sub get_webhook_endpoint_information { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_webhook_endpoint_information: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 501 | 1 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 502 | 1 | my $res = $self->request(get => "channel/webhook/endpoint"); | |||||||||||||||||||||||||||||||||||||||||
| 503 | 1 | LINE::Bot::API::Response::WebhookInformation->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 504 | } | ||||||||||||||||||||||||||||||||||||||||||
| 505 | |||||||||||||||||||||||||||||||||||||||||||
| 506 | 1 | ▶ | sub test_webhook_endpoint { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
test_webhook_endpoint: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 507 | 1 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 508 | |||||||||||||||||||||||||||||||||||||||||||
| 509 | 1 | my $req_body = {}; | |||||||||||||||||||||||||||||||||||||||||
| 510 | 1 | ▶ | if ($opts->{'endpoint'}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 511 | 1 | $req_body->{'endpoint'} = $opts->{'endpoint'}; | |||||||||||||||||||||||||||||||||||||||||
| 512 | } | ||||||||||||||||||||||||||||||||||||||||||
| 513 | |||||||||||||||||||||||||||||||||||||||||||
| 514 | 1 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 515 | 'post' => "channel/webhook/endpoint", | ||||||||||||||||||||||||||||||||||||||||||
| 516 | [], | ||||||||||||||||||||||||||||||||||||||||||
| 517 | $req_body, | ||||||||||||||||||||||||||||||||||||||||||
| 518 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 519 | |||||||||||||||||||||||||||||||||||||||||||
| 520 | 1 | LINE::Bot::API::Response::WebhookTest->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 521 | } | ||||||||||||||||||||||||||||||||||||||||||
| 522 | |||||||||||||||||||||||||||||||||||||||||||
| 523 | 1 | ▶ | sub validate_reply_message_objects { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_reply_message_objects: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 524 | 1 | my($self, $messages) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 525 | |||||||||||||||||||||||||||||||||||||||||||
| 526 | 1 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 527 | post => 'message/validate/reply', | ||||||||||||||||||||||||||||||||||||||||||
| 528 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 529 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 530 | } | ||||||||||||||||||||||||||||||||||||||||||
| 531 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 532 | |||||||||||||||||||||||||||||||||||||||||||
| 533 | 1 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 534 | } | ||||||||||||||||||||||||||||||||||||||||||
| 535 | |||||||||||||||||||||||||||||||||||||||||||
| 536 | 1 | ▶ | sub validate_push_message_objects { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_push_message_objects: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 537 | 1 | my($self, $messages) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 538 | |||||||||||||||||||||||||||||||||||||||||||
| 539 | 1 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 540 | post => 'message/validate/push', | ||||||||||||||||||||||||||||||||||||||||||
| 541 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 542 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 543 | } | ||||||||||||||||||||||||||||||||||||||||||
| 544 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 545 | |||||||||||||||||||||||||||||||||||||||||||
| 546 | 1 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 547 | } | ||||||||||||||||||||||||||||||||||||||||||
| 548 | |||||||||||||||||||||||||||||||||||||||||||
| 549 | 1 | ▶ | sub validate_multicast_message_objects { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_multicast_message_objects: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 550 | 1 | my($self, $messages) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 551 | |||||||||||||||||||||||||||||||||||||||||||
| 552 | 1 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 553 | post => 'message/validate/multicast', | ||||||||||||||||||||||||||||||||||||||||||
| 554 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 555 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 556 | } | ||||||||||||||||||||||||||||||||||||||||||
| 557 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 558 | |||||||||||||||||||||||||||||||||||||||||||
| 559 | 1 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 560 | } | ||||||||||||||||||||||||||||||||||||||||||
| 561 | |||||||||||||||||||||||||||||||||||||||||||
| 562 | 1 | ▶ | sub validate_narrowcast_message_objects { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_narrowcast_message_objects: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 563 | 1 | my($self, $messages) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 564 | |||||||||||||||||||||||||||||||||||||||||||
| 565 | 1 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 566 | post => 'message/validate/narrowcast', | ||||||||||||||||||||||||||||||||||||||||||
| 567 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 568 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 569 | } | ||||||||||||||||||||||||||||||||||||||||||
| 570 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 571 | |||||||||||||||||||||||||||||||||||||||||||
| 572 | 1 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 573 | } | ||||||||||||||||||||||||||||||||||||||||||
| 574 | |||||||||||||||||||||||||||||||||||||||||||
| 575 | 1 | ▶ | sub validate_broadcast_message_objects { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
validate_broadcast_message_objects: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 576 | 1 | my($self, $messages) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 577 | |||||||||||||||||||||||||||||||||||||||||||
| 578 | 1 | my $res = $self->request( | |||||||||||||||||||||||||||||||||||||||||
| 579 | post => 'message/validate/broadcast', | ||||||||||||||||||||||||||||||||||||||||||
| 580 | +{ | ||||||||||||||||||||||||||||||||||||||||||
| 581 | messages => $messages, | ||||||||||||||||||||||||||||||||||||||||||
| 582 | } | ||||||||||||||||||||||||||||||||||||||||||
| 583 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 584 | |||||||||||||||||||||||||||||||||||||||||||
| 585 | 1 | LINE::Bot::API::Response::Common->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 586 | } | ||||||||||||||||||||||||||||||||||||||||||
| 587 | |||||||||||||||||||||||||||||||||||||||||||
| 588 | 4 | ▶ | sub get_followers { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_followers: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 589 | 4 | my ($self, $opts) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 590 | 4 | my $uri = URI->new('followers/ids'); | |||||||||||||||||||||||||||||||||||||||||
| 591 | |||||||||||||||||||||||||||||||||||||||||||
| 592 | 4 | ▶ | exists $opts->{'limit'} and $uri->query_param(limit => $opts->{'limit'}); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 593 | 4 | ▶ | exists $opts->{'start'} and $uri->query_param(start => $opts->{'start'}); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 594 | |||||||||||||||||||||||||||||||||||||||||||
| 595 | 4 | my $res = $self->request(get => $uri->as_string); | |||||||||||||||||||||||||||||||||||||||||
| 596 | |||||||||||||||||||||||||||||||||||||||||||
| 597 | 4 | LINE::Bot::API::Response::Followers->new(%{ $res }); | |||||||||||||||||||||||||||||||||||||||||
| 598 | } | ||||||||||||||||||||||||||||||||||||||||||
| 599 | |||||||||||||||||||||||||||||||||||||||||||
| 600 | 52 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 601 | |||||||||||||||||||||||||||||||||||||||||||
| 602 | __END__ | ||||||||||||||||||||||||||||||||||||||||||