-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathindex.js
39 lines (30 loc) · 1.08 KB
/
index.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
38
39
'use strict';
const BoxCommand = require('../../../box-command');
const { Args } = require('@oclif/core');
class FoldersCollaborationsListCommand extends BoxCommand {
async run() {
const { flags, args } = await this.parse(FoldersCollaborationsListCommand);
let options = {};
if (flags.fields) {
options.fields = flags.fields;
}
let collaborations = await this.client.folders.getCollaborations(args.id, options);
await this.output(collaborations);
}
}
FoldersCollaborationsListCommand.aliases = [ 'folders:collaborations:list' ];
FoldersCollaborationsListCommand.description = 'List all collaborations on a folder';
FoldersCollaborationsListCommand.examples = ['box folders:collaborations 22222'];
FoldersCollaborationsListCommand._endpoint = 'get_folders_id_collaborations';
FoldersCollaborationsListCommand.flags = {
...BoxCommand.flags,
};
FoldersCollaborationsListCommand.args = {
id: Args.string({
name: 'id',
required: true,
hidden: false,
description: 'ID of the folder to get the collaborations on',
})
};
module.exports = FoldersCollaborationsListCommand;