Skip to content

neighborhoods/Yelp-Fusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neighborhoods Yelp-Fusion Library

Build Status Latest Stable Version Total Downloads License

A library that interfaces with the Yelp Fusion (v3) API.

Installation

Requirements

  • PHP >= 5.6
  • Yelp Fusion API credentials

Installation

composer require neighborhoods/yelp-fusion

Usage

Getting API key

Yelp Fusion API uses private API Keys to authenticate requests. In order to set up your access to Yelp Fusion API, you need to create an app with Yelp.

See Yelp's authentication documentation for instructions.

Search

$params = [
    'categories' => 'arts',
    'latitude'   => 41.879562,
    'longitude'  => -87.624205,
    'radius'     => 16093,
];

$yelpData = $this->yelp->search($params, $apiKey);
$businesses = $yelpData->businesses;

See Yelp's business search documentation for the list of available search parameters and the shape of the results object.