sabana15/yelp-fusion-api-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sabana15/yelp-fusion-api-php

Composer 安装命令:

composer require sabana15/yelp-fusion-api-php

包简介

PHP wrapper for Yelp API v3

README 文档

README

INSTALL

#NOTE: Ignore this guzzle package if you already have it installed

  1. You can add as a dependency using Composer:

    composer require guzzlehttp/guzzle:^6.0

    composer require sabana15/yelp-fusion-api-php

  2. Alternatively, you can specify as a dependency in your project's existing composer.json file:

    {

     "require": {
    
         "guzzlehttp/guzzle:^6.0",
    
         "sabana15/yelp-fusion-api-php": "1.0"
    
     }
    

    }

USAGE

This package only supports Yelp Fusion API v3

Create Yelp API CLient

$yelpFusion = new TrialAPI\YelpClient('Place the API Key here);

Fetch the businesses based on search parameters

$param = array('location' => 'xyz');

$businessSearchList = $yelpFusion->getBusinessesSearchResults($param);

PHP Example

Create the file index.php and put the following content.

require 'vendor/autoload.php';

try{

$apikey = 'API key goes here';

$yelpFusion = new TrialAPI\YelpClient($apikey);

$param = array('location' => 'melbourne');

$businessSearchList = $yelpFusion->getBusinessesSearchResults($param);

var_dump($businessSearchList);

}

catch(Exception $e) {

echo $e->getResponseBody();

}

Run 'php index.php' to check in terminal or accesss and check in browser

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固