The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Flickr::API::Utils - Provides helpfull functions for dealing with the Flickr API.

VERSION

Version 0.01

SYNOPSIS

This module provides functions that may be used to "clean up" the response from a Flickr::API call, test results and so on.

Usage example:

    use Flickr::Utils;

    my $toolbox = Flickr::Utils->new();

    my $prettystruct = $toolbox->clean($response_from_flickr_api_call);

FUNCTIONS

new

clean

Takes a structure generated by a Flickr::API call and cleans it up for your Perl code to enjoy.

The response from that class is a hash created by a XML parser which is rather difficult to parse.

This module gets that response and creates a rather more "perlish" structure with the same information.

This cleaning up is done on a fully automated manner so it may still not be what you want. Some rather more usefull modules are Flickr::API::Photos, Flickr::API::People, etc which use this as a first pass at getting a decent response.

test_return

Checks to see if the response of the Flickr API was successfull or not.

If it was successfull fill in the return->success field in the object that was passed on to us, otherwise fill in this field and the other two relevant ones: result->error_code and result->error_message.

auto_parse

Parses a piece of the XML structure (an ARRAY) that the Flickr::API returns according to some rules laid out by the user.

get_attributes

Gets the attributes for a given node of the XML tree.

get_simple_content

Gets the content for a given node of the XML tree. It is assumed that this node has a single element with content.

AUTHOR

Nuno Nunes, <nfmnunes@cpan.org>

BUGS

Please report any bugs or feature requests to bug-flickr-user@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Flickr-Utils. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2005 Nuno Nunes, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.