WebService::Yelp::Neighborhood - Yelp.com API Neighborhood Class
use strict; use WebService::Yelp; my $yelp = WebService::Yelp->new({ywsid => 'XXXXXXXXXXXX'}); my $biz_res = $yelp->search_review_hood({ term => 'cream puffs', location => 'San Francisco', }; for my $b (@{$biz_res->businesses()}) { for my $n (@{$b->neighborhood()}) { print $b->name . " is in the " . $n->name . " neighborhood\n"; } } # or my $hood_res = $yelp->search_neighborhood_location({ location => '1512 Shattuck Avenue, Berkeley, CA', }); for my $n (@{$hood_res->neighborhoods}) { print "the " . $n->name . " neighborhood in " . $b->city . "\n"; }
Yelp's neighborhoods define specific area's of a city. You can see the entire list here:
http://www.yelp.com/developers/documentation/neighborhood_list
Note that business searches currently only return the name and URL portions within a particular business. The neighborhood search functions also return the city and state fields.
The name of the neighborhood.
The neighborhood's city.
The neighborhood's state.
The url linking to Yelp's main page for this neighborhood.
To install WebService::Yelp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Yelp
CPAN shell
perl -MCPAN -e shell install WebService::Yelp
For more information on module installation, please visit the detailed CPAN module installation guide.