google / cloud-channel
Google Cloud Channel PHP客户端
v2.0.0
2024-09-07 00:21 UTC
Requires
- php: ^8.0
- google/common-protos: ^3.2||^4.0
- google/gax: ^1.34.0
Requires (Dev)
- phpunit/phpunit: ^9.0
Suggests
- ext-grpc: Enables use of gRPC, a universal high-performance RPC framework created by Google.
- ext-protobuf: Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.
This package is auto-updated.
Last update: 2024-09-07 01:43:18 UTC
README
针对Google Cloud Channel的PHP语言惯用客户端。
注意:此存储库是Google Cloud PHP的一部分。任何支持请求、错误报告或开发贡献都应指向该项目。
安装
首先,安装PHP的首选依赖管理器Composer。
现在安装此组件
$ composer require google/cloud-channel
此组件支持HTTP/1.1上的REST和gRPC。为了利用gRPC(如流式方法)提供的优势,请参阅我们的gRPC安装指南。
身份验证
请参阅我们的身份验证指南以获取有关客户端身份验证的更多信息。身份验证后,您即可开始发送请求。
示例
require 'vendor/autoload.php'; use Google\Cloud\Channel\V1\CloudChannelServiceClient; $client = new CloudChannelServiceClient(); $customers = $client->listCustomers('accounts/[MY_ACCOUNT_ID]'); foreach ($customers as $customer) { print 'Customer: ' . $customer->getName() . PHP_EOL; }
版本
此组件被认为是GA(通常可用)。因此,它不会在任何次要或修补版本中引入向后不兼容的更改。我们将优先解决问题和请求。
下一步
- 了解官方文档。