protected DbxApiException newException(DbxWrappedException error) { return new DbxApiException(error.getRequestId(), error.getUserMessage(), "Unexpected error response for \"upload_session/start\":" + error.getErrorValue()); } }
/** * Lists groups on a team. Permission : Team Information. * */ GroupsListResult groupsList(GroupsListArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/team/groups/list", arg, false, GroupsListArg.Serializer.INSTANCE, GroupsListResult.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"groups/list\":" + ex.getErrorValue()); } }
/** * Return the list of all Paper docs according to the argument * specifications. To iterate over through the full pagination, pass the * cursor to {@link DbxUserPaperRequests#docsListContinue(String)}. * */ ListPaperDocsResponse docsList(ListPaperDocsArgs arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/paper/docs/list", arg, false, ListPaperDocsArgs.Serializer.INSTANCE, ListPaperDocsResponse.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"docs/list\":" + ex.getErrorValue()); } }
/** * Retrieves metadata for team folders. Permission : Team member file * access. * */ List<TeamFolderGetInfoItem> teamFolderGetInfo(TeamFolderIdListArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/team/team_folder/get_info", arg, false, TeamFolderIdListArg.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.list(TeamFolderGetInfoItem.Serializer.INSTANCE), com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"team_folder/get_info\":" + ex.getErrorValue()); } }
/** * Return the list of all shared folders the current user can mount or * unmount. * * * @return Result for {@link DbxUserSharingRequests#listFolders} or {@link * DbxUserSharingRequests#listMountableFolders}, depending on which * endpoint was requested. Unmounted shared folders can be identified by * the absence of {@link SharedFolderMetadata#getPathLower}. */ ListFoldersResult listMountableFolders(ListFoldersArgs arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/sharing/list_mountable_folders", arg, false, ListFoldersArgs.Serializer.INSTANCE, ListFoldersResult.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"list_mountable_folders\":" + ex.getErrorValue()); } }
/** * Delete multiple files/folders at once. This route is asynchronous, which * returns a job ID immediately and runs the delete batch asynchronously. * Use {@link DbxUserFilesRequests#deleteBatchCheck(String)} to check the * job status. * * * @return Result returned by {@link DbxUserFilesRequests#deleteBatch(List)} * that may either launch an asynchronous job or complete synchronously. */ DeleteBatchLaunch deleteBatch(DeleteBatchArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/files/delete_batch", arg, false, DeleteBatchArg.Serializer.INSTANCE, DeleteBatchLaunch.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"delete_batch\":" + ex.getErrorValue()); } }
/** * Return the list of all shared folders the current user has access to. * * * @return Result for {@link DbxUserSharingRequests#listFolders} or {@link * DbxUserSharingRequests#listMountableFolders}, depending on which * endpoint was requested. Unmounted shared folders can be identified by * the absence of {@link SharedFolderMetadata#getPathLower}. */ ListFoldersResult listFolders(ListFoldersArgs arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/sharing/list_folders", arg, false, ListFoldersArgs.Serializer.INSTANCE, ListFoldersResult.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"list_folders\":" + ex.getErrorValue()); } }
/** * Retrieves information about a team. */ public TeamGetInfoResult getInfo() throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/team/get_info", null, false, com.dropbox.core.stone.StoneSerializers.void_(), TeamGetInfoResult.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"get_info\":" + ex.getErrorValue()); } }
/** * Create multiple folders at once. This route is asynchronous for large * batches, which returns a job ID immediately and runs the create folder * batch asynchronously. Otherwise, creates the folders and returns the * result synchronously for smaller inputs. You can force asynchronous * behaviour by using the {@link CreateFolderBatchArg#getForceAsync} flag. * Use {@link DbxUserFilesRequests#createFolderBatchCheck(String)} to check * the job status. * * * @return Result returned by {@link * DbxUserFilesRequests#createFolderBatch(List)} that may either launch * an asynchronous job or complete synchronously. */ CreateFolderBatchLaunch createFolderBatch(CreateFolderBatchArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/files/create_folder_batch", arg, false, CreateFolderBatchArg.Serializer.INSTANCE, CreateFolderBatchLaunch.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"create_folder_batch\":" + ex.getErrorValue()); } }
/** * Get information about the current user's account. * * @return Detailed information about the current user's account. */ public FullAccount getCurrentAccount() throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/users/get_current_account", null, false, com.dropbox.core.stone.StoneSerializers.void_(), FullAccount.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"get_current_account\":" + ex.getErrorValue()); } }
/** * Move multiple files or folders to different locations at once in the * user's Dropbox. This route is 'all or nothing', which means if one entry * fails, the whole transaction will abort. This route will return job ID * immediately and do the async moving job in background. Please use {@link * DbxUserFilesRequests#moveBatchCheck(String)} to check the job status. * * * @return Result returned by {@link DbxUserFilesRequests#copyBatch(List)} * or {@link DbxUserFilesRequests#moveBatch(List)} that may either * launch an asynchronous job or complete synchronously. */ RelocationBatchLaunch moveBatch(RelocationBatchArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/files/move_batch", arg, false, RelocationBatchArg.Serializer.INSTANCE, RelocationBatchLaunch.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"move_batch\":" + ex.getErrorValue()); } }
/** * Get the space usage information for the current user's account. * * @return Information about a user's space usage and quota. */ public SpaceUsage getSpaceUsage() throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/users/get_space_usage", null, false, com.dropbox.core.stone.StoneSerializers.void_(), SpaceUsage.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"get_space_usage\":" + ex.getErrorValue()); } } }
/** * Adds members to a team. Permission : Team member management A maximum of * 20 members can be specified in a single call. If no Dropbox account * exists with the email address specified, a new Dropbox account will be * created with the given email address, and that account will be invited to * the team. If a personal Dropbox account exists with the email address * specified in the call, this call will create a placeholder Dropbox * account for the user on the team and send an email inviting the user to * migrate their existing personal account onto the team. Team member * management apps are required to set an initial given_name and surname for * a user to use in the team invitation and for 'Perform as team member' * actions taken on the user before they become 'active'. * */ MembersAddLaunch membersAdd(MembersAddArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/team/members/add", arg, false, MembersAddArg.Serializer.INSTANCE, MembersAddLaunch.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"members/add\":" + ex.getErrorValue()); } }
/** * Copy multiple files or folders to different locations at once in the * user's Dropbox. This route will replace {@link * DbxUserFilesRequests#copyBatch(List)}. The main difference is this route * will return stutus for each entry, while {@link * DbxUserFilesRequests#copyBatch(List)} raises failure if any entry fails. * This route will either finish synchronously, or return a job ID and do * the async copy job in background. Please use {@link * DbxUserFilesRequests#copyBatchCheckV2(String)} to check the job status. * * * @return Result returned by {@link * DbxUserFilesRequests#copyBatchV2(List,boolean)} or {@link * DbxUserFilesRequests#moveBatchV2(List)} that may either launch an * asynchronous job or complete synchronously. */ RelocationBatchV2Launch copyBatchV2(RelocationBatchArgBase arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/files/copy_batch_v2", arg, false, RelocationBatchArgBase.Serializer.INSTANCE, RelocationBatchV2Launch.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"copy_batch_v2\":" + ex.getErrorValue()); } }
/** * Move multiple files or folders to different locations at once in the * user's Dropbox. This route will replace {@link * DbxUserFilesRequests#moveBatchV2(List)}. The main difference is this * route will return stutus for each entry, while {@link * DbxUserFilesRequests#moveBatch(List)} raises failure if any entry fails. * This route will either finish synchronously, or return a job ID and do * the async move job in background. Please use {@link * DbxUserFilesRequests#moveBatchCheckV2(String)} to check the job status. * * * @return Result returned by {@link * DbxUserFilesRequests#copyBatchV2(List,boolean)} or {@link * DbxUserFilesRequests#moveBatchV2(List)} that may either launch an * asynchronous job or complete synchronously. */ RelocationBatchV2Launch moveBatchV2(MoveBatchArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/files/move_batch_v2", arg, false, MoveBatchArg.Serializer.INSTANCE, RelocationBatchV2Launch.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"move_batch_v2\":" + ex.getErrorValue()); } }
/** * Copy multiple files or folders to different locations at once in the * user's Dropbox. If {@link RelocationBatchArg#getAllowSharedFolder} is * false, this route is atomic. If one entry fails, the whole transaction * will abort. If {@link RelocationBatchArg#getAllowSharedFolder} is true, * atomicity is not guaranteed, but it allows you to copy the contents of * shared folders to new locations. This route will return job ID * immediately and do the async copy job in background. Please use {@link * DbxUserFilesRequests#copyBatchCheck(String)} to check the job status. * * * @return Result returned by {@link DbxUserFilesRequests#copyBatch(List)} * or {@link DbxUserFilesRequests#moveBatch(List)} that may either * launch an asynchronous job or complete synchronously. */ RelocationBatchLaunch copyBatch(RelocationBatchArg arg) throws DbxApiException, DbxException { try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/files/copy_batch", arg, false, RelocationBatchArg.Serializer.INSTANCE, RelocationBatchLaunch.Serializer.INSTANCE, com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"copy_batch\":" + ex.getErrorValue()); } }
/** * Removes all manually added contacts. You'll still keep contacts who are * on your team or who you imported. New contacts will be added when you * share. */ public void deleteManualContacts() throws DbxApiException, DbxException { try { this.client.rpcStyle(this.client.getHost().getApi(), "2/contacts/delete_manual_contacts", null, false, com.dropbox.core.stone.StoneSerializers.void_(), com.dropbox.core.stone.StoneSerializers.void_(), com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"delete_manual_contacts\":" + ex.getErrorValue()); } }
/** * Disables the access token used to authenticate the call. */ public void tokenRevoke() throws DbxApiException, DbxException { try { this.client.rpcStyle(this.client.getHost().getApi(), "2/auth/token/revoke", null, false, com.dropbox.core.stone.StoneSerializers.void_(), com.dropbox.core.stone.StoneSerializers.void_(), com.dropbox.core.stone.StoneSerializers.void_()); } catch (DbxWrappedException ex) { throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"token/revoke\":" + ex.getErrorValue()); } } }
throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"upload_session/finish_batch\":" + ex.getErrorValue());
throw new DbxApiException(ex.getRequestId(), ex.getUserMessage(), "Unexpected error response for \"get_temporary_upload_link\":" + ex.getErrorValue());