diff --git a/app/Support/EmqxSupport.php b/app/Support/EmqxSupport.php index 39bc210..d31edba 100644 --- a/app/Support/EmqxSupport.php +++ b/app/Support/EmqxSupport.php @@ -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 */