From 117e663982f7c50072a114502c715fd102667fc2 Mon Sep 17 00:00:00 2001 From: 33MHz Date: Tue, 11 Feb 2020 10:34:24 -0600 Subject: [PATCH] #7; add Get User Clients endpoint --- src/phpnut.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/phpnut.php b/src/phpnut.php index e0ebc38..86451ec 100644 --- a/src/phpnut.php +++ b/src/phpnut.php @@ -1079,6 +1079,15 @@ public function getClient(string $client_id, array $params=[]) { return $this->httpReq('get',$this->_baseUrl.'clients/'.urlencode($client_id).'?'.$this->buildQueryString($params)); } + /** + * Returns a list of truncated client details made by a user + * @param string $user_id + * @return array A list of arrays representing clients + */ + public function getUserClients(string $user_id) { + return $this->httpReq('get',$this->_baseUrl.'users/'.urlencode($user_id).'/clients'); + } + /** * update stream marker */