ApiClient
The general interface that exposes pCloud API's methods.
The class is a factory for Call objects which can be used to execute certain operations on a pCloud account.
The ApiClient is designed with reuse in mind, it's best used when created once and shared among code using it, mainly due to used connection and thread pooling.- Users should configure and create instances through the Builder interface.
- Builder instances can be created via the newClientBuilder method or from an existing ApiClient instance through the newBuilder method.
- Shared instance's configuration can be changed by using the newBuilder method that will return a pre-configured builder.
- There is no explicit need to call shutdown, any idle threads and connections will automatically get closed once not used anymore.
- All methods return non-null Call instances.
- All methods are thread-safe.
- All calls resulting in a collection of objects, return unmodifiable java.util.Collection-derived objects.
Types
Functions
authenticator
Link copied to clipboard
callbackExecutor
Link copied to clipboard
connectionPool
Link copied to clipboard
connectTimeoutMs
Link copied to clipboard
copy
Link copied to clipboard
abstract fun copy(file: RemoteEntry, toFolder: RemoteFolder): Call<out RemoteEntry>
Content copied to clipboard
abstract fun copy(file: RemoteEntry, toFolder: RemoteFolder, overwriteFiles: Boolean): Call<out RemoteEntry>
Content copied to clipboard
abstract fun copy(id: String, toFolderId: Long, overwriteFiles: Boolean): Call<out RemoteEntry>
Content copied to clipboard
Copy a specified file or folder.
copyFile
Link copied to clipboard
abstract fun copyFile(file: RemoteFile, toFolder: RemoteFolder): Call<RemoteFile>
Content copied to clipboard
abstract fun copyFile(file: RemoteFile, toFolder: RemoteFolder, overwrite: Boolean): Call<RemoteFile>
Content copied to clipboard
abstract fun copyFile(fileId: Long, toFolderId: Long, overwrite: Boolean): Call<RemoteFile>
Content copied to clipboard
Copy a specified file.
copyFolder
Link copied to clipboard
abstract fun copyFolder(folder: RemoteFolder, toFolder: RemoteFolder): Call<RemoteFolder>
Content copied to clipboard
abstract fun copyFolder(folderId: Long, toFolderId: Long): Call<RemoteFolder>
Content copied to clipboard
abstract fun copyFolder(folder: RemoteFolder, toFolder: RemoteFolder, overwrite: Boolean): Call<RemoteFolder>
Content copied to clipboard
abstract fun copyFolder(folderId: Long, toFolderId: Long, overwrite: Boolean): Call<RemoteFolder>
Content copied to clipboard
Copy specified folder.
createFile
Link copied to clipboard
abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(path: String, filename: String, data: DataSource): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(folderId: Long, filename: String, data: DataSource): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource, uploadOptions: UploadOptions): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(path: String, filename: String, data: DataSource, uploadOptions: UploadOptions): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(folderId: Long, filename: String, data: DataSource, uploadOptions: UploadOptions): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(path: String, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(folderId: Long, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(folder: RemoteFolder, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener, uploadOptions: UploadOptions): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(path: String, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener, uploadOptions: UploadOptions): Call<RemoteFile>
Content copied to clipboard
abstract fun createFile(folderId: Long, filename: String, data: DataSource, modifiedDate: Date, listener: ProgressListener, uploadOptions: UploadOptions): Call<RemoteFile>
Content copied to clipboard
Create a new file.
createFileLink
Link copied to clipboard
abstract fun createFileLink(file: RemoteFile, options: DownloadOptions): Call<FileLink>
Content copied to clipboard
Create a download link for a file If successful, this call will return a FileLink object, which can be used to download the contents of the specified RemoteFile entry.
abstract fun createFileLink(path: String, options: DownloadOptions): Call<FileLink>
Content copied to clipboard
Create a download link for a file If successful, this call will return a FileLink object, which can be used to download the contents of the remote file with the specified
path
.abstract fun createFileLink(fileId: Long, options: DownloadOptions): Call<FileLink>
Content copied to clipboard
Create a download link for a file If successful, this call will return a FileLink object, which can be used to download the contents of the remote file with the specified
fileId
.createFolder
Link copied to clipboard
abstract fun createFolder(parentFolderId: Long, folderName: String): Call<RemoteFolder>
Content copied to clipboard
Create a new folder.
abstract fun createFolder(parentFolder: RemoteFolder, folderName: String): Call<RemoteFolder>
Content copied to clipboard
Create a folder.
deleteFile
Link copied to clipboard
Delete a specified file.
deleteFolder
Link copied to clipboard
abstract fun deleteFolder(folder: RemoteFolder, recursively: Boolean): Call<Boolean>
Content copied to clipboard
abstract fun deleteFolder(path: String, recursively: Boolean): Call<Boolean>
Content copied to clipboard
abstract fun deleteFolder(folderId: Long, recursively: Boolean): Call<Boolean>
Content copied to clipboard
Delete a specified folder recursively.
dispatcher
Link copied to clipboard
getChecksums
Link copied to clipboard
getUserInfo
Link copied to clipboard
Get UserInfo for the current account.
listFolder
Link copied to clipboard
abstract fun listFolder(path: String, recursively: Boolean): Call<RemoteFolder>
Content copied to clipboard
abstract fun listFolder(folderId: Long, recursively: Boolean): Call<RemoteFolder>
Content copied to clipboard
Load a specified folder.
loadFile
Link copied to clipboard
Load a specific file.
loadFolder
Link copied to clipboard
Load a specific folder.
move
Link copied to clipboard
abstract fun move(file: RemoteEntry, toFolder: RemoteFolder): Call<out RemoteEntry>
Content copied to clipboard
Move a specified file or folder.
moveFile
Link copied to clipboard
abstract fun moveFile(file: RemoteFile, toFolder: RemoteFolder): Call<RemoteFile>
Content copied to clipboard
Move a specified file.
moveFolder
Link copied to clipboard
abstract fun moveFolder(folder: RemoteFolder, toFolder: RemoteFolder): Call<RemoteFolder>
Content copied to clipboard
abstract fun moveFolder(path: String, toPath: String): Call<RemoteFolder>
Content copied to clipboard
abstract fun moveFolder(folderId: Long, toFolderId: Long): Call<RemoteFolder>
Content copied to clipboard
Change a specified folder's parent.
newBuilder
Link copied to clipboard
Create a new shared ApiClient instance.
progressCallbackThreshold
Link copied to clipboard
readTimeoutMs
Link copied to clipboard
rename
Link copied to clipboard
abstract fun rename(file: RemoteEntry, newFilename: String): Call<out RemoteEntry>
Content copied to clipboard
abstract fun rename(id: String, newFilename: String): Call<out RemoteEntry>
Content copied to clipboard
Rename a specified file or folder.
renameFile
Link copied to clipboard
abstract fun renameFile(file: RemoteFile, newFilename: String): Call<RemoteFile>
Content copied to clipboard
abstract fun renameFile(fileId: Long, newFilename: String): Call<RemoteFile>
Content copied to clipboard
Rename a specified file.
renameFolder
Link copied to clipboard
abstract fun renameFolder(folder: RemoteFolder, newFolderName: String): Call<RemoteFolder>
Content copied to clipboard
abstract fun renameFolder(folderId: Long, newFolderName: String): Call<RemoteFolder>
Content copied to clipboard
Rename a specified folder.
writeTimeoutMs
Link copied to clipboard