WebService::Yelp::Result - Yelp.cpm API Search Result Container
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', }; if($biz_res->message->code() == 0) { # returns an array ref of businesses my $businesses = $biz_res->businesses(); # ... } my $hood_res = $yelp->search_neigborhood_location({ location => 'Shattuck Avenue, Berkeley, CA', }); if($hood_res->message->code() == 0) { # returns an array ref of neighborhoods my $neighborhoods = $hood_res->neighborhoods(); # ... }
This class simply contains the results of a Review or Neighborhood search, as well as the result WebService::Yelp::Message class. It is the return value of all search methods (including the raw call() method) from WebService::Yelp *if* no other output type was specified.
If the call was a review search, the businesses method will return an array reference of WebService::Yelp::Business objects. Likewise, a neighborhood search returns an array reference of WebService::Yelp::Neighborhood objects via the neighborhoods method.
Returns an array reference of WebService::Yelp::Business objects.
Returns an array reference of WebService::Yelp::Neighborhood objects.
Returns a WebService::Yelp::Message object.
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.