bshaffer / apiclient-mybusiness-service
Google MyBusiness API 的客户端库
v0.1
2022-12-16 00:14 UTC
Requires
- php: >=5.6
- google/apiclient: ^2.0
Requires (Dev)
- phpunit/phpunit: ^8.5.13
README
PHP 的 Google MyBusiness 客户端库
重要:这是一个基于 Google API PHP Client 的分支,但它支持一个之前(目前已弃用)的 API,该 API 仍保留一些未弃用的端点。请参阅 googleapis/google-api-php-client-services#580
安装
Composer
您可以通过 composer 进行安装。如果您还没有安装 composer,请按照 安装说明 进行操作。
一旦 composer 安装完毕,请执行以下命令以在项目根目录中安装此库
composer require bshaffer/apiclient-mybusiness-service
确保包含自动加载器
require_once '/path/to/your-project/vendor/autoload.php';
示例
以下是使用 MyBusiness API 的示例
require 'vendor/autoload.php'; $client = new Google\Client(); $mybusiness = new Google_Service_MyBusiness($client); $parent = 'accounts/{YOUR_ACCOUNT}/locations/{YOUR_LOCATION}'; $response = $mybusiness->accounts_locations_reviews->listAccountsLocationsReviews($parent);
有关更多使用说明,请参阅 google-api-php-client 仓库。
清理未使用的服务
Google API 有超过 200 个服务。有关如何清理这些服务的说明,请参阅 google-api-php-client README。