增加 单独显示一个客户端

This commit is contained in:
iVampireSP.com 2023-01-20 00:07:16 +08:00
parent 7f3dd149a9
commit bc1d82f95e
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -64,6 +64,21 @@ public function clients($params = [])
} }
} }
/**
* @throws EmqxSupportException
*/
public function client(string $client_id)
{
$response = $this->api()->get('clients/' . $client_id);
if ($response->successful()) {
return $response->json();
} else {
throw new EmqxSupportException('无法获取客户端信息。');
}
}
/** /**
* @throws EmqxSupportException * @throws EmqxSupportException
*/ */