NAME
APNS::Agent - agent server for APNS
SYNOPSIS
use APNS::Agent;
my $agent = APNS::Agent->new(
certificate => '/path/to/certificate',
private_key => '/path/to/private_key',
);
$agent->run;
DESCRIPTION
APNS::Agent is agent server for APNS. It is also backend class of apns-agent.
This module provides consistent connection to APNS and cares reconnection. It utilizes AnyEvent::APNS internally.
THE SOFTWARE IS ALPHA QUALITY. API MAY CHANGE WITHOUT NOTICE.
API PARAMETERS
APNS::Agent launches HTTP Server process which accepts only POST method and
application/x-www-form-urlencoded format parameters.
Acceptable parameters as follows:
-
tokendevice token by HEX format. (Required)
-
payloadJSON string for push notification. If you only want to send message, alternatively can use
alertparameter.One of
payloadandalertmust be supplied. Both ofpayloadandalertare specified, thepayloadparameter has priority. -
alertpush notification message.
SEE ALSO
THANKS
Thank @shin1rosei that many code of this module is taken from https://github.com/shin1rosei/AnyEvent-APNS-Server.
LICENSE
Copyright (C) Songmu.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Songmu y.songmu@gmail.com