Flickr::API::Response(3pm) | User Contributed Perl Documentation | Flickr::API::Response(3pm) |
Flickr::API::Response - A response from the flickr API.
use Flickr::API; use Flickr::API::Response; my $api = Flickr::API->new({'key' => 'your_api_key'}); my $response = $api->execute_method('flickr.test.echo', { 'foo' => 'bar', 'baz' => 'quux', }); print "Success: $response->{success}\n";
This object encapsulates a response from the Flickr API. It's a subclass of HTTP::Response with the following additional keys:
{ 'success' => 1, 'tree' => XML::Parser::Lite::Tree, 'hash' => Flickr response as a hash, 'error_code' => 0, 'error_message' => '', }
The "_request" key contains the request object that this response was generated from. This request will be a Flickr::API::Request object, which is a subclass of <HTTP:Request>.
The "sucess" key contains 1 or 0, indicating whether the request succeeded. If it failed, "error_code" and "error_message" explain what went wrong. If it succeeded, "tree" contains an XML::Parser::Lite::Tree object of the response XML.
Copyright (C) 2004, Cal Henderson, <cal@iamcal.com>
Copyright (C) 2015-2016, Louis B. Moore, <lbmoore@cpan.org> OAuth and accessor methods.
Flickr::API, XML::Parser::Lite
2022-12-10 | perl v5.36.0 |