Skip to content

Commit

Permalink
Add Client#listDeployments
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Aug 11, 2015
1 parent 4b8c6e7 commit 5937c80
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 5937c80

Please sign in to comment.