Skip to content

Commit 953ab41

Browse files
Bimdata-ioAmoki
andcommitted
MINOR: Add xlsx export (#676)
* action xlsx export * black * add documentation * add BIMData logo * poetry update --------- Co-authored-by: Amoki <hugo@bimdata.io>
1 parent ee73f3e commit 953ab41

File tree

10 files changed

+332
-64
lines changed

10 files changed

+332
-64
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ Class | Method | HTTP request | Description
180180
*BcfApi* | [**delete_topic**](docs/BcfApi.md#delete_topic) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{guid} | Delete a topic
181181
*BcfApi* | [**delete_viewpoint**](docs/BcfApi.md#delete_viewpoint) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{guid} | Delete a Viewpoint
182182
*BcfApi* | [**download_bcf_export**](docs/BcfApi.md#download_bcf_export) | **GET** /bcf/2.1/projects/{id}/export | Export project&#39;s topics in bcf-xml format
183+
*BcfApi* | [**download_bcf_export_xlsx**](docs/BcfApi.md#download_bcf_export_xlsx) | **GET** /bcf/2.1/projects/{id}/export-xlsx | Export project&#39;s topics in excel format
183184
*BcfApi* | [**full_update_bcf_project**](docs/BcfApi.md#full_update_bcf_project) | **PUT** /bcf/2.1/projects/{id} | Update all fields of a BCF project
184185
*BcfApi* | [**full_update_comment**](docs/BcfApi.md#full_update_comment) | **PUT** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/comments/{guid} | Update all fields of a comment
185186
*BcfApi* | [**full_update_full_topic**](docs/BcfApi.md#full_update_full_topic) | **PUT** /bcf/2.1/projects/{projects_pk}/full-topic/{guid} | Update all fields of a topic

bimdata_api_client/api/bcf_api.py

Lines changed: 160 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,60 @@ def __init__(self, api_client=None):
13681368
},
13691369
api_client=api_client
13701370
)
1371+
self.download_bcf_export_xlsx_endpoint = _Endpoint(
1372+
settings={
1373+
'response_type': (BcfProject,),
1374+
'auth': [
1375+
'ApiKey',
1376+
'BIMData_Connect',
1377+
'BIMData_Connect',
1378+
'Bearer'
1379+
],
1380+
'endpoint_path': '/bcf/2.1/projects/{id}/export-xlsx',
1381+
'operation_id': 'download_bcf_export_xlsx',
1382+
'http_method': 'GET',
1383+
'servers': None,
1384+
},
1385+
params_map={
1386+
'all': [
1387+
'id',
1388+
],
1389+
'required': [
1390+
'id',
1391+
],
1392+
'nullable': [
1393+
],
1394+
'enum': [
1395+
],
1396+
'validation': [
1397+
]
1398+
},
1399+
root_map={
1400+
'validations': {
1401+
},
1402+
'allowed_values': {
1403+
},
1404+
'openapi_types': {
1405+
'id':
1406+
(int,),
1407+
},
1408+
'attribute_map': {
1409+
'id': 'id',
1410+
},
1411+
'location_map': {
1412+
'id': 'path',
1413+
},
1414+
'collection_format_map': {
1415+
}
1416+
},
1417+
headers_map={
1418+
'accept': [
1419+
'application/json'
1420+
],
1421+
'content_type': [],
1422+
},
1423+
api_client=api_client
1424+
)
13711425
self.full_update_bcf_project_endpoint = _Endpoint(
13721426
settings={
13731427
'response_type': (BcfProject,),
@@ -2384,11 +2438,11 @@ def __init__(self, api_client=None):
23842438
'format':
23852439
(str,),
23862440
'ifcs':
2387-
(str,),
2441+
([int],),
23882442
'img_format':
23892443
(str,),
23902444
'models':
2391-
(str,),
2445+
([int],),
23922446
},
23932447
'attribute_map': {
23942448
'projects_pk': 'projects_pk',
@@ -2405,6 +2459,8 @@ def __init__(self, api_client=None):
24052459
'models': 'query',
24062460
},
24072461
'collection_format_map': {
2462+
'ifcs': 'multi',
2463+
'models': 'multi',
24082464
}
24092465
},
24102466
headers_map={
@@ -2527,9 +2583,9 @@ def __init__(self, api_client=None):
25272583
'format':
25282584
(str,),
25292585
'ifcs':
2530-
(str,),
2586+
([int],),
25312587
'models':
2532-
(str,),
2588+
([int],),
25332589
},
25342590
'attribute_map': {
25352591
'guid': 'guid',
@@ -2546,6 +2602,8 @@ def __init__(self, api_client=None):
25462602
'models': 'query',
25472603
},
25482604
'collection_format_map': {
2605+
'ifcs': 'multi',
2606+
'models': 'multi',
25492607
}
25502608
},
25512609
headers_map={
@@ -2794,9 +2852,9 @@ def __init__(self, api_client=None):
27942852
'format':
27952853
(str,),
27962854
'ifcs':
2797-
(str,),
2855+
([int],),
27982856
'models':
2799-
(str,),
2857+
([int],),
28002858
},
28012859
'attribute_map': {
28022860
'guid': 'guid',
@@ -2813,6 +2871,8 @@ def __init__(self, api_client=None):
28132871
'models': 'query',
28142872
},
28152873
'collection_format_map': {
2874+
'ifcs': 'multi',
2875+
'models': 'multi',
28162876
}
28172877
},
28182878
headers_map={
@@ -2935,9 +2995,9 @@ def __init__(self, api_client=None):
29352995
'format':
29362996
(str,),
29372997
'ifcs':
2938-
(str,),
2998+
([int],),
29392999
'models':
2940-
(str,),
3000+
([int],),
29413001
},
29423002
'attribute_map': {
29433003
'projects_pk': 'projects_pk',
@@ -2952,6 +3012,8 @@ def __init__(self, api_client=None):
29523012
'models': 'query',
29533013
},
29543014
'collection_format_map': {
3015+
'ifcs': 'multi',
3016+
'models': 'multi',
29553017
}
29563018
},
29573019
headers_map={
@@ -5860,6 +5922,84 @@ def download_bcf_export(
58605922
id
58615923
return self.download_bcf_export_endpoint.call_with_http_info(**kwargs)
58625924

5925+
def download_bcf_export_xlsx(
5926+
self,
5927+
id,
5928+
**kwargs
5929+
):
5930+
"""Export project's topics in excel format # noqa: E501
5931+
5932+
This is not a standard route. Export project's topics in excel format Required scopes: bcf:read # noqa: E501
5933+
This method makes a synchronous HTTP request by default. To make an
5934+
asynchronous HTTP request, please pass async_req=True
5935+
5936+
>>> thread = api.download_bcf_export_xlsx(id, async_req=True)
5937+
>>> result = thread.get()
5938+
5939+
Args:
5940+
id (int): A unique integer value identifying this project.
5941+
5942+
Keyword Args:
5943+
_return_http_data_only (bool): response data without head status
5944+
code and headers. Default is True.
5945+
_preload_content (bool): if False, the urllib3.HTTPResponse object
5946+
will be returned without reading/decoding response data.
5947+
Default is True.
5948+
_request_timeout (int/float/tuple): timeout setting for this request. If
5949+
one number provided, it will be total request timeout. It can also
5950+
be a pair (tuple) of (connection, read) timeouts.
5951+
Default is None.
5952+
_check_input_type (bool): specifies if type checking
5953+
should be done one the data sent to the server.
5954+
Default is True.
5955+
_check_return_type (bool): specifies if type checking
5956+
should be done one the data received from the server.
5957+
Default is True.
5958+
_spec_property_naming (bool): True if the variable names in the input data
5959+
are serialized names, as specified in the OpenAPI document.
5960+
False if the variable names in the input data
5961+
are pythonic names, e.g. snake case (default)
5962+
_content_type (str/None): force body content-type.
5963+
Default is None and content-type will be predicted by allowed
5964+
content-types and body.
5965+
_host_index (int/None): specifies the index of the server
5966+
that we want to use.
5967+
Default is read from the configuration.
5968+
async_req (bool): execute request asynchronously
5969+
5970+
Returns:
5971+
BcfProject
5972+
If the method is called asynchronously, returns the request
5973+
thread.
5974+
"""
5975+
kwargs['async_req'] = kwargs.get(
5976+
'async_req', False
5977+
)
5978+
kwargs['_return_http_data_only'] = kwargs.get(
5979+
'_return_http_data_only', True
5980+
)
5981+
kwargs['_preload_content'] = kwargs.get(
5982+
'_preload_content', True
5983+
)
5984+
kwargs['_request_timeout'] = kwargs.get(
5985+
'_request_timeout', None
5986+
)
5987+
kwargs['_check_input_type'] = kwargs.get(
5988+
'_check_input_type', True
5989+
)
5990+
kwargs['_check_return_type'] = kwargs.get(
5991+
'_check_return_type', True
5992+
)
5993+
kwargs['_spec_property_naming'] = kwargs.get(
5994+
'_spec_property_naming', False
5995+
)
5996+
kwargs['_content_type'] = kwargs.get(
5997+
'_content_type')
5998+
kwargs['_host_index'] = kwargs.get('_host_index')
5999+
kwargs['id'] = \
6000+
id
6001+
return self.download_bcf_export_xlsx_endpoint.call_with_http_info(**kwargs)
6002+
58636003
def full_update_bcf_project(
58646004
self,
58656005
id,
@@ -7119,10 +7259,10 @@ def get_full_topics(
71197259
projects_pk (int):
71207260
71217261
Keyword Args:
7122-
format (str): format. [optional]
7123-
ifcs (str): ifcs. [optional]
7262+
format (str): [optional]
7263+
ifcs ([int]): [optional]
71247264
img_format (str): All snapshot_data will be returned as url instead of base64. [optional] if omitted the server will use the default value of "url"
7125-
models (str): models. [optional]
7265+
models ([int]): [optional]
71267266
_return_http_data_only (bool): response data without head status
71277267
code and headers. Default is True.
71287268
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -7289,9 +7429,9 @@ def get_related_topics(
72897429
projects_pk (int):
72907430
72917431
Keyword Args:
7292-
format (str): format. [optional]
7293-
ifcs (str): ifcs. [optional]
7294-
models (str): models. [optional]
7432+
format (str): [optional]
7433+
ifcs ([int]): [optional]
7434+
models ([int]): [optional]
72957435
_return_http_data_only (bool): response data without head status
72967436
code and headers. Default is True.
72977437
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -7628,9 +7768,9 @@ def get_topic_document_references(
76287768
projects_pk (int):
76297769
76307770
Keyword Args:
7631-
format (str): format. [optional]
7632-
ifcs (str): ifcs. [optional]
7633-
models (str): models. [optional]
7771+
format (str): [optional]
7772+
ifcs ([int]): [optional]
7773+
models ([int]): [optional]
76347774
_return_http_data_only (bool): response data without head status
76357775
code and headers. Default is True.
76367776
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -7794,9 +7934,9 @@ def get_topics(
77947934
projects_pk (int):
77957935
77967936
Keyword Args:
7797-
format (str): format. [optional]
7798-
ifcs (str): ifcs. [optional]
7799-
models (str): models. [optional]
7937+
format (str): [optional]
7938+
ifcs ([int]): [optional]
7939+
models ([int]): [optional]
78007940
_return_http_data_only (bool): response data without head status
78017941
code and headers. Default is True.
78027942
_preload_content (bool): if False, the urllib3.HTTPResponse object

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8373,7 +8373,7 @@ def create_document(
83738373
):
83748374
"""Create a document # noqa: E501
83758375

8376-
Create a document. If the document is one of {'IFC', 'GLTF', 'POINT_CLOUD', 'DXF', 'OBJ', 'DWG'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
8376+
Create a document. If the document is one of {'OBJ', 'DXF', 'IFC', 'GLTF', 'POINT_CLOUD', 'DWG'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
83778377
This method makes a synchronous HTTP request by default. To make an
83788378
asynchronous HTTP request, please pass async_req=True
83798379

bimdata_api_client/api/ifc_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19302,9 +19302,9 @@ def get_ifcs_deprecated(
1930219302
project_pk (int):
1930319303

1930419304
Keyword Args:
19305-
source (str): * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional]
19306-
status ([str]): * `C` - completed * `D` - deleted * `P` - pending * `W` - waiting * `I` - in process * `E` - errored * `X` - won't fix * `C` - completed * `D` - deleted * `P` - pending * `W` - waiting * `I` - in process * `E` - errored * `X` - won't fix. [optional]
19307-
type ([str]): * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `METABUILDING` - METABUILDING * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `METABUILDING` - METABUILDING. [optional]
19305+
source (str): * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional]
19306+
status ([str]): * `C` - completed * `D` - deleted * `P` - pending * `W` - waiting * `I` - in process * `E` - errored * `X` - won't fix. [optional]
19307+
type ([str]): * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `METABUILDING` - METABUILDING. [optional]
1930819308
_return_http_data_only (bool): response data without head status
1930919309
code and headers. Default is True.
1931019310
_preload_content (bool): if False, the urllib3.HTTPResponse object

bimdata_api_client/api/model_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19692,9 +19692,9 @@ def get_models(
1969219692
project_pk (int):
1969319693

1969419694
Keyword Args:
19695-
source (str): * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional]
19696-
status ([str]): * `C` - completed * `D` - deleted * `P` - pending * `W` - waiting * `I` - in process * `E` - errored * `X` - won't fix * `C` - completed * `D` - deleted * `P` - pending * `W` - waiting * `I` - in process * `E` - errored * `X` - won't fix. [optional]
19697-
type ([str]): * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `METABUILDING` - METABUILDING * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `METABUILDING` - METABUILDING. [optional]
19695+
source (str): * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional]
19696+
status ([str]): * `C` - completed * `D` - deleted * `P` - pending * `W` - waiting * `I` - in process * `E` - errored * `X` - won't fix. [optional]
19697+
type ([str]): * `IFC` - IFC * `DWG` - DWG * `DXF` - DXF * `GLTF` - GLTF * `PDF` - PDF * `JPEG` - JPEG * `PNG` - PNG * `OBJ` - OBJ * `POINT_CLOUD` - POINT_CLOUD * `METABUILDING` - METABUILDING. [optional]
1969819698
_return_http_data_only (bool): response data without head status
1969919699
code and headers. Default is True.
1970019700
_preload_content (bool): if False, the urllib3.HTTPResponse object

0 commit comments

Comments
 (0)