google / cloud-game-servers
v1.2.6
2024-06-01 03:14 UTC
Requires
- php: ^8.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.
README
这是针对 Google Cloud Game Servers 的PHP客户端。
注意:该仓库是 Google Cloud PHP 的一部分。任何支持请求、错误报告或开发贡献应直接提交到该项目。
安装
安装PHP首选依赖管理器 Composer。
现在安装此组件
$ composer require google/cloud-game-servers
此组件支持HTTP/1.1的REST和gRPC。为了充分利用gRPC提供的优势(如流式方法),请参阅我们的 gRPC安装指南。
身份验证
请参阅我们的 身份验证指南 了解有关身份验证客户端的更多信息。一旦身份验证通过,您就可以开始发送请求。
示例
use Google\Cloud\Gaming\V1\GameServerDeploymentsServiceClient; $client = new GameServerDeploymentsServiceClient(); $deployments = $client->listGameServerDeployments( GameServerDeploymentsServiceClient::locationName('[PROJECT_ID]', 'global') ); foreach ($deployments as $deployment) { print $deployment->getName() . ': ' . $deployment->getDescription() . PHP_EOL; }
版本
此组件被认为是GA(通用可用)。因此,它不会在任何一个次要或补丁版本中引入不兼容的后向兼容性更改。我们将优先处理问题和请求。
下一步
- 了解 官方文档。