mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
update api to V5 (#7409)
This commit is contained in:
+4
-6
@@ -184,7 +184,7 @@ class ClassPropertyContractV1(TypedDict):
|
|||||||
qudtCodes: NotRequired[list[str]]
|
qudtCodes: NotRequired[list[str]]
|
||||||
|
|
||||||
|
|
||||||
class PropertyContractV4(TypedDict):
|
class PropertyContractV5(TypedDict):
|
||||||
dictionaryUri: NotRequired[str]
|
dictionaryUri: NotRequired[str]
|
||||||
activationDateUtc: str
|
activationDateUtc: str
|
||||||
code: str
|
code: str
|
||||||
@@ -710,16 +710,14 @@ class Client:
|
|||||||
params = {k: v for k, v in params.items() if v is not None}
|
params = {k: v for k, v in params.items() if v is not None}
|
||||||
return self.get(endpoint, params)
|
return self.get(endpoint, params)
|
||||||
|
|
||||||
def get_property(self, uri, include_classes=False, language_code="", version: int = 4) -> PropertyContractV4:
|
def get_property(self, uri, language_code="", version: int = 5) -> PropertyContractV5:
|
||||||
"""
|
"""
|
||||||
Get Property Detail
|
Get Property details.
|
||||||
this API replaces Property
|
If you also need the list of classes using the property, then use api/Property/Classes
|
||||||
"""
|
"""
|
||||||
|
|
||||||
endpoint = f"Property/v{version}"
|
endpoint = f"Property/v{version}"
|
||||||
params = {
|
params = {
|
||||||
"uri": uri,
|
"uri": uri,
|
||||||
"includeClasses": include_classes,
|
|
||||||
"LanguageCode": language_code,
|
"LanguageCode": language_code,
|
||||||
}
|
}
|
||||||
return self.get(endpoint, params)
|
return self.get(endpoint, params)
|
||||||
|
|||||||
Reference in New Issue
Block a user