Simon Wistow


Net::FS::Flickr - store and retrieve files on Flickr


    my $fs = Net::FS::Flickr->new( key => $key, secret => $secret );

    $fs->set_auth($auth_key); # see API KEYS AND AUTH KEY section
    $fs->store("piccy.jpg", "renamed_piccy.jpg");

    open (FILE, ">output.jpg") || die "Couldn't write to file: $!\n";
    binmode (FILE);
    print FILE $fs->retrieve("renamed_piccy.jpg");
    close (FILE);


You will need to sign up for an API key and then get the corresponding secret key. You can do that from here

Finally you will need to get an auth key. As described here

the helper script flickrfs supplied with this distribution can help with that.



Takes a valid API key and a valid secret key

files [nsid, email or username]

Get a list of all the files on the system

Given an nsid, username or email, use that. Otherwise use the nsid from the auth token.

versions <filename> [nsid, email or username]

Returns a list of all the versions of a file

Each item on the list is a hashref containing the date the file was saved and the id of that version using the keys timestamp and id respectively.

The list is sorted, latest version first.

Because of the way Flickr stores sets, timestamp will always be 0;

Given an nsid, username or email, use that. Otherwise use the nsid from the auth token.

retrieve <filename> [version]

Get <filename> from Flickr.

If the file has multiple versions then you can pass in a version number to get version - 1 being the oldest. If you don't pass in a version then you get the latest.

store <filename> [as]

Store the file <filename> on Flickr. If a second filename is given then use that as the name on Flickr

This works by stashing the data in the least significant bits of as many images as is need. by default an, err, default image is used. But you can set alternative images using the image_pool() method.

image_pool [image[s]]

With no arguments, returns an array of all the images in the current image pool.

If you pass in one or more filenames or Imager objects then those are set as the current pool.

set_auth <auth key>

Set the app authorisation key.