From 311a8ad3992c10ab815e2701ed58c9613f5a2b7c Mon Sep 17 00:00:00 2001 From: James Date: Mon, 14 Oct 2019 20:13:14 +0100 Subject: [PATCH] add getUserById --- src/Client.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Client.php b/src/Client.php index e031635..98fb403 100644 --- a/src/Client.php +++ b/src/Client.php @@ -57,4 +57,10 @@ class Client{ throw new \Exception("API $status_code Code: ".$result); } } + + public function getUserById($id){ + $url="{$this->url}users/search?uid={$id}"; + $data=$this->request($url,'GET'); + return $data->data[0]; + } }