Skip to content

Commit

Permalink
add get open api quota method (#2371)
Browse files Browse the repository at this point in the history
* 增加“查询openAPI调用quota”接口

* 删除“查询openAPI调用quota”中app_id参数
  • Loading branch information
lqllife authored Feb 22, 2022
1 parent 0d8ee05 commit 9d0b2ff
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/OfficialAccount/Base/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 9d0b2ff

Please sign in to comment.