WebService::Yelp::Business - Yelp.com API Business Class (heh, get it?)
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()}) { print $b->name " has " . $b->review_count . " review(s)\n"; }
This class represents a business returned from a search.
The business id.
The latitude of the business location.
The longitude of the business location.
The URL for the business profile.
The business average rating.
The number of reviews for this business.
The distance from the center of the city.
The business name.
The first line of the business address.
The second line of the business address.
The business city.
The business state.
The business zip code.
The business phone number.
The url to a thumbnail pic of this business. (100x100 pixels)
The url to a smaller thumbnail pic of this business. (40x40 pixels)
The url to the star image for the business rating.
The url to search for other businesses nearby.
Returns an array reference of (up to) 3 WebService::Yelp::Review objects.
Returns an array reference of WebService::Yelp::Category objects.
Returns an array reference of WebService::Yelp::Neighborhood objects.
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.