def project(self, val): """Set project Keyword argument: val -- New project value""" if val is None: self._project = val return self if isinstance(val, dict): obj = processout.Project(self._client) obj.fill_with_data(val) self._project = obj else: self._project = val return self
def regenerate_private_key(self, options={}): """Regenerate the project private key. Make sure to store the new private key and use it in any future request. Keyword argument: options -- Options for the request""" self.fill_with_data(options) request = Request(self._client) path = "/private-keys" data = {} response = Response(request.post(path, data, options)) return_values = [] body = response.body body = body["project"] obj = processout.Project(self._client) return_values.append(obj.fill_with_data(body)) return return_values[0]
def fetch_supervised(self, options={}): """Get all the supervised projects. Keyword argument: options -- Options for the request""" self.fill_with_data(options) request = Request(self._client) path = "/supervised-projects" data = {} response = Response(request.get(path, data, options)) return_values = [] a = [] body = response.body for v in body['projects']: tmp = processout.Project(self._client) tmp.fill_with_data(v) a.append(tmp) return_values.append(a) return return_values[0]
def new_project(self, prefill=None): """Create a new Project instance Keyword argument: prefill -- Data used to prefill the object (optional)""" return processout.Project(self, prefill)