Skip to content

Commit

Permalink
#7; add Get User Clients endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
33mhz committed Feb 11, 2020
1 parent 212a2e3 commit 117e663
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/phpnut.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 117e663

Please sign in to comment.