NAME
WWW::Google::Cloud::Messaging::Response - An accessor of GCM response data
SYNOPSIS
my $res = $gcm->send({ ... });
die $res->error unless $res->is_success;
say $res->multicast_id;
say $res->success;
say $res->failure;
say $res->canonical_ids;
# get WWW::Google::Cloud::Messaging::Response::ResultSet
my $results = $res->results;
DESCRIPTION
WWW::Google::Cloud::Messaging::Response is an accessor of GCM response data.
METHODS
new($http_response)
Create a WWW::Google::Cloud::Messaging::Response. This method used in WWW::Google::Cloud::Messaging internally if send
method is used.
is_success()
Returns a success / failure of the request.
error()
Returns error message if failure of the request.
multicast_id()
A unique ID identifying this multicast message.
success()
Number of messages that were processed without an error.
failure()
Number of messages that could not be processed.
canonical_ids()
Number of results that contain a canonical registration ID.
SEE ALSO http://developer.android.com/guide/google/gcm/adv.html#canonical.
results()
Returns WWW::Google::Cloud::Messaging::Response::ResultSet instance if success of the request.
my $results = $res->results;
while (my $result = $results->next) {
...
}
AUTHOR
xaicron <xaicron@cpan.org>
COPYRIGHT
Copyright 2012 - xaicron
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.