Aaron Straup Cope > Flickr-Upload-Dopplr-0.1 > Flickr::Upload::Dopplr

Download:
Flickr-Upload-Dopplr-0.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.1   Source   Latest Release: Flickr-Upload-Dopplr-0.3

NAME ^

Flickr::Upload::Dopplr - Flickr::Upload subclass to assign location information using Dopplr

SYNOPSIS ^

 use Flickr::Upload::Dopplr;

 my %dp_args = ('auth_token' => 'JONES!!!!',
                'tagify' => 'delicious');

 my %fl_args = ('key' => 'OH HAI',
                'secret' => 'OH NOES',,
                'dopplr' => \%dp_args);

 my $uploadr = Flickr::Upload::Dopplr->new(\%fl_args);

 my $photo_id = $uploadr->upload('photo' => "/path/to/photo",
                                 'auth_token' => 'O RLY');

DESCRIPTION ^

A Flickr::Upload subclass to assign location information using Dopplr.

Specifically, the package will query Dopplr for the current location of the user associated with $dopplr_authtoken and assign the city name as a tag and a machinetag with the Geonames.org ID for that city.

If the Dopplr API thinks that it is a "travel day" another machine tag (dopplr:trip=) will be added containing the numeric identifier for that trip.

If the package is able to query a photo's EXIF data and read the DateTimeOriginal field that value will be used to query Dopplr for your location on that day.

If an upload is successful, the package will attempt to assign latitude and longitude information for the photo with a Flickr accuracy of 11 (or "city") and, optionally, set geo permissions specific to that photo.

ERROR HANDLING ^

Flickr::Upload::Dopplr uses Error.pm to catch and throw exceptions. Although this is still a mostly un-Perl-ish way of doing things, it seemed like the most sensible way to handle the variety of possible error conditions. I don't love it but we'll see.

This means that the library will throw fatal exceptions and you will need to code around it using either eval or - even better - try and catch blocks.

There are four package-specific exception handlers :

CAVEATS ^

PACKAGE METHODS ^

__PACKAGE__->new(\%args)

All the same arguments required by the Flickr::Upload constructor plus the following :

Returns a Flickr::Upload::Dopplr object.

OBJECT METHODS YOU SHOULD CARE ABOUT ^

$obj->upload(%args)

Nothing you wouldn't pass the Flickr::Upload upload method.

Except for the part where the async flag which is not honoured. I'm working on it.

In additional, you may pass an optional geo parameter. It must be a hash reference with the following keys :

Returns a photo ID!

VERSION ^

0.1

DATE ^

$Date: 2007/09/13 14:50:29 $

AUTHOR ^

Aaron Straup Cope <ascope@cpan.org>

SEE ALSO ^

Flickr::API

Flickr::Upload

Net::Dopplr

Error

http://www.aaronland.info/weblog/2007/08/24/aware/#reduced

BUGS ^

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

LICENSE ^

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.