Flickr...esponse(3pm)
β¨ NAME β¨
Flickr::API::Response β bestie, it's literally a response from the flickr API. That's the whole job description π
(Oh and btw, you're reading this in the User Contributed Perl Documentation, page Flickr...esponse(3pm). Yes the title got cutely truncated, no we don't know why, moving on π)
πΈ SYNOPSIS πΈ
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";
See how we justβ¦ print $response->{success}? Iconic. That's the energy. π₯
π DESCRIPTION π
Okay so this object encapsulates a response from the Flickr API. It's a subclass of HTTP::Response, and on top of everything HTTP::Response already gives you, it brings these extra keys to the group chat:
{
'success' => 1,
'tree' => XML::Parser::Lite::Tree,
'hash' => Flickr response as a hash,
'error_code' => 0,
'error_message' => '',
}
So the _request key holds the request object this response was generated from. And that request is gonna be a Flickr::API::Request object, which is itself a subclass of <HTTP:Request>.
Then the sucess key β and yes, it is spelled exactly like that, one c, we're keeping it, it's canon π β contains 1 or 0, telling you whether the request succeeded. If it failed, then error_code and error_message are the ones explaining what went wrong. If it succeeded, tree is holding an XML::Parser::Lite::Tree object of the response XML. Main character behaviour honestly. π
π₯ METHODS π₯
as_tree()β Returns the args passed to flickr with the method that produced this responseas_hash()β Returns the args passed to flickr with the method that produced this responseerror_code()β Returns the Flickr Error Code, if anyerror_message()β Returns the Flickr Error Message, if anysuccess()β Returns the success or lack thereof from Flickrrc()β Returns the Flickr http status code_propagate_status(\%hash)β Returns the entire response status block as a hashref
Not me noticing thatas_tree()andas_hash()are documented word for word the same π the docs said twin behaviour and meant it. Either way, that's what they say, so that's what you get.
π AUTHOR π
Copyright (C) 2004, Cal Henderson, <cal@iamcal.com>
Copyright (C) 2015-2016, Louis B. Moore, <lbmoore@cpan.org> OAuth and accessor methods.
π SEE ALSO π
Flickr::APIXML::Parser::Lite
And that's the page, bestie π¦ β straight out of perl v5.40.1, dated 2025-05-04, still going by Flickr...esponse(3pm) like the little truncated legend it is. Go forth and check your success key, fr fr. πβ¨
π¦ where this page comes from
- debian trixie: libflickr-api-perl 1.29-2 Β· Artistic-2.0
- ubuntu resolute: libflickr-api-perl 1.29-2 Β· Artistic-2.0
- ubuntu stonking: libflickr-api-perl 1.29-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms