WebService::Pushover - interface to Pushover API
This document describes WebService::Pushover version 0.1.0.
use WebService::Pushover; my $push = WebService::Pushover->new or die( "Unable to instantiate WebService::Pushover.\n" ); my %params = ( token => 'PUSHOVER API TOKEN', user => 'PUSHOVER USER TOKEN', message => 'test test test', ); my $status = $push->push( %params );
This module provides a Perl wrapper around the Pushover ( http://pushover.net ) RESTful API. You'll need to register with Pushover to obtain an API token for yourself and for your application before you'll be able to do anything with this module.
Accepts a single parameter, debug. Set this to a true value in order to enable tracing of Net::HTTP::Spore operations.
debug
message() sends a message to Pushover and returns a scalar reference representation of the message status. The following are valid parameters:
The Pushover application token, obtained by registering at http://pushover.net/apps.
The Pushover user token, obtained by registering at http://pushover.net.
The Pushover device name; if not supplied, the user will be validated if at least one device is registered to that user.
A string that will appear as the title of the message; if not supplied, the name of the application registered to the application token will appear.
A string that will appear as the body of the message.
The desired message timestamp, in Unix epoch seconds.
Set this value to "2" to mark the message as emergency priority, "1" to mark the message as high priority, set it to "-1" to mark the message as low priority, or set it to "0" or leave it unset for standard priority.
You must pass this parameter when sending messages at emergency priority. Set this value to the number of seconds before Pushover tries again to obtain confirmation of message receipt.
You must pass this parameter when sending messages at emergency priority. Set this value to the number of seconds before Pushover stops trying to obtain confirmation of message receipt.
A string that will be attached to the message as a supplementary URL.
A string that will be displayed as the title of any supplementary URL.
Select a sound to be associated with this notification. Check the Pushover API documentation for valid values.
user() sends an application token and a user token to Pushover and returns a scalar reference representation of the validity of those tokens. The following are valid parameters:
The Pushover device name; if not supplied, the message will go to all devices registered to the user token.
receipt() sends an application token and a receipt token to Pushover and returns a scalar reference representation of the confirmation status of the notification associated with the receipt. The following are valid parameters:
The Pushover receipt token, obtained by parsing the output returned after sending a message with emergency priority.
Inspect the value returned by any method, which will be a Perl data structure parsed from the JSON or XML response returned by the Pushover API.
No bugs have been reported.
Please report any bugs or feature requests to bug-webservice-pushover@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-webservice-pushover@rt.cpan.org
Steve Huff <shuff@cpan.org>
<shuff@cpan.org>
Copyright (c) 2012, Steve Huff <shuff@cpan.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install WebService::Pushover, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Pushover
CPAN shell
perl -MCPAN -e shell install WebService::Pushover
For more information on module installation, please visit the detailed CPAN module installation guide.