MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / delete

Method delete

src/bcf/bcf/v3/bcfapi.py:212–226  ·  view source on GitHub ↗
(self, endpoint: str, params: Any = None)

Source from the content-addressed store, hash-verified

210 return response.status_code, response.reason
211
212 def delete(self, endpoint: str, params: Any = None) -> tuple[int, str]:
213 headers = {
214 "Authorization": f"Bearer {self.foundation_client.get_access_token()}",
215 "Content-type": "application/json",
216 }
217
218 try:
219 response = requests.delete(f"{self.baseurl}{endpoint}", headers=headers, params=params or None)
220
221 if response.status_code != 200:
222 response.raise_for_status()
223 return response.status_code, response.text
224 except requests.exceptions.HTTPError as errh:
225 print(f"message: {response.reason}' '{response.status_code}, {errh}")
226 return response.status_code, response.reason
227
228 def get_projects(self) -> list[Any]:
229 return self.get("/projects")

Callers 15

delete_topicMethod · 0.95
delete_commentMethod · 0.95
delete_viewpointMethod · 0.95
_handleWorkerMessageMethod · 0.80
unloadIfcFunction · 0.80
handleAuditResultFunction · 0.80
handleAuditErrorFunction · 0.80
get_shape_verticesFunction · 0.80
get_element_verticesFunction · 0.80
patchMethod · 0.80
create_edgesMethod · 0.80
patchMethod · 0.80

Calls 2

printFunction · 0.85
get_access_tokenMethod · 0.45

Tested by

no test coverage detected