README
1NAME
2 Net::Flickr::API - base API class for Net::Flickr::* libraries
3
4SYNOPSIS
5 package Net::Flickr::RDF;
6 use base qw (Net::Flickr::API);
7
8DESCRIPTION
9 Base API class for Net::Flickr::* libraries
10
11 Net::Flickr::API is a wrapper for Flickr::API that provides support for
12 throttling API calls (per second), retries if the API is disabled and
13 marshalling of API responses into XML::LibXML or XML::XPath objects.
14
15OPTIONS
16 Options are passed to Net::Flickr::Backup using a Config::Simple object
17 or a valid Config::Simple config file. Options are grouped by "block".
18
19 flick
20
21 * api_key
22 String. *required*
23
24 A valid Flickr API key.
25
26 * api_secret
27 String. *required*
28
29 A valid Flickr Auth API secret key.
30
31 * auth_token
32 String. *required*
33
34 A valid Flickr Auth API token.
35
36 * api_handler
37 String. *required*
38
39 The api_handler defines which XML/XPath handler to use to process
40 API responses.
41
42 * LibXML
43 Use XML::LibXML.
44
45 * XPath
46 Use XML::XPath.
47
48 reporting
49
50 * enabled
51 Boolean.
52
53 Default is false.
54
55 * handler
56 String.
57
58 The default handler is Screen, as in `Log::Dispatch::Screen'
59
60 * handler_args
61 For example, the following :
62
63 reporting_handler_args=name:foobar;min_level=info
64
65 Would be converted as :
66
67 (name => "foobar",
68 min_level => "info");
69
70 The default name argument is "__report". The default min_level
71 argument is "info".
72
73PACKAGE METHODS
74 __PACKAGE__->new($cfg)
75
76 Where $cfg is either a valid *Config::Simple* object or the path to a
77 file that can be parsed by *Config::Simple*.
78
79 Returns a *Net::Flickr::API* object.
80
81OBJECT METHODS
82 $obj->api_call(\%args)
83
84 Valid args are :
85
86 * method
87 A string containing the name of the Flickr API method you are
88 calling.
89
90 * args
91 A hash ref containing the key value pairs you are passing to
92 *method*
93
94 If the method encounters any errors calling the API, receives an API
95 error or can not parse the response it will log an error event, via the
96 log method, and return undef.
97
98 Otherwise it will return a *XML::LibXML::Document* object (if
99 XML::LibXML is installed) or a *XML::XPath* object.
100
101 $obj->get_auth()
102
103 Return an XML *node* element containing the Flickr auth token
104 information for the current object.
105
106 Returns undef if no token information is present.
107
108 $obj->get_auth_nsid()
109
110 Return the Flickr NSID of the user associated with the Flickr auth token
111 information for the current object.
112
113 Returns undef if no token information is present.
114
115 $obj->upload(\%args)
116
117 This is a helper method that simply wraps calls to the *Flickr::Upload*
118 upload method. All the arguments are the same. For complete
119 documentation please consult:
120
121 http://search.cpan.org/dist/Flickr-Upload/Upload.pm#upload
122
123 (Note: There's no need to pass an auth_token argument as the wrapper
124 will take care of for you.)
125
126 Returns a photo ID (or a ticket ID if the call is asynchronous) on
127 success or false if there was a problem.
128
129 $obj->log()
130
131 Returns a *Log::Dispatch* object.
132
133VERSION
134 1.7
135
136DATE
137 $Date: 2009/08/02 17:16:12 $
138
139AUTHOR
140 Aaron Straup Cope <ascope@cpan.org>
141
142SEE ALSO
143 Config::Simple
144
145 Flickr::API
146
147 XML::XPath
148
149 XML::LibXML
150
151BUGS
152 Please report all bugs via http://rt.cpan.org/
153
154LICENSE
155 Copyright (c) 2005-2008 Aaron Straup Cope. All Rights Reserved.
156
157 This is free software. You may redistribute it and/or modify it under
158 the same terms as Perl itself.
159
160