clistyle: some CR on marsell's commit 1dfac84
This commit is contained in:
parent
e21635eaa3
commit
a05de11fb3
@ -375,7 +375,7 @@ CloudApi.prototype.listKeys = function listKeys(opts, cb) {
|
|||||||
* 'fingerprint' or 'name' is required.
|
* 'fingerprint' or 'name' is required.
|
||||||
* - {String} name (required*) The SSH key name. One of 'fingerprint'
|
* - {String} name (required*) The SSH key name. One of 'fingerprint'
|
||||||
* or 'name' is required.
|
* or 'name' is required.
|
||||||
* @param {Function} callback of the form `function (err, res)`
|
* @param {Function} callback of the form `function (err, body, res)`
|
||||||
*/
|
*/
|
||||||
CloudApi.prototype.getKey = function getKey(opts, cb) {
|
CloudApi.prototype.getKey = function getKey(opts, cb) {
|
||||||
assert.object(opts, 'opts');
|
assert.object(opts, 'opts');
|
||||||
@ -384,7 +384,7 @@ CloudApi.prototype.getKey = function getKey(opts, cb) {
|
|||||||
assert.func(cb, 'cb');
|
assert.func(cb, 'cb');
|
||||||
|
|
||||||
var identifier = opts.fingerprint || opts.name;
|
var identifier = opts.fingerprint || opts.name;
|
||||||
assert.ok(identifier, 'one of "fingerprint" or "name" is require');
|
assert.ok(identifier, 'one of "fingerprint" or "name" is required');
|
||||||
|
|
||||||
var endpoint = format('/%s/keys/%s', this.account,
|
var endpoint = format('/%s/keys/%s', this.account,
|
||||||
encodeURIComponent(identifier));
|
encodeURIComponent(identifier));
|
||||||
@ -399,7 +399,7 @@ CloudApi.prototype.getKey = function getKey(opts, cb) {
|
|||||||
* - {String} key (required) The SSH public key content.
|
* - {String} key (required) The SSH public key content.
|
||||||
* - {String} name (optional) A name for the key. If not given, the
|
* - {String} name (optional) A name for the key. If not given, the
|
||||||
* key fingerprint will be used.
|
* key fingerprint will be used.
|
||||||
* @param {Function} callback of the form `function (err, res)`
|
* @param {Function} callback of the form `function (err, key, res)`
|
||||||
*/
|
*/
|
||||||
CloudApi.prototype.createKey = function createKey(opts, cb) {
|
CloudApi.prototype.createKey = function createKey(opts, cb) {
|
||||||
assert.object(opts, 'opts');
|
assert.object(opts, 'opts');
|
||||||
@ -439,7 +439,7 @@ CloudApi.prototype.deleteKey = function deleteKey(opts, cb) {
|
|||||||
assert.func(cb, 'cb');
|
assert.func(cb, 'cb');
|
||||||
|
|
||||||
var identifier = opts.fingerprint || opts.name;
|
var identifier = opts.fingerprint || opts.name;
|
||||||
assert.ok(identifier, 'one of "fingerprint" or "name" is require');
|
assert.ok(identifier, 'one of "fingerprint" or "name" is required');
|
||||||
|
|
||||||
this._request({
|
this._request({
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
@ -950,7 +950,7 @@ CloudApi.prototype.getUserKey = function getUserKey(opts, cb) {
|
|||||||
assert.optionalString(opts.fingerprint, 'opts.fingerprint');
|
assert.optionalString(opts.fingerprint, 'opts.fingerprint');
|
||||||
assert.optionalString(opts.name, 'opts.name');
|
assert.optionalString(opts.name, 'opts.name');
|
||||||
assert.ok(opts.fingerprint || opts.name,
|
assert.ok(opts.fingerprint || opts.name,
|
||||||
'one of "fingerprint" or "name" is require');
|
'one of "fingerprint" or "name" is required');
|
||||||
assert.func(cb, 'cb');
|
assert.func(cb, 'cb');
|
||||||
|
|
||||||
var endpoint = format('/%s/users/%s/keys/%s', this.account, opts.userId,
|
var endpoint = format('/%s/users/%s/keys/%s', this.account, opts.userId,
|
||||||
@ -1008,7 +1008,7 @@ CloudApi.prototype.deleteUserKey = function deleteUserKey(opts, cb) {
|
|||||||
assert.optionalString(opts.fingerprint, 'opts.fingerprint');
|
assert.optionalString(opts.fingerprint, 'opts.fingerprint');
|
||||||
assert.optionalString(opts.name, 'opts.name');
|
assert.optionalString(opts.name, 'opts.name');
|
||||||
assert.ok(opts.fingerprint || opts.name,
|
assert.ok(opts.fingerprint || opts.name,
|
||||||
'one of "fingerprint" or "name" is require');
|
'one of "fingerprint" or "name" is required');
|
||||||
assert.func(cb, 'cb');
|
assert.func(cb, 'cb');
|
||||||
|
|
||||||
this._request({
|
this._request({
|
||||||
|
@ -129,7 +129,7 @@ do_add.help = [
|
|||||||
'Add an SSH key to an account.',
|
'Add an SSH key to an account.',
|
||||||
'',
|
'',
|
||||||
'Usage:',
|
'Usage:',
|
||||||
' {{name}} key add FILE [<options>]',
|
' {{name}} add [<options>] FILE',
|
||||||
'',
|
'',
|
||||||
'{{options}}',
|
'{{options}}',
|
||||||
'',
|
'',
|
||||||
|
@ -108,7 +108,7 @@ do_delete.help = [
|
|||||||
'Remove an SSH key from an account.',
|
'Remove an SSH key from an account.',
|
||||||
'',
|
'',
|
||||||
'Usage:',
|
'Usage:',
|
||||||
' {{name}} key delete FILE [<options>]',
|
' {{name}} delete [<options>] FILE',
|
||||||
'',
|
'',
|
||||||
'{{options}}',
|
'{{options}}',
|
||||||
'',
|
'',
|
||||||
|
@ -71,7 +71,7 @@ do_get.help = [
|
|||||||
'Show a specific SSH key in an account.',
|
'Show a specific SSH key in an account.',
|
||||||
'',
|
'',
|
||||||
'Usage:',
|
'Usage:',
|
||||||
' {{name}} key get KEY # show account\'s KEY',
|
' {{name}} get KEY',
|
||||||
'',
|
'',
|
||||||
'{{options}}',
|
'{{options}}',
|
||||||
'Where "KEY" is an SSH key "name" or "fingerprint".'
|
'Where "KEY" is an SSH key "name" or "fingerprint".'
|
||||||
|
@ -65,7 +65,7 @@ do_list.help = [
|
|||||||
'Show all of an account\'s SSH keys.',
|
'Show all of an account\'s SSH keys.',
|
||||||
'',
|
'',
|
||||||
'Usage:',
|
'Usage:',
|
||||||
' {{name}} key list [<options>]',
|
' {{name}} list [<options>]',
|
||||||
'',
|
'',
|
||||||
'{{options}}',
|
'{{options}}',
|
||||||
'',
|
'',
|
||||||
|
Reference in New Issue
Block a user