1Flickr::API::Response(3U)ser Contributed Perl DocumentatiFolnickr::API::Response(3)
2
3
4

NAME

6       Flickr::API::Response - A response from the flickr API.
7

SYNOPSIS

9         use Flickr::API;
10         use Flickr::API::Response;
11
12         my $api = Flickr::API->new({'key' => 'your_api_key'});
13
14         my $response = $api->execute_method('flickr.test.echo', {
15                       'foo' => 'bar',
16                       'baz' => 'quux',
17               });
18
19         print "Success: $response->{success}\n";
20

DESCRIPTION

22       This object encapsulates a response from the Flickr API. It's a
23       subclass of HTTP::Response with the following additional keys:
24
25         {
26           'success' => 1,
27           'tree' => XML::Parser::Lite::Tree,
28           'hash' => Flickr response as a hash,
29           'error_code' => 0,
30           'error_message' => '',
31         }
32
33       The "_request" key contains the request object that this response was
34       generated from. This request will be a Flickr::API::Request object,
35       which is a subclass of <HTTP:Request>.
36
37       The "sucess" key contains 1 or 0, indicating whether the request
38       succeeded. If it failed, "error_code" and "error_message" explain what
39       went wrong. If it succeeded, "tree" contains an XML::Parser::Lite::Tree
40       object of the response XML.
41

METHODS

43       "as_tree()"
44           Returns the args passed to flickr with the method that produced
45           this response
46
47       "as_hash()"
48           Returns the args passed to flickr with the method that produced
49           this response
50
51       "error_code()"
52           Returns the Flickr Error Code, if any
53
54       "error_message()"
55           Returns the Flickr Error Message, if any
56
57       "success()"
58           Returns the success or lack thereof from Flickr
59
60       "rc()"
61           Returns the Flickr http status code
62
63       "_propagate_status(\%hash)"
64           Returns the entire response status block as a hashref.
65

AUTHOR

67       Copyright (C) 2004, Cal Henderson, <cal@iamcal.com>
68
69       Copyright (C) 2015-2016, Louis B. Moore, <lbmoore@cpan.org> OAuth and
70       accessor methods.
71

SEE ALSO

73       Flickr::API, XML::Parser::Lite
74
75
76
77perl v5.30.0                      2019-07-26          Flickr::API::Response(3)
Impressum