-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathget.js
38 lines (29 loc) · 936 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
38
'use strict';
const BoxCommand = require('../../../box-command');
class TaskAssignmentsGetCommand extends BoxCommand {
async run() {
const { flags, args } = this.parse(TaskAssignmentsGetCommand);
let options = {};
if (flags.fields) {
options.fields = flags.fields;
}
let assignment = await this.client.tasks.getAssignment(args.id, options);
await this.output(assignment);
}
}
TaskAssignmentsGetCommand.aliases = [ 'task-assignments:get' ];
TaskAssignmentsGetCommand.description = 'Get information about a task assignment';
TaskAssignmentsGetCommand.examples = ['box tasks:assignments:get 12345'];
TaskAssignmentsGetCommand._endpoint = 'get_task_assignments_id';
TaskAssignmentsGetCommand.flags = {
...BoxCommand.flags
};
TaskAssignmentsGetCommand.args = [
{
name: 'id',
required: true,
hidden: false,
description: 'ID of the task assignment to get',
}
];
module.exports = TaskAssignmentsGetCommand;