-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathget.js
37 lines (29 loc) · 837 Bytes
/
get.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
const BoxCommand = require('../../box-command');
const { Args } = require('@oclif/core');
class FoldersGetCommand extends BoxCommand {
async run() {
const { flags, args } = await this.parse(FoldersGetCommand);
let options = {};
if (flags.fields) {
options.fields = flags.fields;
}
let folder = await this.client.folders.get(args.id, options);
await this.output(folder);
}
}
FoldersGetCommand.description = 'Get information about a folder';
FoldersGetCommand.examples = ['box folders:get 22222'];
FoldersGetCommand._endpoint = 'get_folders_id';
FoldersGetCommand.flags = {
...BoxCommand.flags
};
FoldersGetCommand.args = {
id: Args.string({
name: 'id',
required: true,
hidden: false,
description: 'ID of folder to get; use 0 for the root folder'
})
};
module.exports = FoldersGetCommand;