| WebService-Yelp documentation | Contained in the WebService-Yelp distribution. |
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.
| WebService-Yelp documentation | Contained in the WebService-Yelp distribution. |
package WebService::Yelp::Business; use strict; use warnings; use base qw/Class::Accessor/; __PACKAGE__->mk_ro_accessors(qw/distance neighborhoods state avg_rating city review_count latitude url id longitude rating_img_url_small reviews name categories rating_img_url phone photo_url address1 address2 nearby_url zip photo_url_small/);
1;