|
NAMENet::FS::Flickr - store and retrieve files on FlickrSYNOPSISmy $fs = Net::FS::Flickr->new( key => $key, secret => $secret ); $fs->set_auth($auth_key); # see API KEYS AND AUTH KEY section $fs->store("file.txt"); $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); API KEYS AND AUTH KEYYou will need to sign up for an API key and then get the corresponding secret key. You can do that from herehttp://www.flickr.com/services/api/key.gne Finally you will need to get an auth key. As described here http://www.flickr.com/services/api/auth.howto.desktop.html the helper script "flickrfs" supplied with this distribution can help with that. METHODSnewTakes a valid API key and a valid secret keyfiles [nsid, email or username]Get a list of all the files on the systemGiven 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 fileEach 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 FlickrThis 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.
Visit the GSP FreeBSD Man Page Interface. |