Skip to content

Commit

Permalink
docs: Add examples to file/folder metadata commands (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
arjankowski authored Sep 12, 2024
1 parent 0ed1618 commit c7298e4
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
8 changes: 6 additions & 2 deletions docs/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,10 @@ OPTIONS
ALIASES
$ box files:metadata:create
EXAMPLE
EXAMPLES
box files:metadata:add 11111 --template-key employeeRecord --data "name=John Doe" --data department=Sales
box files:metadata:add 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data
"multiselectkey2=[option2A]"
```

_See code: [src/commands/files/metadata/add.js](https://github.com/box/boxcli/blob/v3.15.0/src/commands/files/metadata/add.js)_
Expand Down Expand Up @@ -554,8 +556,10 @@ OPTIONS
--template-key=template-key (required) The key of the metadata template to use
EXAMPLE
EXAMPLES
box files:metadata:set 11111 --template-key employeeRecord --data "name=John Doe" --data department=Sales
box files:metadata:set 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data
"multiselectkey2=[option2A]"
```

_See code: [src/commands/files/metadata/set.js](https://github.com/box/boxcli/blob/v3.15.0/src/commands/files/metadata/set.js)_
Expand Down
8 changes: 6 additions & 2 deletions docs/folders.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,10 @@ OPTIONS
ALIASES
$ box folders:metadata:create
EXAMPLE
EXAMPLES
box folders:metadata:add 22222 --template-key employeeRecord --data "name=John Doe" --data department=Sales
box folders:metadata:add 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data
"multiselectkey2=[option2A]"
```

_See code: [src/commands/folders/metadata/add.js](https://github.com/box/boxcli/blob/v3.15.0/src/commands/folders/metadata/add.js)_
Expand Down Expand Up @@ -641,8 +643,10 @@ OPTIONS
--template-key=template-key (required) The key of the metadata template to use
EXAMPLE
EXAMPLES
box folders:metadata:set 22222 --template-key employeeRecord --data "name=John Doe" --data department=Sales
box folders:metadata:set 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data
"multiselectkey2=[option2A]"
```

_See code: [src/commands/folders/metadata/set.js](https://github.com/box/boxcli/blob/v3.15.0/src/commands/folders/metadata/set.js)_
Expand Down
1 change: 1 addition & 0 deletions src/commands/ai/text-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class AiTextGenCommand extends BoxCommand {
}
options.prompt = flags.prompt;
options.items = flags.items;

let answer = await this.client.ai.textGen({
prompt: options.prompt,
items: options.items,
Expand Down
5 changes: 4 additions & 1 deletion src/commands/files/metadata/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class FilesCreateMetadataCommand extends BoxCommand {
FilesCreateMetadataCommand.aliases = [ 'files:metadata:create' ];

FilesCreateMetadataCommand.description = 'Add metadata to a file';
FilesCreateMetadataCommand.examples = ['box files:metadata:add 11111 --template-key employeeRecord --data "name=John Doe" --data department=Sales'];
FilesCreateMetadataCommand.examples = [
'box files:metadata:add 11111 --template-key employeeRecord --data "name=John Doe" --data department=Sales',
'box files:metadata:add 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data "multiselectkey2=[option2A]"',
];
FilesCreateMetadataCommand._endpoint = 'post_files_id_metadata_id_id';

FilesCreateMetadataCommand.flags = {
Expand Down
5 changes: 4 additions & 1 deletion src/commands/files/metadata/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class FilesSetMetadataCommand extends BoxCommand {
}

FilesSetMetadataCommand.description = 'Set metadata on a file';
FilesSetMetadataCommand.examples = ['box files:metadata:set 11111 --template-key employeeRecord --data "name=John Doe" --data department=Sales'];
FilesSetMetadataCommand.examples = [
'box files:metadata:set 11111 --template-key employeeRecord --data "name=John Doe" --data department=Sales',
'box files:metadata:set 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data "multiselectkey2=[option2A]"',
];

FilesSetMetadataCommand.flags = {
...BoxCommand.flags,
Expand Down
5 changes: 4 additions & 1 deletion src/commands/folders/metadata/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ class FoldersCreateMetadataCommand extends BoxCommand {
FoldersCreateMetadataCommand.aliases = [ 'folders:metadata:create' ];

FoldersCreateMetadataCommand.description = 'Add metadata to a folder';
FoldersCreateMetadataCommand.examples = ['box folders:metadata:add 22222 --template-key employeeRecord --data "name=John Doe" --data department=Sales'];
FoldersCreateMetadataCommand.examples = [
'box folders:metadata:add 22222 --template-key employeeRecord --data "name=John Doe" --data department=Sales',
'box folders:metadata:add 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data "multiselectkey2=[option2A]"',
];
FoldersCreateMetadataCommand._endpoint = 'post_folders_id_metadata_id_id';

FoldersCreateMetadataCommand.flags = {
Expand Down
5 changes: 4 additions & 1 deletion src/commands/folders/metadata/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class FoldersSetMetadataCommand extends BoxCommand {
}

FoldersSetMetadataCommand.description = 'Set metadata on a folder';
FoldersSetMetadataCommand.examples = ['box folders:metadata:set 22222 --template-key employeeRecord --data "name=John Doe" --data department=Sales'];
FoldersSetMetadataCommand.examples = [
'box folders:metadata:set 22222 --template-key employeeRecord --data "name=John Doe" --data department=Sales',
'box folders:metadata:set 22222 --template-key myTemplate --data "multiselectkey1=[option1A,option1B]" --data "multiselectkey2=[option2A]"',
];

FoldersSetMetadataCommand.flags = {
...BoxCommand.flags,
Expand Down

0 comments on commit c7298e4

Please sign in to comment.