WWW::Google::Cloud::Messaging

Google Cloud Messaging (GCM) Client Library
Download

WWW::Google::Cloud::Messaging Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Yuji Shimada
  • Publisher web site:
  • http://search.cpan.org/~xaicron/

WWW::Google::Cloud::Messaging Tags


WWW::Google::Cloud::Messaging Description

WWW::Google::Cloud::Messaging is a Google Cloud Messaging (GCM) client library.Currently support JSON API only.SYNOPSIS use WWW::Google::Cloud::Messaging; my $api_key = 'Your API Key'; my $gcm = WWW::Google::Cloud::Messaging->new(api_key => $api_key); my $res = $gcm->send({ registration_ids => , collapse_key => $collapse_key, data => { message => 'blah blah blah', }, }); die $res->error unless $res->is_success; my $results = $res->results; while (my $result = $results->next) { my $reg_id = $result->target_reg_id; if ($result->is_success) { say sprintf 'message_id: %s, reg_id: %s', $result->message_id, $reg_id; } else { warn sprintf 'error: %s, reg_id: %s', $result->error, $reg_id; } if ($result->has_canonical_id) { say sprintf 'reg_id %s is old! refreshed reg_id is %s', $reg_id, $result->registration_id;' } }Product's homepage


WWW::Google::Cloud::Messaging Related Software