NAME
Geo::Coder::Gowalla - Geocode addresses with the Gowalla Spots API
SYNOPSIS
use Geo::Coder::Gowalla;
my $geocoder = Geo::Coder::Gowalla->new(
# apikey => 'Your Gowalla API key',
);
my $location = $geocoder->geocode(
location => '610 W 5th Street, Suite 604, Austin, TX 78701',
);
DESCRIPTION
The Geo::Coder::Gowalla
module provides an interface to the geocoding functionality of the Gowalla Spots API.
METHODS
new
$geocoder = Geo::Coder::Gowalla->new(
# apikey => 'Your Gowalla API key',
# https => 1,
# debug => 1,
)
Creates a new geocoding object.
Accepts the following named arguments:
apikey
A Gowalla API key. (optional)
Gowalla allows higher rate limits when an API key is provided. An API key can be obtained here: https://gowalla.com/api/keys
ua
A custom LWP::UserAgent object. (optional)
compress
Enable compression. (default: 1, unless debug is enabled)
https
Use https protocol for securing network traffic. (default: 0)
debug
Enable debugging. This prints the headers and content for requests and responses. (default: 0)
geocode
$location = $geocoder->geocode(location => $location)
@locations = $geocoder->geocode(location => $location)
In scalar context, this method returns the first location result; and in list context it returns all location results.
Each location result is a hashref; a typical example looks like:
{
"_image_url_200":
"http://static.gowalla.com/categories/121-b3390d3267c29dbbbd67ccfff852177f-200.png",
"_image_url_50":
"http://static.gowalla.com/categories/121-903d9ce4f33b0284aacfeacd58118a19-100.png",
"activity_url": "/spots/6476224/events",
"address": {
"locality": "Austin",
"region": "TX"
},
"checkins_count": 217,
"checkins_url": "/checkins?spot_id=6476224",
"description": " ",
"foursquare_id": null,
"highlights_url": "/spots/6476224/highlights",
"image_url":
"http://static.gowalla.com/categories/121-903d9ce4f33b0284aacfeacd58118a19-100.png",
"items_count": 10,
"items_url": "/spots/6476224/items",
"lat": "30.269263558",
"lng": "-97.749352878",
"name": "Gowalla Office 1B",
"photos_count": 84,
"radius_meters": 75,
"spot_categories": [{
"name": "Corporate Office",
"url": "/categories/121"
}],
"strict_radius": false,
"trending_level": 0,
"url": "/spots/6476224",
"users_count": 121
}
response
$response = $geocoder->response()
Returns an HTTP::Response object for the last submitted request. Can be used to determine the details of an error.
ua
$ua = $geocoder->ua()
$ua = $geocoder->ua($ua)
Accessor for the UserAgent object.
SEE ALSO
REQUESTS AND BUGS
Please report any bugs or feature requests to http://rt.cpan.org/Public/Bug/Report.html?Queue=Geo-Coder-Gowalla. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Geo::Coder::Gowalla
You can also look for information at:
GitHub Source Repository
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/Public/Dist/Display.html?Name=Geo-Coder-Gowalla
Search CPAN
COPYRIGHT AND LICENSE
Copyright (C) 2011 gray <gray at cpan.org>, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
gray, <gray at cpan.org>