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 ExternalEventSource(), 'NODE', ExternalEventSource::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums)); $request->addParams($params); $request->addFields($fields); return $pending ? $request : $request->execute(); }
public function createExternalEventSource(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); $param_types = array('external_event_sources' => 'list<string>'); $enums = array(); $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_POST, '/external_event_sources', new ExternalEventSource(), 'EDGE', ExternalEventSource::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums)); $request->addParams($params); $request->addFields($fields); return $pending ? $request : $request->execute(); }