$departmentId, 'fetch_child' => (int)$fetchChild, ]; return $this->api->get('cgi-bin/user/list', $params); } /** * 获取通讯录成员详情 * @param string $userId * @return Response|ResponseInterface * @throws TransportExceptionInterface * @author 等风来 * @email 136327134@qq.com * @date 2023/9/15 */ public function get(string $userId): ResponseInterface|Response { return $this->api->get('cgi-bin/user/get', ['userid' => $userId]); } /** * userid转openid * @param string $userId * @param int|null $agentId * @return Response|ResponseInterface * @throws TransportExceptionInterface * @author 等风来 * @email 136327134@qq.com * @date 2023/9/15 */ public function userIdToOpenid(string $userId, int $agentId = null): ResponseInterface|Response { $params = [ 'userid' => $userId, 'agentid' => $agentId, ]; return $this->api->postJson('cgi-bin/user/convert_to_openid', $params); } }