diff --git a/docs/KeyApi.md b/docs/KeyApi.md index 6b009ae..82a0984 100644 --- a/docs/KeyApi.md +++ b/docs/KeyApi.md @@ -63,7 +63,7 @@ Name | Type | Description | Notes ## deleteKey -> deleteKey(accessKey) +> deleteKey(id) Delete a key @@ -79,8 +79,8 @@ let bearerAuth = defaultClient.authentications['bearerAuth']; bearerAuth.accessToken = "YOUR ACCESS TOKEN" let apiInstance = new garage.KeyApi(); -let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage -apiInstance.deleteKey(accessKey).then(() => { +let id = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage +apiInstance.deleteKey(id).then(() => { console.log('API called successfully.'); }, (error) => { console.error(error); @@ -93,7 +93,7 @@ apiInstance.deleteKey(accessKey).then(() => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **accessKey** | **String**| The exact API access key generated by Garage | + **id** | **String**| The exact API access key generated by Garage | ### Return type @@ -257,7 +257,7 @@ This endpoint does not need any parameter. ## updateKey -> KeyInfo updateKey(accessKey, updateKeyRequest) +> KeyInfo updateKey(id, updateKeyRequest) Update a key @@ -273,9 +273,9 @@ let bearerAuth = defaultClient.authentications['bearerAuth']; bearerAuth.accessToken = "YOUR ACCESS TOKEN" let apiInstance = new garage.KeyApi(); -let accessKey = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage +let id = GK31c2f218a2e44f485b94239e; // String | The exact API access key generated by Garage let updateKeyRequest = new garage.UpdateKeyRequest(); // UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove -apiInstance.updateKey(accessKey, updateKeyRequest).then((data) => { +apiInstance.updateKey(id, updateKeyRequest).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); @@ -288,7 +288,7 @@ apiInstance.updateKey(accessKey, updateKeyRequest).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **accessKey** | **String**| The exact API access key generated by Garage | + **id** | **String**| The exact API access key generated by Garage | **updateKeyRequest** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | ### Return type diff --git a/src/api/KeyApi.js b/src/api/KeyApi.js index 1c90d6a..c7e48af 100644 --- a/src/api/KeyApi.js +++ b/src/api/KeyApi.js @@ -89,20 +89,20 @@ export default class KeyApi { /** * Delete a key * Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. - * @param {String} accessKey The exact API access key generated by Garage + * @param {String} id The exact API access key generated by Garage * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ - deleteKeyWithHttpInfo(accessKey) { + deleteKeyWithHttpInfo(id) { let postBody = null; - // verify the required parameter 'accessKey' is set - if (accessKey === undefined || accessKey === null) { - throw new Error("Missing the required parameter 'accessKey' when calling deleteKey"); + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling deleteKey"); } let pathParams = { - 'access_key': accessKey }; let queryParams = { + 'id': id }; let headerParams = { }; @@ -123,11 +123,11 @@ export default class KeyApi { /** * Delete a key * Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. - * @param {String} accessKey The exact API access key generated by Garage + * @param {String} id The exact API access key generated by Garage * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ - deleteKey(accessKey) { - return this.deleteKeyWithHttpInfo(accessKey) + deleteKey(id) { + return this.deleteKeyWithHttpInfo(id) .then(function(response_and_data) { return response_and_data.data; }); @@ -278,15 +278,15 @@ export default class KeyApi { /** * Update a key * Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.* - * @param {String} accessKey The exact API access key generated by Garage + * @param {String} id The exact API access key generated by Garage * @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/KeyInfo} and HTTP response */ - updateKeyWithHttpInfo(accessKey, updateKeyRequest) { + updateKeyWithHttpInfo(id, updateKeyRequest) { let postBody = updateKeyRequest; - // verify the required parameter 'accessKey' is set - if (accessKey === undefined || accessKey === null) { - throw new Error("Missing the required parameter 'accessKey' when calling updateKey"); + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling updateKey"); } // verify the required parameter 'updateKeyRequest' is set if (updateKeyRequest === undefined || updateKeyRequest === null) { @@ -294,9 +294,9 @@ export default class KeyApi { } let pathParams = { - 'access_key': accessKey }; let queryParams = { + 'id': id }; let headerParams = { }; @@ -317,12 +317,12 @@ export default class KeyApi { /** * Update a key * Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.* - * @param {String} accessKey The exact API access key generated by Garage + * @param {String} id The exact API access key generated by Garage * @param {module:model/UpdateKeyRequest} updateKeyRequest For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/KeyInfo} */ - updateKey(accessKey, updateKeyRequest) { - return this.updateKeyWithHttpInfo(accessKey, updateKeyRequest) + updateKey(id, updateKeyRequest) { + return this.updateKeyWithHttpInfo(id, updateKeyRequest) .then(function(response_and_data) { return response_and_data.data; });