Ejemplo n.º 1
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Update a folder.";
     _folderId           = command.Argument("folderId",
                                            "Id of folder to update");
     _bulkFilePath   = BulkFilePathOption.ConfigureOption(command);
     _filePath       = FilePathOption.ConfigureOption(command);
     _fileFormat     = FileFormatOption.ConfigureOption(command);
     _save           = SaveOption.ConfigureOption(command);
     _parentFolderId = command.Option("--parent-folder-id",
                                      "Id of new parent folder <ID>", CommandOptionType.SingleValue);
     _name = command.Option("--name",
                            "New name for folder <NAME>", CommandOptionType.SingleValue);
     _description = command.Option("--description",
                                   "New description for folder <DESCRIPTION>", CommandOptionType.SingleValue);
     _notSynced = command.Option("--not-synced",
                                 "Set sync state to not synced", CommandOptionType.NoValue);
     _partiallySynced = command.Option("--partially-synced",
                                       "Set sync state to partially synced", CommandOptionType.NoValue);
     _synced = command.Option("--synced",
                              "Set sync state to synced", CommandOptionType.NoValue);
     _access                = command.Option("--folder-upload-email-access <ACCESS>", "Upload email access level", CommandOptionType.SingleValue);
     _sharedLinkAccess      = command.Option("--shared-link-access <ACCESS>", "Shared link access level", CommandOptionType.SingleValue);
     _sharedLinkPassword    = command.Option("--shared-link-password <PASSWORD>", "Shared link password", CommandOptionType.SingleValue);
     _sharedLinkUnsharedAt  = command.Option("--shared-link-unshared-at <TIME>", "Time that this link will become disabled, use formatting like 03w for 3 weeks.", CommandOptionType.SingleValue);
     _sharedLinkCanDownload = command.Option("--shared-link-can-download", "Whether the shared link allows downloads", CommandOptionType.NoValue);
     _tags = command.Option("--tags <TAGS>", "Comma seperated tags", CommandOptionType.SingleValue);
     _etag = command.Option("--etag <ETAG>", "Only move if etag value matches", CommandOptionType.SingleValue);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 2
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Update a collaboration.";
     _id = command.Argument("collaborationId",
                            "ID of the collaboration");
     _path              = FilePathOption.ConfigureOption(command);
     _bulkPath          = BulkFilePathOption.ConfigureOption(command);
     _save              = SaveOption.ConfigureOption(command);
     _fileFormat        = FileFormatOption.ConfigureOption(command);
     _fieldsOption      = FieldsOption.ConfigureOption(command);
     _editor            = command.Option("--editor", "Set the role to editor.", CommandOptionType.NoValue);
     _viewer            = command.Option("--viewer", "Set the role to viewer.", CommandOptionType.NoValue);
     _previewer         = command.Option("--previewer", "Set the role to previewer.", CommandOptionType.NoValue);
     _uploader          = command.Option("--uploader", "Set the role to uploader.", CommandOptionType.NoValue);
     _previewerUploader = command.Option("--previewer-uploader", "Set the role to previewer uploader.", CommandOptionType.NoValue);
     _viewerUploader    = command.Option("--viewer-uploader", "Set the role to viewer uploader.", CommandOptionType.NoValue);
     _coowner           = command.Option("--co-owner", "Set the role to co-owner.", CommandOptionType.NoValue);
     _owner             = command.Option("--owner", "Set the role to owner.", CommandOptionType.NoValue);
     _role              = command.Option("-r|--role", "An option to manually enter the role", CommandOptionType.SingleValue);
     _status            = command.Option("--status", "Update the collaboration status", CommandOptionType.SingleValue);
     _canViewPath       = command.Option("--can-view-path", "Whether view path collaboration feature is enabled or not.", CommandOptionType.NoValue);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 3
