From 3c7a081a89b221759b048e9d01dbb05c09fe57e4 Mon Sep 17 00:00:00 2001 From: Lu Fei <52o@qq52o.cn> Date: Mon, 9 Oct 2023 16:22:11 +0800 Subject: [PATCH] Standardize the `Buckets` return value in `ListBuckets` (#325) * Standardize the `Buckets` return value in `ListBuckets` --- src/Client.php | 4 ++-- src/Service.php | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/Client.php b/src/Client.php index 967dcfd..f7cb785 100644 --- a/src/Client.php +++ b/src/Client.php @@ -51,7 +51,7 @@ * @method object PutObject(array $args) 上传对象 * @method object AppendObject(array $args) 追加对象 * @method object PutObjectAcl(array $args) 设置 COS 对象的访问权限信息(Access Control List, ACL) - * @method object PutBucketAcl(array $args) 设置存储桶(Bucket)的访问权限(Access Control List, ACL) + * @method object PutBucketAcl(array $args) 设置存储桶(Bucket)的访问权限 (Access Control List, ACL) * @method object PutBucketCors(array $args) 设置存储桶(Bucket)的跨域配置信息 * @method object PutBucketDomain(array $args) 设置存储桶(Bucket)的Domain信息 * @method object PutBucketLifecycle(array $args) 设置存储桶(Bucket)生命周期配置 @@ -239,7 +239,7 @@ class Client extends GuzzleClient { const VERSION = '2.6.6'; public $httpClient; - + private $api; private $desc; private $action; diff --git a/src/Service.php b/src/Service.php index 0ca3390..b8cb43b 100644 --- a/src/Service.php +++ b/src/Service.php @@ -1562,7 +1562,7 @@ public static function getService() { ), ) ), - // 设置存储桶(Bucket)的访问权限(Access Control List, ACL) + // 设置存储桶(Bucket)的访问权限 (Access Control List, ACL) 'PutBucketAcl' => array( 'httpMethod' => 'PUT', 'uri' => '/{Bucket}?acl', @@ -5621,11 +5621,21 @@ public static function getService() { 'items' => array( 'type' => 'object', 'properties' => array( - 'Name' => array( - 'type' => 'string', - ), - 'CreationDate' => array( - 'type' => 'string', + 'Bucket' => array( + 'type' => 'array', + 'items' => array( + 'type' => 'object', + 'items' => array( + 'properties' => array( + 'Name' => array( + 'type' => 'string', + ), + 'CreationDate' => array( + 'type' => 'string', + ), + ), + ), + ) ), ), ),