@@ 99-115 (lines=17) @@ | ||
96 | * |
|
97 | * @return Collection |
|
98 | */ |
|
99 | public function getUsers() |
|
100 | { |
|
101 | ||
102 | $response = $this->get( |
|
103 | $this->buildUrlParts(array($this->clientId, "users"), "apps"), |
|
104 | array( |
|
105 | "auth" => array( |
|
106 | $this->appKey, |
|
107 | "" |
|
108 | ) |
|
109 | ) |
|
110 | ); |
|
111 | ||
112 | $responseJson = json_decode($response->getBody(), true); |
|
113 | return $this->buildCollection($responseJson); |
|
114 | ||
115 | } |
|
116 | ||
117 | /** |
|
118 | * Get user by human ID |
|
@@ 123-139 (lines=17) @@ | ||
120 | * @param string $humanId Human ID |
|
121 | * @return Model |
|
122 | */ |
|
123 | public function getUserById($humanId) |
|
124 | { |
|
125 | ||
126 | $response = $this->get( |
|
127 | $this->buildUrlParts(array($this->clientId, "users", $humanId), "apps"), |
|
128 | array( |
|
129 | "auth" => array( |
|
130 | $this->appKey, |
|
131 | "" |
|
132 | ) |
|
133 | ) |
|
134 | ); |
|
135 | ||
136 | $responseJson = json_decode($response->getBody(), true); |
|
137 | return new Model($responseJson, $this); |
|
138 | ||
139 | } |
|
140 | ||
141 | /** |
|
142 | * Delete a user by human ID |