diff --git a/src/client.js b/src/client.js index 5fa7c22..73cf728 100644 --- a/src/client.js +++ b/src/client.js @@ -169,6 +169,16 @@ export default class Client { return this.findResourceByPath({ path: '/', restapiId: restapiId }); } + /** + * @param {String} restapiId + * @return {Promise} + */ + listDeployments({ restapiId }) { + return this.getFetcher().get( + `${this._getBaseUrl()}/restapis/${restapiId}/deployments` + ).then(body => body.item.map(source => new Deployment(source))); + } + /** * @param {String} restapiId * @return {Promise}