Skip to content

Commit 64d6996

Browse files
committed
MINOR: add BCF topic/pins route (#855)
* MINOR: add BCF topic/pins route * add topic guid filter test
1 parent 39caf52 commit 64d6996

File tree

16 files changed

+998
-29
lines changed

16 files changed

+998
-29
lines changed

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ bimdata_api_client/model/perspective_camera.py
157157
bimdata_api_client/model/perspective_camera_request.py
158158
bimdata_api_client/model/pin.py
159159
bimdata_api_client/model/pin_request.py
160+
bimdata_api_client/model/pin_with_models.py
160161
bimdata_api_client/model/point.py
161162
bimdata_api_client/model/point_request.py
162163
bimdata_api_client/model/positioning_plan.py
@@ -228,6 +229,7 @@ bimdata_api_client/model/tag.py
228229
bimdata_api_client/model/tag_id_request.py
229230
bimdata_api_client/model/tag_request.py
230231
bimdata_api_client/model/topic.py
232+
bimdata_api_client/model/topic_pin.py
231233
bimdata_api_client/model/topic_request.py
232234
bimdata_api_client/model/topic_status.py
233235
bimdata_api_client/model/topic_status_request.py
@@ -420,6 +422,7 @@ docs/PerspectiveCamera.md
420422
docs/PerspectiveCameraRequest.md
421423
docs/Pin.md
422424
docs/PinRequest.md
425+
docs/PinWithModels.md
423426
docs/Point.md
424427
docs/PointRequest.md
425428
docs/PositioningPlan.md
@@ -492,6 +495,7 @@ docs/Tag.md
492495
docs/TagIdRequest.md
493496
docs/TagRequest.md
494497
docs/Topic.md
498+
docs/TopicPin.md
495499
docs/TopicRequest.md
496500
docs/TopicStatus.md
497501
docs/TopicStatusRequest.md
@@ -686,6 +690,7 @@ test/test_perspective_camera.py
686690
test/test_perspective_camera_request.py
687691
test/test_pin.py
688692
test/test_pin_request.py
693+
test/test_pin_with_models.py
689694
test/test_point.py
690695
test/test_point_request.py
691696
test/test_positioning_plan.py
@@ -758,6 +763,7 @@ test/test_tag.py
758763
test/test_tag_id_request.py
759764
test/test_tag_request.py
760765
test/test_topic.py
766+
test/test_topic_pin.py
761767
test/test_topic_request.py
762768
test/test_topic_status.py
763769
test/test_topic_status_request.py

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ from bimdata_api_client.model.self_bcf_user import SelfBcfUser
8484
from bimdata_api_client.model.stage import Stage
8585
from bimdata_api_client.model.stage_request import StageRequest
8686
from bimdata_api_client.model.topic import Topic
87+
from bimdata_api_client.model.topic_pin import TopicPin
8788
from bimdata_api_client.model.topic_request import TopicRequest
8889
from bimdata_api_client.model.topic_status import TopicStatus
8990
from bimdata_api_client.model.topic_status_request import TopicStatusRequest
@@ -204,6 +205,7 @@ Class | Method | HTTP request | Description
204205
*BcfApi* | [**get_topic_document_references**](docs/BcfApi.md#get_topic_document_references) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{guid}/document_references | Get all related documents
205206
*BcfApi* | [**get_topic_viewpoints**](docs/BcfApi.md#get_topic_viewpoints) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/topic-viewpoints | Retrieve all viewpoints attached to the topic
206207
*BcfApi* | [**get_topics**](docs/BcfApi.md#get_topics) | **GET** /bcf/2.1/projects/{projects_pk}/topics | Retrieve all topics
208+
*BcfApi* | [**get_topics_pins**](docs/BcfApi.md#get_topics_pins) | **GET** /bcf/2.1/projects/{projects_pk}/topics/pins | Get pins of all or many topics
207209
*BcfApi* | [**get_user**](docs/BcfApi.md#get_user) | **GET** /bcf/2.1/current-user | Get current user info
208210
*BcfApi* | [**get_versions**](docs/BcfApi.md#get_versions) | **GET** /bcf/versions | Retrieve all supported BCF versions by this API
209211
*BcfApi* | [**get_viewpoin_pin**](docs/BcfApi.md#get_viewpoin_pin) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_guid}/viewpoints/{viewpoints_guid}/pin/{guid} | Retrieve a Pin
@@ -653,6 +655,7 @@ Class | Method | HTTP request | Description
653655
- [PerspectiveCameraRequest](docs/PerspectiveCameraRequest.md)
654656
- [Pin](docs/Pin.md)
655657
- [PinRequest](docs/PinRequest.md)
658+
- [PinWithModels](docs/PinWithModels.md)
656659
- [Point](docs/Point.md)
657660
- [PointRequest](docs/PointRequest.md)
658661
- [PositioningPlan](docs/PositioningPlan.md)
@@ -724,6 +727,7 @@ Class | Method | HTTP request | Description
724727
- [TagIdRequest](docs/TagIdRequest.md)
725728
- [TagRequest](docs/TagRequest.md)
726729
- [Topic](docs/Topic.md)
730+
- [TopicPin](docs/TopicPin.md)
727731
- [TopicRequest](docs/TopicRequest.md)
728732
- [TopicStatus](docs/TopicStatus.md)
729733
- [TopicStatusRequest](docs/TopicStatusRequest.md)

bimdata_api_client/api/bcf_api.py

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
from bimdata_api_client.model.stage import Stage
5555
from bimdata_api_client.model.stage_request import StageRequest
5656
from bimdata_api_client.model.topic import Topic
57+
from bimdata_api_client.model.topic_pin import TopicPin
5758
from bimdata_api_client.model.topic_request import TopicRequest
5859
from bimdata_api_client.model.topic_status import TopicStatus
5960
from bimdata_api_client.model.topic_status_request import TopicStatusRequest
@@ -2991,6 +2992,82 @@ def __init__(self, api_client=None):
29912992
},
29922993
api_client=api_client
29932994
)
2995+
self.get_topics_pins_endpoint = _Endpoint(
2996+
settings={
2997+
'response_type': ([TopicPin],),
2998+
'auth': [
2999+
'ApiKey',
3000+
'BIMData_Connect',
3001+
'BIMData_Connect',
3002+
'Bearer'
3003+
],
3004+
'endpoint_path': '/bcf/2.1/projects/{projects_pk}/topics/pins',
3005+
'operation_id': 'get_topics_pins',
3006+
'http_method': 'GET',
3007+
'servers': None,
3008+
},
3009+
params_map={
3010+
'all': [
3011+
'projects_pk',
3012+
'format',
3013+
'ifcs',
3014+
'models',
3015+
'topics',
3016+
],
3017+
'required': [
3018+
'projects_pk',
3019+
],
3020+
'nullable': [
3021+
],
3022+
'enum': [
3023+
],
3024+
'validation': [
3025+
]
3026+
},
3027+
root_map={
3028+
'validations': {
3029+
},
3030+
'allowed_values': {
3031+
},
3032+
'openapi_types': {
3033+
'projects_pk':
3034+
(int,),
3035+
'format':
3036+
(str,),
3037+
'ifcs':
3038+
([int],),
3039+
'models':
3040+
([int],),
3041+
'topics':
3042+
(str,),
3043+
},
3044+
'attribute_map': {
3045+
'projects_pk': 'projects_pk',
3046+
'format': 'format',
3047+
'ifcs': 'ifcs',
3048+
'models': 'models',
3049+
'topics': 'topics',
3050+
},
3051+
'location_map': {
3052+
'projects_pk': 'path',
3053+
'format': 'query',
3054+
'ifcs': 'query',
3055+
'models': 'query',
3056+
'topics': 'query',
3057+
},
3058+
'collection_format_map': {
3059+
'ifcs': 'multi',
3060+
'models': 'multi',
3061+
}
3062+
},
3063+
headers_map={
3064+
'accept': [
3065+
'application/json'
3066+
],
3067+
'content_type': [],
3068+
},
3069+
api_client=api_client
3070+
)
29943071
self.get_user_endpoint = _Endpoint(
29953072
settings={
29963073
'response_type': (SelfBcfUser,),
@@ -7885,6 +7962,88 @@ def get_topics(
78857962
projects_pk
78867963
return self.get_topics_endpoint.call_with_http_info(**kwargs)
78877964

7965+
def get_topics_pins(
7966+
self,
7967+
projects_pk,
7968+
**kwargs
7969+
):
7970+
"""Get pins of all or many topics # noqa: E501
7971+
7972+
This is not a standard route. Get pins of all or many topics Required scopes: bcf:read # noqa: E501
7973+
This method makes a synchronous HTTP request by default. To make an
7974+
asynchronous HTTP request, please pass async_req=True
7975+
7976+
>>> thread = api.get_topics_pins(projects_pk, async_req=True)
7977+
>>> result = thread.get()
7978+
7979+
Args:
7980+
projects_pk (int):
7981+
7982+
Keyword Args:
7983+
format (str): [optional]
7984+
ifcs ([int]): [optional]
7985+
models ([int]): [optional]
7986+
topics (str): topic guids to include, comma separated. Default = all. [optional]
7987+
_return_http_data_only (bool): response data without head status
7988+
code and headers. Default is True.
7989+
_preload_content (bool): if False, the urllib3.HTTPResponse object
7990+
will be returned without reading/decoding response data.
7991+
Default is True.
7992+
_request_timeout (int/float/tuple): timeout setting for this request. If
7993+
one number provided, it will be total request timeout. It can also
7994+
be a pair (tuple) of (connection, read) timeouts.
7995+
Default is None.
7996+
_check_input_type (bool): specifies if type checking
7997+
should be done one the data sent to the server.
7998+
Default is True.
7999+
_check_return_type (bool): specifies if type checking
8000+
should be done one the data received from the server.
8001+
Default is True.
8002+
_spec_property_naming (bool): True if the variable names in the input data
8003+
are serialized names, as specified in the OpenAPI document.
8004+
False if the variable names in the input data
8005+
are pythonic names, e.g. snake case (default)
8006+
_content_type (str/None): force body content-type.
8007+
Default is None and content-type will be predicted by allowed
8008+
content-types and body.
8009+
_host_index (int/None): specifies the index of the server
8010+
that we want to use.
8011+
Default is read from the configuration.
8012+
async_req (bool): execute request asynchronously
8013+
8014+
Returns:
8015+
[TopicPin]
8016+
If the method is called asynchronously, returns the request
8017+
thread.
8018+
"""
8019+
kwargs['async_req'] = kwargs.get(
8020+
'async_req', False
8021+
)
8022+
kwargs['_return_http_data_only'] = kwargs.get(
8023+
'_return_http_data_only', True
8024+
)
8025+
kwargs['_preload_content'] = kwargs.get(
8026+
'_preload_content', True
8027+
)
8028+
kwargs['_request_timeout'] = kwargs.get(
8029+
'_request_timeout', None
8030+
)
8031+
kwargs['_check_input_type'] = kwargs.get(
8032+
'_check_input_type', True
8033+
)
8034+
kwargs['_check_return_type'] = kwargs.get(
8035+
'_check_return_type', True
8036+
)
8037+
kwargs['_spec_property_naming'] = kwargs.get(
8038+
'_spec_property_naming', False
8039+
)
8040+
kwargs['_content_type'] = kwargs.get(
8041+
'_content_type')
8042+
kwargs['_host_index'] = kwargs.get('_host_index')
8043+
kwargs['projects_pk'] = \
8044+
projects_pk
8045+
return self.get_topics_pins_endpoint.call_with_http_info(**kwargs)
8046+
78888047
def get_user(
78898048
self,
78908049
**kwargs

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8815,7 +8815,7 @@ def create_document(
88158815
):
88168816
"""Create a document # noqa: E501
88178817

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

0 commit comments

Comments
 (0)