0
        public override void Configure(CommandLineApplication command)
        {
            _app = command;
            command.Description = "Create a collaboration for a Box item.";
            _path              = FilePathOption.ConfigureOption(command);
            _bulkPath          = BulkFilePathOption.ConfigureOption(command);
            _save              = SaveOption.ConfigureOption(command);
            _fileFormat        = FileFormatOption.ConfigureOption(command);
            _fieldsOption      = FieldsOption.ConfigureOption(command);
            _editor            = command.Option("--editor", "Set the role to editor.", CommandOptionType.NoValue);
            _viewer            = command.Option("--viewer", "Set the role to viewer.", CommandOptionType.NoValue);
            _previewer         = command.Option("--previewer", "Set the role to previewer.", CommandOptionType.NoValue);
            _uploader          = command.Option("--uploader", "Set the role to uploader.", CommandOptionType.NoValue);
            _previewerUploader = command.Option("--previewer-uploader", "Set the role to previewer uploader.", CommandOptionType.NoValue);
            _viewerUploader    = command.Option("--viewer-uploader", "Set the role to viewer uploader.", CommandOptionType.NoValue);
            _coowner           = command.Option("--co-owner", "Set the role to co-owner.", CommandOptionType.NoValue);
            _role              = command.Option("-r|--role", "An option to manually enter the role", CommandOptionType.SingleValue);
            _userId            = command.Option("--user-id", "Id for user to collaborate", CommandOptionType.SingleValue);
            _groupId           = command.Option("--group-id", "Id for group to collaborate", CommandOptionType.SingleValue);
            _login             = command.Option("--login", "Login for user to collaborate", CommandOptionType.SingleValue);
            _canViewPath       = command.Option("--can-view-path", "Whether view path collaboration feature is enabled or not.", CommandOptionType.NoValue);
            _idOnly            = IdOnlyOption.ConfigureOption(command);
            _id = command.Argument("boxItemId",
                                   "Id of the Box item");
            if (base._t == BoxType.enterprise)
            {
                _type = command.Argument("boxItemType", "Type of Box item");
            }

            command.OnExecute(async() =>
            {
                return(await this.Execute());
            });
            base.Configure(command);
        }
Ejemplo n.º 4
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List all pending collaborations for a user.";
     _save       = SaveOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 5
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List all webhooks.";
     _save       = SaveOption.ConfigureOption(command);
     _path       = FilePathOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 6
0
        public override void Configure(CommandLineApplication command)
        {
            _app = command;
            command.Description = "Get all metadata templates in your Enterprise.";

            _save       = SaveOption.ConfigureOption(command);
            _fileFormat = FileFormatOption.ConfigureOption(command);
            command.OnExecute(async() =>
            {
                return(await this.Execute());
            });
            base.Configure(command);
        }
Ejemplo n.º 7
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List all collaborations on a Box item.";
     _id = command.Argument("boxItemId",
                            "Id of the Box item");
     _save       = SaveOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 8
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List all tasks on this file.";
     _fileId             = command.Argument("fileId",
                                            "Id of file on which to retrieve tasks");
     _save       = SaveOption.ConfigureOption(command);
     _path       = FilePathOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 9
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List items in a folder.";
     _folderId           = command.Argument("folderId",
                                            "Id of folder to manage, use '0' for the root folder");
     _save       = SaveOption.ConfigureOption(command);
     _path       = FilePathOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 10
0
        public override void Configure(CommandLineApplication command)
        {
            _app = command;
            command.Description = "List all task assignments on a task.";
            _taskId             = command.Argument("taskId",
                                                   "Id of task");
            _save       = SaveOption.ConfigureOption(command);
            _path       = FilePathOption.ConfigureOption(command);
            _fileFormat = FileFormatOption.ConfigureOption(command);

            command.OnExecute(async() =>
            {
                return(await this.Execute());
            });
            base.Configure(command);
        }
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List all collaborations for a group.";
     _save       = SaveOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     _id         = command.Argument("groupId",
                                    "Id of the group");
     _limit        = LimitOption.ConfigureOption(command);
     _fieldsOption = FieldsOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 12
0
        public override void Configure(CommandLineApplication command)
        {
            _app = command;
            command.Description = "Get events.";
            _enterprise = command.Option("-e|--enterprise", "Get enterprise events", CommandOptionType.NoValue);
            _createdBefore = command.Option("--created-before", "Return enterprise events that occured before a time. Use a timestamp or shorthand syntax 00t, like 05w for 5 weeks. If not used, defaults to now.", CommandOptionType.SingleValue);
            _createdAfter = command.Option("--created-after", "Return enterprise events that occured before a time. Use a timestamp or shorthand syntax 00t, like 05w for 5 weeks. If not used, defaults to 5 days ago.", CommandOptionType.SingleValue);
            _save = SaveOption.ConfigureOption(command);
            _path = FilePathOption.ConfigureOption(command);
            _fileFormat = FileFormatOption.ConfigureOption(command);

            command.OnExecute(async () =>
            {
                return await this.Execute();
            });
            base.Configure(command);
        }
