Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit d6d19b5

Browse files
committed
MINOR: add bcf export
1 parent c41ee76 commit d6d19b5

File tree

4 files changed

+110
-0
lines changed

4 files changed

+110
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Class | Method | HTTP request | Description
142142
*bimdata.BcfApi* | [**deleteTopic**](docs/BcfApi.md#deleteTopic) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{guid} |
143143
*bimdata.BcfApi* | [**deleteViewpoint**](docs/BcfApi.md#deleteViewpoint) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{guid} |
144144
*bimdata.BcfApi* | [**deleteVisibility**](docs/BcfApi.md#deleteVisibility) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/visibility/{id} |
145+
*bimdata.BcfApi* | [**downloadBcfExport**](docs/BcfApi.md#downloadBcfExport) | **GET** /bcf/2.1/projects/{id}/export |
145146
*bimdata.BcfApi* | [**fullUpdateBcfProject**](docs/BcfApi.md#fullUpdateBcfProject) | **PUT** /bcf/2.1/projects/{id} |
146147
*bimdata.BcfApi* | [**fullUpdateColoring**](docs/BcfApi.md#fullUpdateColoring) | **PUT** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/coloring/{id} |
147148
*bimdata.BcfApi* | [**fullUpdateComment**](docs/BcfApi.md#fullUpdateComment) | **PUT** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/comments/{guid} |

docs/BcfApi.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Method | HTTP request | Description
1717
[**deleteTopic**](BcfApi.md#deleteTopic) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{guid} |
1818
[**deleteViewpoint**](BcfApi.md#deleteViewpoint) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{guid} |
1919
[**deleteVisibility**](BcfApi.md#deleteVisibility) | **DELETE** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/visibility/{id} |
20+
[**downloadBcfExport**](BcfApi.md#downloadBcfExport) | **GET** /bcf/2.1/projects/{id}/export |
2021
[**fullUpdateBcfProject**](BcfApi.md#fullUpdateBcfProject) | **PUT** /bcf/2.1/projects/{id} |
2122
[**fullUpdateColoring**](BcfApi.md#fullUpdateColoring) | **PUT** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/coloring/{id} |
2223
[**fullUpdateComment**](BcfApi.md#fullUpdateComment) | **PUT** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/comments/{guid} |
@@ -694,6 +695,53 @@ null (empty response body)
694695

695696
[Bearer](../README.md#Bearer)
696697

698+
### HTTP request headers
699+
700+
- **Content-Type**: Not defined
701+
- **Accept**: Not defined
702+
703+
<a name="downloadBcfExport"></a>
704+
# **downloadBcfExport**
705+
> downloadBcfExport(id)
706+
707+
708+
709+
export project&#39;s topics in bcf-xml format
710+
711+
### Example
712+
```javascript
713+
var bimdata = require('@bimdata/bimdata-api-client');
714+
var defaultClient = bimdata.ApiClient.instance;
715+
// Configure API key authorization: Bearer
716+
var Bearer = defaultClient.authentications['Bearer'];
717+
Bearer.apiKey = 'YOUR API KEY';
718+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
719+
//Bearer.apiKeyPrefix = 'Token';
720+
721+
var apiInstance = new bimdata.BcfApi();
722+
var id = 56; // Number | A unique integer value identifying this project.
723+
apiInstance.downloadBcfExport(id).then(function() {
724+
console.log('API called successfully.');
725+
}, function(error) {
726+
console.error(error);
727+
});
728+
729+
```
730+
731+
### Parameters
732+
733+
Name | Type | Description | Notes
734+
------------- | ------------- | ------------- | -------------
735+
**id** | **Number**| A unique integer value identifying this project. |
736+
737+
### Return type
738+
739+
null (empty response body)
740+
741+
### Authorization
742+
743+
[Bearer](../README.md#Bearer)
744+
697745
### HTTP request headers
698746

699747
- **Content-Type**: Not defined

src/api/BcfApi.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,57 @@
911911
}
912912

913913

914+
/**
915+
* export project&#39;s topics in bcf-xml format
916+
* @param {Number} id A unique integer value identifying this project.
917+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
918+
*/
919+
this.downloadBcfExportWithHttpInfo = function(id) {
920+
var postBody = null;
921+
922+
// verify the required parameter 'id' is set
923+
if (id === undefined || id === null) {
924+
throw new Error("Missing the required parameter 'id' when calling downloadBcfExport");
925+
}
926+
927+
928+
var pathParams = {
929+
'id': id
930+
};
931+
var queryParams = {
932+
};
933+
var collectionQueryParams = {
934+
};
935+
var headerParams = {
936+
};
937+
var formParams = {
938+
};
939+
940+
var authNames = ['Bearer'];
941+
var contentTypes = [];
942+
var accepts = [];
943+
var returnType = null;
944+
945+
return this.apiClient.callApi(
946+
'/bcf/2.1/projects/{id}/export', 'GET',
947+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
948+
authNames, contentTypes, accepts, returnType
949+
);
950+
}
951+
952+
/**
953+
* export project&#39;s topics in bcf-xml format
954+
* @param {Number} id A unique integer value identifying this project.
955+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
956+
*/
957+
this.downloadBcfExport = function(id) {
958+
return this.downloadBcfExportWithHttpInfo(id)
959+
.then(function(response_and_data) {
960+
return response_and_data.data;
961+
});
962+
}
963+
964+
914965
/**
915966
* @param {Number} id A unique integer value identifying this project.
916967
* @param {module:model/BcfProject} bcfProject

test/api/BcfApi.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,16 @@
181181
done();
182182
});
183183
});
184+
describe('downloadBcfExport', function() {
185+
it('should call downloadBcfExport successfully', function(done) {
186+
//uncomment below and update the code to test downloadBcfExport
187+
//instance.downloadBcfExport(function(error) {
188+
// if (error) throw error;
189+
//expect().to.be();
190+
//});
191+
done();
192+
});
193+
});
184194
describe('fullUpdateBcfProject', function() {
185195
it('should call fullUpdateBcfProject successfully', function(done) {
186196
//uncomment below and update the code to test fullUpdateBcfProject

0 commit comments

Comments
 (0)