NAME

WebService::Yelp::Result - Yelp.cpm API Search Result Container

SYNOPSIS

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();
  # ...
}

DESCRIPTION

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.

METHODS (Read Only)

businesses

Returns an array reference of WebService::Yelp::Business objects.

neighborhoods

Returns an array reference of WebService::Yelp::Neighborhood objects.

message

Returns a WebService::Yelp::Message object.