NAME
WWW::Google::C2DM::Response - Response Object
SYNOPSIS
my $res = WWW::Google::C2DM::Response->new(
is_success => 1,
code => 200,
message => 'OK',
http_response => $http_response_object,
params => { ... },
);
DESCRIPTION
WWW::Google::C2DM::Response is a WWW::Google::C2DM internal class.
METHODS
- new(%args)
- is_success()
-
$res->is_success ? 1 : 0;
- is_error()
-
$res->is_error ? 1 : 0;
- has_error()
-
$res->has_error ? 1 : 0;
- code()
-
HTTP Response code.
say $res->code;
- message()
-
HTTP Response message.
say $res->message;
- status_line()
-
code
andmessage
say $res->status_line; # eq say $res->code, ' ', $res->message;
- http_response()
-
Original HTTP Response object.
my $http_response = $res->http_response; say $http_response->as_string;
- error_code()
-
C2DM error code. SEE ALSO http://code.google.com/intl/ja/android/c2dm/#push
if ($res->error_code eq 'QuotaExceeded') { ... }
- id()
-
Response id parameter.
say $res->id;
- params()
-
Response parameters in HASHREF.
say $res->params->{id};
AUTHOR
xaicron <xaicron@cpan.org>
COPYRIGHT
Copyright 2011 - xaicron
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.