tmarois/google-places-api 问题修复 & 功能扩展

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

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

tmarois/google-places-api

Composer 安装命令:

composer require tmarois/google-places-api

包简介

The PHP Google Places API

README 文档

README

NOTE: This project might be missing features, please send pull requests for additional usage.

This package allows you to connect and pull information from the Google Places API

You will need a Google API Client Key to use Google Places API.

Features:

Installation:

Composer to install package.

Use composer require tmarois/google-places-api dev-master

Basic Usage:

$client = new \GooglePlaces\Client('YOUR_CLIENT_KEY');

// find all movie theaters in this zip code
$response = $client->placeSearch('textsearch')->setOptions([
    'query' => 'movie theaters in 28202'
])->request();

// get specific place detail information
$placeId  = 'ChIJvznB1hAnVIgRrWFNVdxDHm0';
$response = $client->placeDetails($placeId)->request();

// get a photo found in the previous responses,
// look up by the "photo_reference"
// save the photo locally for caching
$photoId = 'CmRaAAAAoKx6KQyrDEJ0si1ekan0QaZ6Y02NpXwBFa1ncLaKhZECbFa';
$client->placePhotos($photoId,[450,450])->request()->save(__DIR__.'/images');

Resources:

Contributions

Accepting contributions and feedback. Send in any issues and pull requests.

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-03-13