NAME
WWW::Pusher - Interface to the Pusher WebSockets API
VERSION
Version 0.03
SYNOPSIS
use WWW::Pusher;
my $pusher = WWW::Pusher->new(key => 'YOUR API KEY', secret => 'YOUR SECRET', app_id => 'YOUR APP ID', channel => 'test_channel');
my $response = $pusher->trigger(event => 'my_event', data => 'Hello, World!');
METHODS
new(auth_key => $auth_key, secret => $secret, app_id => $app_id, channel => $channel_id)
Creates a new WWW::Pusher object. All fields are all mandatory.
You can optionally specify the host and port keys and override using pusherapp.com's server if you wish. In addtion, setting debug to a true value will return an LWP::UserAgent response object in the event a trigger fails.
trigger(event => $event_name, data => $data, [socket_id => $socket_id, debug => 1])
Send an event to the channel. The event name should be a scalar, but data can be hash/arrayref.
Returns true on success, or undef on failure. Setting "debug" to a true value will return an LWP::UserAgent response object.
socket_auth($socket_id)
In order to establish private channels, your end must hand back a checksummed bit of data that browsers will, in turn will pass onto the pusher servers. On success this will return a JSON encoded hashref for you to give back to the client.
AUTHOR
Squeeks, <squeek at cpan.org>
BUGS
Please report any bugs or feature requests to bug-www::pusher at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW::Pusher. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WWW::Pusher
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
SEE ALSO
Pusher - http://pusherapp.com
LICENSE AND COPYRIGHT
Copyright 2010 Squeeks.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.