.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Flickr::API::Response 3pm" .TH Flickr::API::Response 3pm "2018-08-14" "perl v5.26.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 \s-1API.\s0 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 \s-1XML.\s0 .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