
Net::Flickr::Simile::Exhbit - OOP for generating Simile Exhibit files using the Flickr API

use Getopt::Std;
use Config::Simple;
use Net::Flickr::Simile::Exhibit;
my %opts = ();
getopts('c:j:h:t:', \%opts);
my $cfg = Config::Simple->new($opts{'c'});
my %args = ('exhibit_json' => $opts{'j'},
'exhibit_html' => $opts{'h'},
'tags' => $opts{'t'});
my $fl = Net::Flickr::Simile::Exhibit->new($cfg);
$fl->search(\%args);
# So then you might do :
# perl ./myscript -c /my/flickr.cfg -h ./mystuff.html -j ./mystuff.js -t kittens

OOP for generating Simile Exhibit files using the Flickr API.

Options are passed to Net::Flickr::Backup using a Config::Simple object or a valid Config::Simple config file. Options are grouped by "block".
String. required
A valid Flickr API key.
String. required
A valid Flickr Auth API secret key.
String. required
A valid Flickr Auth API token.
String. required
The api_handler defines which XML/XPath handler to use to process API responses.
Use XML::LibXML.
Use XML::XPath.
Boolean.
Default is false.
String.
The default handler is Screen, as in Log::Dispatch::Screen
For example, the following :
reporting_handler_args=name:foobar;min_level=info
Would be converted as :
(name => "foobar", min_level => "info");
The default name argument is "__report". The default min_level argument is "info".

Where $cfg is either a valid Config::Simple object or the path to a file that can be parsed by Config::Simple.
Returns a Net::Flickr::Simile::Exhbit object.

Net::Flickr::Simile::Exhibit subclasses Net::Flickr::Simile and Net::Flickr::API so all of those methods are available to your object. The following methods are also defined.
Valid arguments are anything you would (need to) pass to the flickr.photos.search API method and :
String. required
The path where Exhbit JSON data should be written to disk.
String. required
The path where Exhbit HTML data should be written to disk. It will contain a relative pointer to exhibit_json.
The user_id bound to the Flickr Auth token defined in the object's config file will automatically be added to the method arguments and used to scope the query.
Returns true or false.
Valid arguments are anything you would (need to) pass to the flickr.photos.search API method and :
String. required
The path where Exhbit JSON data should be written to disk.
String. required
The path where Exhbit HTML data should be written to disk. It will contain a relative pointer to exhibit_json.
Returns true or false.
Valid arguments are anything you would (need to) pass to the flickr.photos.getContactsPhotos API method and :
String. required
The path where Exhbit JSON data should be written to disk.
String. required
The path where Exhbit HTML data should be written to disk. It will contain a relative pointer to exhibit_json.
Returns true or false.
Valid arguments are anything you would (need to) pass to the flickr.photos.getContactsPublicPhotos API method and :
String. required
The path where Exhbit JSON data should be written to disk.
String. required
The path where Exhbit HTML data should be written to disk. It will contain a relative pointer to exhibit_json.
Returns true or false.

Where $rsp is the return value of a call to Net::Flickr::API-api_call>.
Returns a JSON string representing the data in $rsp suitable for including with a Simile Exhibit document.
Returns true or false.
Returns true or false
Returns true or false

0.1

Aaron Straup Cope <ascope@cpan.org>

Basically anything that returns a "standard photo response" (or /rsp/photos/photo) from the Flickr API can be used with this package to generate Exhibit data.
As this time, however, only a handful of (API) methods have (Perl) helper methods. There will be others.
This package does not know how to account for pagination in the Flickr API. That may change over time.
This package contains a bare-bones template for generating an HTML file to view your Exhibit data.
You may need to tweak the output after the fact or you can subclass the readExhibitHtml method.

http://aaronland.info/perl/net/flickr/simile/exhibit.html
http://aaronland.info/perl/net/flickr/simile/exhibit.js

http://simile.mit.edu/exhibit/

Please report all bugs via http://rt.cpan.org/

Copyright (c) 2007 Aaron Straup Cope. All Rights Reserved.
This is free software. You may redistribute it and/or modify it under the same terms as Perl itself.