From bc1d82f95e26a50f2d66cae73df858115ed9872b Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Fri, 20 Jan 2023 00:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=80=E4=B8=AA=E5=AE=A2=E6=88=B7=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Support/EmqxSupport.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 */