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

Commit 29761d3

Browse files
committed
MINOR: add bcf route
1 parent 5d09e66 commit 29761d3

File tree

7 files changed

+130
-0
lines changed

7 files changed

+130
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ Class | Method | HTTP request | Description
163163
*bimdata.BcfApi* | [**getSelections**](docs/BcfApi.md#getSelections) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection |
164164
*bimdata.BcfApi* | [**getSnapshot**](docs/BcfApi.md#getSnapshot) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/snapshot |
165165
*bimdata.BcfApi* | [**getTopic**](docs/BcfApi.md#getTopic) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{guid} |
166+
*bimdata.BcfApi* | [**getTopicViewpoints**](docs/BcfApi.md#getTopicViewpoints) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/topic-viewpoints |
166167
*bimdata.BcfApi* | [**getTopics**](docs/BcfApi.md#getTopics) | **GET** /bcf/2.1/projects/{projects_pk}/topics |
167168
*bimdata.BcfApi* | [**getUser**](docs/BcfApi.md#getUser) | **GET** /bcf/2.1/current-user |
168169
*bimdata.BcfApi* | [**getViewpoint**](docs/BcfApi.md#getViewpoint) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{guid} |

docs/BcfApi.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Method | HTTP request | Description
3838
[**getSelections**](BcfApi.md#getSelections) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/selection |
3939
[**getSnapshot**](BcfApi.md#getSnapshot) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{viewpoints_pk}/snapshot |
4040
[**getTopic**](BcfApi.md#getTopic) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{guid} |
41+
[**getTopicViewpoints**](BcfApi.md#getTopicViewpoints) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/topic-viewpoints |
4142
[**getTopics**](BcfApi.md#getTopics) | **GET** /bcf/2.1/projects/{projects_pk}/topics |
4243
[**getUser**](BcfApi.md#getUser) | **GET** /bcf/2.1/current-user |
4344
[**getViewpoint**](BcfApi.md#getViewpoint) | **GET** /bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/viewpoints/{guid} |
@@ -1721,6 +1722,53 @@ Name | Type | Description | Notes
17211722

17221723
[Bearer](../README.md#Bearer)
17231724

1725+
### HTTP request headers
1726+
1727+
- **Content-Type**: Not defined
1728+
- **Accept**: application/json
1729+
1730+
<a name="getTopicViewpoints"></a>
1731+
# **getTopicViewpoints**
1732+
> [Viewpoint] getTopicViewpoints(projectsPk, topicsPk)
1733+
1734+
1735+
1736+
### Example
1737+
```javascript
1738+
var bimdata = require('@bimdata/bimdata-api-client');
1739+
var defaultClient = bimdata.ApiClient.instance;
1740+
// Configure API key authorization: Bearer
1741+
var Bearer = defaultClient.authentications['Bearer'];
1742+
Bearer.apiKey = 'YOUR API KEY';
1743+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
1744+
//Bearer.apiKeyPrefix = 'Token';
1745+
1746+
var apiInstance = new bimdata.BcfApi();
1747+
var projectsPk = "projectsPk_example"; // String |
1748+
var topicsPk = "topicsPk_example"; // String |
1749+
apiInstance.getTopicViewpoints(projectsPk, topicsPk).then(function(data) {
1750+
console.log('API called successfully. Returned data: ' + data);
1751+
}, function(error) {
1752+
console.error(error);
1753+
});
1754+
1755+
```
1756+
1757+
### Parameters
1758+
1759+
Name | Type | Description | Notes
1760+
------------- | ------------- | ------------- | -------------
1761+
**projectsPk** | **String**| |
1762+
**topicsPk** | **String**| |
1763+
1764+
### Return type
1765+
1766+
[**[Viewpoint]**](Viewpoint.md)
1767+
1768+
### Authorization
1769+
1770+
[Bearer](../README.md#Bearer)
1771+
17241772
### HTTP request headers
17251773

17261774
- **Content-Type**: Not defined

docs/Feature.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**name** | **String** | |
7+
**viewerUrl** | **String** | | [optional]
78

89

src/api/BcfApi.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,6 +2255,63 @@
22552255
}
22562256

22572257

2258+
/**
2259+
* @param {String} projectsPk
2260+
* @param {String} topicsPk
2261+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/Viewpoint>} and HTTP response
2262+
*/
2263+
this.getTopicViewpointsWithHttpInfo = function(projectsPk, topicsPk) {
2264+
var postBody = null;
2265+
2266+
// verify the required parameter 'projectsPk' is set
2267+
if (projectsPk === undefined || projectsPk === null) {
2268+
throw new Error("Missing the required parameter 'projectsPk' when calling getTopicViewpoints");
2269+
}
2270+
2271+
// verify the required parameter 'topicsPk' is set
2272+
if (topicsPk === undefined || topicsPk === null) {
2273+
throw new Error("Missing the required parameter 'topicsPk' when calling getTopicViewpoints");
2274+
}
2275+
2276+
2277+
var pathParams = {
2278+
'projects_pk': projectsPk,
2279+
'topics_pk': topicsPk
2280+
};
2281+
var queryParams = {
2282+
};
2283+
var collectionQueryParams = {
2284+
};
2285+
var headerParams = {
2286+
};
2287+
var formParams = {
2288+
};
2289+
2290+
var authNames = ['Bearer'];
2291+
var contentTypes = [];
2292+
var accepts = ['application/json'];
2293+
var returnType = [Viewpoint];
2294+
2295+
return this.apiClient.callApi(
2296+
'/bcf/2.1/projects/{projects_pk}/topics/{topics_pk}/topic-viewpoints', 'GET',
2297+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
2298+
authNames, contentTypes, accepts, returnType
2299+
);
2300+
}
2301+
2302+
/**
2303+
* @param {String} projectsPk
2304+
* @param {String} topicsPk
2305+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Viewpoint>}
2306+
*/
2307+
this.getTopicViewpoints = function(projectsPk, topicsPk) {
2308+
return this.getTopicViewpointsWithHttpInfo(projectsPk, topicsPk)
2309+
.then(function(response_and_data) {
2310+
return response_and_data.data;
2311+
});
2312+
}
2313+
2314+
22582315
/**
22592316
* @param {String} projectsPk
22602317
* @param {Object} opts Optional parameters

src/model/Feature.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
if (data.hasOwnProperty('name')) {
6565
obj['name'] = ApiClient.convertToType(data['name'], 'String');
6666
}
67+
if (data.hasOwnProperty('viewer_url')) {
68+
obj['viewer_url'] = ApiClient.convertToType(data['viewer_url'], 'String');
69+
}
6770
}
6871
return obj;
6972
}
@@ -72,6 +75,10 @@
7275
* @member {String} name
7376
*/
7477
exports.prototype['name'] = undefined;
78+
/**
79+
* @member {String} viewer_url
80+
*/
81+
exports.prototype['viewer_url'] = undefined;
7582

7683

7784

test/api/BcfApi.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,16 @@
391391
done();
392392
});
393393
});
394+
describe('getTopicViewpoints', function() {
395+
it('should call getTopicViewpoints successfully', function(done) {
396+
//uncomment below and update the code to test getTopicViewpoints
397+
//instance.getTopicViewpoints(function(error) {
398+
// if (error) throw error;
399+
//expect().to.be();
400+
//});
401+
done();
402+
});
403+
});
394404
describe('getTopics', function() {
395405
it('should call getTopics successfully', function(done) {
396406
//uncomment below and update the code to test getTopics

test/model/Feature.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@
6363
//expect(instance).to.be();
6464
});
6565

66+
it('should have the property viewerUrl (base name: "viewer_url")', function() {
67+
// uncomment below and update the code to test the property viewerUrl
68+
//var instance = new bimdata.Feature();
69+
//expect(instance).to.be();
70+
});
71+
6672
});
6773

6874
}));

0 commit comments

Comments
 (0)