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. *