Ejemplo n.º 13
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List all Box users.";
     _managedUsers       = ManagedUsersOnlyOption.ConfigureOption(command);
     _appUsers           = AppUsersOnlyOption.ConfigureOption(command);
     _save         = SaveOption.ConfigureOption(command);
     _path         = FilePathOption.ConfigureOption(command);
     _fileFormat   = FileFormatOption.ConfigureOption(command);
     _fieldsOption = FieldsOption.ConfigureOption(command);
     _limit        = LimitOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 14
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Create a new folder";
     _bulkPath           = BulkFilePathOption.ConfigureOption(command);
     _filePath           = FilePathOption.ConfigureOption(command);
     _fileFormat         = FileFormatOption.ConfigureOption(command);
     _save           = SaveOption.ConfigureOption(command);
     _idOnly         = IdOnlyOption.ConfigureOption(command);
     _parentFolderId = command.Argument("parentFolderId",
                                        "Id of parent folder to add new folder to, use '0' for the root folder");
     _name = command.Argument("name", "Name of new folder");
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 15
0
        public override void Configure(CommandLineApplication command)
        {
            _app = command;
            command.Description = "Assign a storage policy to a user.";
            _policyId           = command.Argument("storagePolicyId",
                                                   "Id of the storage policy");
            _userId = command.Argument("userId",
                                       "Id of the user to assign the policy to");

            _bulkPath   = BulkFilePathOption.ConfigureOption(command);
            _save       = SaveOption.ConfigureOption(command);
            _fileFormat = FileFormatOption.ConfigureOption(command);

            command.OnExecute(async() =>
            {
                return(await this.Execute());
            });
            base.Configure(command);
        }
Ejemplo n.º 16
0
        public override void Configure(CommandLineApplication command)
        {
            _app = command;
            command.Description = "Update a user's membership to a group.";
            _bulkPath           = BulkFilePathOption.ConfigureOption(command);
            _save         = SaveOption.ConfigureOption(command);
            _fileFormat   = FileFormatOption.ConfigureOption(command);
            _membershipId = command.Argument("membershipId",
                                             "Id of group membership");
            _admin = command.Option("--set-admin",
                                    "Set the user's role to Group Admin", CommandOptionType.NoValue);
            _member = command.Option("--set-member",
                                     "Set the user's role to Group Member", CommandOptionType.NoValue);

            command.OnExecute(async() =>
            {
                return(await this.Execute());
            });
            base.Configure(command);
        }
Ejemplo n.º 17
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "List members in a group, groups a user belongs to, or collaborations for a group. Lists members in a group by default.";
     _id = command.Argument("id",
                            "Id of group or user");
     _listMembers = command.Option("--list-members",
                                   "List members of a group with a group ID", CommandOptionType.NoValue);
     _listGroups = command.Option("--list-groups",
                                  "List groups a user belongs to with a user ID", CommandOptionType.NoValue);
     _listCollab = command.Option("--list-collaborations",
                                  "List collaborations for a group with a group ID", CommandOptionType.NoValue);
     _save       = SaveOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 18
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Update a group.";
     _id          = command.Argument("groupId", "Group ID");
     _name        = command.Option("-n|--name", "Group name", CommandOptionType.SingleValue);
     _inviteLevel = command.Option("-i|--invite",
                                   "Specifies who can invite the group to collaborate. Enter admins_only, admins_and_members, or all_managed_users",
                                   CommandOptionType.SingleValue);
     _viewMembershipLevel = command.Option("-m|--view-members",
                                           "Specifies who can view the members of the group. Enter admins_only, admins_and_members, or all_managed_users",
                                           CommandOptionType.SingleValue);
     _bulkPath   = BulkFilePathOption.ConfigureOption(command);
     _save       = SaveOption.ConfigureOption(command);
     _fileFormat = FileFormatOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }