mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Implement classification searching in bSDD library
This commit is contained in:
+15
-1
@@ -52,7 +52,7 @@ class Client:
|
||||
headers = {}
|
||||
if is_auth_required:
|
||||
headers = {"Authorization": "Bearer " + self.get_access_token()}
|
||||
return requests.get(f"{self.baseurl}{endpoint}", headers=headers, params=params or None).json()
|
||||
return requests.get(f"{self.baseurl}{endpoint}", timeout=10, headers=headers, params=params or None).json()
|
||||
|
||||
def post(self):
|
||||
pass # TODO
|
||||
@@ -121,6 +121,20 @@ class Client:
|
||||
},
|
||||
)
|
||||
|
||||
def ClassificationSearchOpen(self, SearchText, version="v1", DomainNamespaceUris=None, RelatedIfcEntities=None):
|
||||
if DomainNamespaceUris is None:
|
||||
DomainNamespaceUris = []
|
||||
if RelatedIfcEntities is None:
|
||||
RelatedIfcEntities = []
|
||||
return self.get(
|
||||
f"api/ClassificationSearchOpen/{version}",
|
||||
{
|
||||
"SearchText": SearchText,
|
||||
"DomainNamespaceUris": DomainNamespaceUris,
|
||||
"RelatedIfcEntities": RelatedIfcEntities,
|
||||
},
|
||||
)
|
||||
|
||||
def Country(self, version="v1"):
|
||||
return self.get(f"api/Country/{version}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user