From 9d0b2ff9f0b9fef7381175e6c0de68676722ea68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=90=E6=B2=AB?= Date: Tue, 22 Feb 2022 17:15:10 +0800 Subject: [PATCH] add get open api quota method (#2371) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 增加“查询openAPI调用quota”接口 * 删除“查询openAPI调用quota”中app_id参数 --- src/OfficialAccount/Base/Client.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/OfficialAccount/Base/Client.php b/src/OfficialAccount/Base/Client.php index ce8abc592..2a73b9db1 100644 --- a/src/OfficialAccount/Base/Client.php +++ b/src/OfficialAccount/Base/Client.php @@ -21,6 +21,25 @@ */ class Client extends BaseClient { + /** + * Get api quota. + * + * @param string $cgiPath api cgi_path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function getQuota(string $cgiPath) + { + $params = [ + 'cgi_path' => $cgiPath, + ]; + + return $this->httpPostJson('cgi-bin/openapi/quota/get', $params); + } + /** * Clear quota. *