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

Commit 2f15933

Browse files
committed
MINOR: allow cloud deletion
1 parent 1a8ba1a commit 2f15933

File tree

4 files changed

+106
-0
lines changed

4 files changed

+106
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ Class | Method | HTTP request | Description
220220
*bimdata.CloudApi* | [**cloudInvite**](docs/CloudApi.md#cloudInvite) | **POST** /cloud/{id}/invite |
221221
*bimdata.CloudApi* | [**createCloud**](docs/CloudApi.md#createCloud) | **POST** /cloud |
222222
*bimdata.CloudApi* | [**createDemo**](docs/CloudApi.md#createDemo) | **POST** /cloud/{id}/create-demo |
223+
*bimdata.CloudApi* | [**deleteCloud**](docs/CloudApi.md#deleteCloud) | **DELETE** /cloud/{id} |
223224
*bimdata.CloudApi* | [**deleteCloudUser**](docs/CloudApi.md#deleteCloudUser) | **DELETE** /cloud/{cloud_pk}/user/{id} |
224225
*bimdata.CloudApi* | [**fullUpdateCloud**](docs/CloudApi.md#fullUpdateCloud) | **PUT** /cloud/{id} |
225226
*bimdata.CloudApi* | [**fullUpdateCloudUser**](docs/CloudApi.md#fullUpdateCloudUser) | **PUT** /cloud/{cloud_pk}/user/{id} |

docs/CloudApi.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Method | HTTP request | Description
77
[**cloudInvite**](CloudApi.md#cloudInvite) | **POST** /cloud/{id}/invite |
88
[**createCloud**](CloudApi.md#createCloud) | **POST** /cloud |
99
[**createDemo**](CloudApi.md#createDemo) | **POST** /cloud/{id}/create-demo |
10+
[**deleteCloud**](CloudApi.md#deleteCloud) | **DELETE** /cloud/{id} |
1011
[**deleteCloudUser**](CloudApi.md#deleteCloudUser) | **DELETE** /cloud/{cloud_pk}/user/{id} |
1112
[**fullUpdateCloud**](CloudApi.md#fullUpdateCloud) | **PUT** /cloud/{id} |
1213
[**fullUpdateCloudUser**](CloudApi.md#fullUpdateCloudUser) | **PUT** /cloud/{cloud_pk}/user/{id} |
@@ -160,6 +161,51 @@ Name | Type | Description | Notes
160161
- **Content-Type**: Not defined
161162
- **Accept**: application/json
162163

164+
<a name="deleteCloud"></a>
165+
# **deleteCloud**
166+
> deleteCloud(id)
167+
168+
169+
170+
### Example
171+
```javascript
172+
var bimdata = require('@bimdata/bimdata-api-client');
173+
var defaultClient = bimdata.ApiClient.instance;
174+
// Configure API key authorization: Bearer
175+
var Bearer = defaultClient.authentications['Bearer'];
176+
Bearer.apiKey = 'YOUR API KEY';
177+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
178+
//Bearer.apiKeyPrefix = 'Token';
179+
180+
var apiInstance = new bimdata.CloudApi();
181+
var id = 56; // Number | A unique integer value identifying this cloud.
182+
apiInstance.deleteCloud(id).then(function() {
183+
console.log('API called successfully.');
184+
}, function(error) {
185+
console.error(error);
186+
});
187+
188+
```
189+
190+
### Parameters
191+
192+
Name | Type | Description | Notes
193+
------------- | ------------- | ------------- | -------------
194+
**id** | **Number**| A unique integer value identifying this cloud. |
195+
196+
### Return type
197+
198+
null (empty response body)
199+
200+
### Authorization
201+
202+
[Bearer](../README.md#Bearer)
203+
204+
### HTTP request headers
205+
206+
- **Content-Type**: Not defined
207+
- **Accept**: Not defined
208+
163209
<a name="deleteCloudUser"></a>
164210
# **deleteCloudUser**
165211
> deleteCloudUser(cloudPk, id)

src/api/CloudApi.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,55 @@
206206
}
207207

208208

209+
/**
210+
* @param {Number} id A unique integer value identifying this cloud.
211+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
212+
*/
213+
this.deleteCloudWithHttpInfo = function(id) {
214+
var postBody = null;
215+
216+
// verify the required parameter 'id' is set
217+
if (id === undefined || id === null) {
218+
throw new Error("Missing the required parameter 'id' when calling deleteCloud");
219+
}
220+
221+
222+
var pathParams = {
223+
'id': id
224+
};
225+
var queryParams = {
226+
};
227+
var collectionQueryParams = {
228+
};
229+
var headerParams = {
230+
};
231+
var formParams = {
232+
};
233+
234+
var authNames = ['Bearer'];
235+
var contentTypes = [];
236+
var accepts = [];
237+
var returnType = null;
238+
239+
return this.apiClient.callApi(
240+
'/cloud/{id}', 'DELETE',
241+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
242+
authNames, contentTypes, accepts, returnType
243+
);
244+
}
245+
246+
/**
247+
* @param {Number} id A unique integer value identifying this cloud.
248+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
249+
*/
250+
this.deleteCloud = function(id) {
251+
return this.deleteCloudWithHttpInfo(id)
252+
.then(function(response_and_data) {
253+
return response_and_data.data;
254+
});
255+
}
256+
257+
209258
/**
210259
* @param {String} cloudPk
211260
* @param {String} id

test/api/CloudApi.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@
8181
done();
8282
});
8383
});
84+
describe('deleteCloud', function() {
85+
it('should call deleteCloud successfully', function(done) {
86+
//uncomment below and update the code to test deleteCloud
87+
//instance.deleteCloud(function(error) {
88+
// if (error) throw error;
89+
//expect().to.be();
90+
//});
91+
done();
92+
});
93+
});
8494
describe('deleteCloudUser', function() {
8595
it('should call deleteCloudUser successfully', function(done) {
8696
//uncomment below and update the code to test deleteCloudUser

0 commit comments

Comments
 (0)