public function createUser(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array('payload' => 'Object', 'session' => 'Object');
     $enums = array();
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_POST, '/users', new User(), 'EDGE', User::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }
Example #2
0
 public function getSelf(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array();
     $enums = array();
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_GET, '/', new User(), 'NODE', User::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }