.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Flickr::API::Response 3pm" .TH Flickr::API::Response 3pm 2024-03-02 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Flickr::API::Response \- A response from the flickr API. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use Flickr::API; \& use Flickr::API::Response; \& \& my $api = Flickr::API\->new({\*(Aqkey\*(Aq => \*(Aqyour_api_key\*(Aq}); \& \& my $response = $api\->execute_method(\*(Aqflickr.test.echo\*(Aq, { \& \*(Aqfoo\*(Aq => \*(Aqbar\*(Aq, \& \*(Aqbaz\*(Aq => \*(Aqquux\*(Aq, \& }); \& \& print "Success: $response\->{success}\en"; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This object encapsulates a response from the Flickr API. It's a subclass of HTTP::Response with the following additional keys: .PP .Vb 7 \& { \& \*(Aqsuccess\*(Aq => 1, \& \*(Aqtree\*(Aq => XML::Parser::Lite::Tree, \& \*(Aqhash\*(Aq => Flickr response as a hash, \& \*(Aqerror_code\*(Aq => 0, \& \*(Aqerror_message\*(Aq => \*(Aq\*(Aq, \& } .Ve .PP The \f(CW\*(C`_request\*(C'\fR 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 . .PP The \f(CW\*(C`sucess\*(C'\fR key contains 1 or 0, indicating whether the request succeeded. If it failed, \f(CW\*(C`error_code\*(C'\fR and \&\f(CW\*(C`error_message\*(C'\fR explain what went wrong. If it succeeded, \f(CW\*(C`tree\*(C'\fR contains an XML::Parser::Lite::Tree object of the response XML. .SH METHODS .IX Header "METHODS" .ie n .IP as_tree() 4 .el .IP \f(CWas_tree()\fR 4 .IX Item "as_tree()" Returns the args passed to flickr with the method that produced this response .ie n .IP as_hash() 4 .el .IP \f(CWas_hash()\fR 4 .IX Item "as_hash()" Returns the args passed to flickr with the method that produced this response .ie n .IP error_code() 4 .el .IP \f(CWerror_code()\fR 4 .IX Item "error_code()" Returns the Flickr Error Code, if any .ie n .IP error_message() 4 .el .IP \f(CWerror_message()\fR 4 .IX Item "error_message()" Returns the Flickr Error Message, if any .ie n .IP success() 4 .el .IP \f(CWsuccess()\fR 4 .IX Item "success()" Returns the success or lack thereof from Flickr .ie n .IP rc() 4 .el .IP \f(CWrc()\fR 4 .IX Item "rc()" Returns the Flickr http status code .ie n .IP _propagate_status(\e%hash) 4 .el .IP \f(CW_propagate_status(\e%hash)\fR 4 .IX Item "_propagate_status(%hash)" Returns the entire response status block as a hashref. .SH AUTHOR .IX Header "AUTHOR" Copyright (C) 2004, Cal Henderson, .PP Copyright (C) 2015\-2016, Louis B. Moore, OAuth and accessor methods. .SH "SEE ALSO" .IX Header "SEE ALSO" Flickr::API, XML::Parser::Lite