cloudcms-cli
Version:
Cloud CMS Command-Line client
51 lines (47 loc) • 1.76 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class DownloadApplicationApiKeysCommand extends AbstractCommand
{
constructor()
{
super({
"group": "application",
"name": "download-api-keys",
"description": "Download the API Keys for an application deployment",
"schema": {
"properties": [{
"name": "applicationId",
"type": "string",
"description": "Enter the application ID:",
"helper": "The ID of the application where the branch lives",
"required": true,
"args": ["application", "app", "a"]
}, {
"name": "deploymentKey",
"type": "string",
"description": "Enter the deployment key:",
"helper": "The deployment key",
"required": false,
"default": "default",
"args": ["deployment", "d"]
}, {
"name": "out",
"type": "string",
"description": "Enter the output file path:",
"helper": "The output file path",
"required": false,
"default": "gitana.json",
"args": ["out", "o"]
}]
}
});
}
handle(options, callback)
{
// call workhorse function
helper.downloadApplicationApiKeys(options.applicationId, options.deploymentKey, options.out, function(err) {
callback(err);
});
}
}
module.exports = DownloadApplicationApiKeysCommand;