neighborhoods/yelp-fusion

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

Installs: 2 052

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 33

Forks: 0

Open Issues: 0

Type:project

2.0.0 2018-07-09 18:16 UTC

This package is not auto-updated.

Last update: 2024-03-26 17:06:07 UTC


README

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.