//library/com.uploadcare.android.library.api/UploadcareClient
UploadcareClient
[androidJvm] class UploadcareClient(publicKey: String, secretKey: String?, simpleAuth: Boolean)
Initializes a client with custom access keys. Can use simple or secure authentication.
Parameters
androidJvm
Constructors
| Name | Summary |
|---|---|
| UploadcareClient | [androidJvm] fun UploadcareClient(publicKey: String) |
| UploadcareClient | [androidJvm] fun UploadcareClient(publicKey: String, secretKey: String) |
| UploadcareClient | [androidJvm] fun UploadcareClient(publicKey: String, secretKey: String? = null, simpleAuth: Boolean = false)Public key |
Types
| Name | Summary |
|---|---|
| Companion | [androidJvm] Content object Companion |
Functions
| Name | Summary |
|---|---|
| copyFile | [androidJvm] Content |
| copyFileAsync | [androidJvm] Content |
| copyFileLocalStorage | [androidJvm] Content fun copyFileLocalStorage(source: String, store: Boolean = true): UploadcareCopyFile More info Copy file to local storage. |
| copyFileLocalStorageAsync | [androidJvm] Content fun copyFileLocalStorageAsync(context: Context, source: String, store: Boolean = true, callback: CopyFileCallback? = null) More info Copy file to local storage. |
| copyFileRemoteStorage | [androidJvm] Content fun copyFileRemoteStorage(source: String, target: String? = null, makePublic: Boolean = true, pattern: String? = null): UploadcareCopyFile More info Copy file to remote storage. |
| copyFileRemoteStorageAsync | [androidJvm] Content fun copyFileRemoteStorageAsync(context: Context, source: String, target: String? = null, makePublic: Boolean = true, pattern: String? = null, callback: CopyFileCallback? = null) More info Copy file to remote storage. |
| createGroup | [androidJvm] Content fun createGroup(fileIds: List<String>, jsonpCallback: String? = null): UploadcareGroup More info Create files group from a set of files by using their UUIDs. |
| createGroupAsync | [androidJvm] Content fun createGroupAsync(fileIds: List<String>, jsonpCallback: String? = null, callback: UploadcareGroupCallback? = null) More info Create files group from a set of files by using their UUIDs. |
| createGroupSigned | [androidJvm] Content fun createGroupSigned(fileIds: List<String>, signature: String, expire: String, jsonpCallback: String? = null): UploadcareGroup More info Create files group from a set of files by using their UUIDs. |
| createGroupSignedAsync | [androidJvm] Content fun createGroupSignedAsync(context: Context, fileIds: List<String>, signature: String, expire: String, jsonpCallback: String? = null, callback: UploadcareGroupCallback? = null) More info Create files group from a set of files by using their UUIDs. |
| createWebhook | [androidJvm] Content fun createWebhook(targetUrl: URI, event: String, isActive: Boolean = true): UploadcareWebhook More info Create and subscribe to webhook. |
| createWebhookAsync | [androidJvm] Content fun createWebhookAsync(context: Context, targetUrl: URI, event: String, isActive: Boolean = true, callback: UploadcareWebhookCallback) More info Create and subscribe to webhook Asynchronously. |
| deleteFile | [androidJvm] Content fun deleteFile(fileId: String) More info Marks a file as deleted. |
| deleteFileAsync | [androidJvm] Content fun deleteFileAsync(context: Context, fileId: String) fun deleteFileAsync(context: Context, fileId: String, callback: RequestCallback? = null) More info Marks a file as deleted Asynchronously. |
| deleteFiles | [androidJvm] Content fun deleteFiles(fileIds: List<String>) More info Marks a files as deleted. |
| deleteFilesAsync | [androidJvm] Content fun deleteFilesAsync(context: Context, fileIds: List<String>) fun deleteFilesAsync(context: Context, fileIds: List<String>, callback: RequestCallback? = null) More info Marks multiple files as deleted Asynchronously. |
| deleteWebhook | [androidJvm] Content fun deleteWebhook(targetUrl: URI): Response More info Unsubscribe and delete webhook. |
| deleteWebhookAsync | [androidJvm] Content fun deleteWebhookAsync(context: Context, targetUrl: URI, callback: RequestCallback? = null) More info Unsubscribe and delete webhook Asynchronously. |
| equals | [androidJvm] Content open operator fun equals(other: Any?): Boolean |
| getFile | [androidJvm] Content fun getFile(fileId: String): UploadcareFile More info Requests file data. |
| getFileAsync | [androidJvm] Content fun getFileAsync(context: Context, fileId: String, callback: UploadcareFileCallback? = null) More info Requests file data Asynchronously. |
| getFiles | [androidJvm] Content fun getFiles(): FilesQueryBuilder More info Begins to build a request for uploaded files for the current account. |
| getFileWithRekognitionInfo | [androidJvm] Content fun getFileWithRekognitionInfo(fileId: String): UploadcareFile More info Requests file data, with Rekognition Info if available. |
| getFileWithRekognitionInfoAsync | [androidJvm] Content fun getFileWithRekognitionInfoAsync(context: Context, fileId: String, callback: UploadcareFileCallback? = null) More info Requests file data, with Rekognition Info if available, Asynchronously. |
| getGroup | [androidJvm] Content fun getGroup(groupId: String): UploadcareGroup More info Requests group data. |
| getGroupAsync | [androidJvm] Content fun getGroupAsync(context: Context, groupId: String, callback: UploadcareGroupCallback? = null) More info Requests file data Asynchronously. |
| getGroups | [androidJvm] Content fun getGroups(): GroupsQueryBuilder More info Begins to build a request for groups for the current account. |
| getProject | [androidJvm] Content fun getProject(): Project More info Requests project info from the API. |
| getProjectAsync | [androidJvm] Content fun getProjectAsync(context: Context, callback: ProjectCallback? = null) More info Requests project info from the API Asynchronously. |
| getUploadedFile | [androidJvm] Content fun getUploadedFile(fileId: String): UploadcareFile More info Request file data for uploaded file. |
| getUploadedGroup | [androidJvm] Content fun getUploadedGroup(groupId: String): UploadcareGroup More info Request file data for uploaded file. |
| getWebhooks | [androidJvm] Content fun getWebhooks(): List<UploadcareWebhook> More info Requests Webhooks data. |
| getWebhooksAsync | [androidJvm] Content fun getWebhooksAsync(context: Context, callback: UploadcareWebhooksCallback) More info Requests Webhooks data Asynchronously. |
| hashCode | [androidJvm] Content open fun hashCode(): Int |
| saveFile | [androidJvm] Content fun saveFile(fileId: String) More info Marks a file as saved. |
| saveFileAsync | [androidJvm] Content fun saveFileAsync(context: Context, fileId: String) fun saveFileAsync(context: Context, fileId: String, callback: RequestCallback? = null) More info Marks a file as saved Asynchronously. |
| saveFiles | [androidJvm] Content fun saveFiles(fileIds: List<String>) More info Marks multiple files as saved. |
| saveFilesAsync | [androidJvm] Content fun saveFilesAsync(context: Context, fileIds: List<String>) fun saveFilesAsync(context: Context, fileIds: List<String>, callback: RequestCallback? = null) More info Marks multiple files as saved Asynchronously. |
| storeGroup | [androidJvm] Content fun storeGroup(groupId: String) More info Mark all files in a group as stored (available on CDN). |
| storeGroupAsync | [androidJvm] Content fun storeGroupAsync(context: Context, groupId: String, callback: RequestCallback? = null) More info Mark all files in a group as stored (available on CDN). |
| toString | [androidJvm] Content open fun toString(): String |
| updateWebhook | [androidJvm] Content fun updateWebhook(webhookId: Int, targetUrl: URI, event: String, isActive: Boolean = true): UploadcareWebhook More info Update webhook attributes. |
| updateWebhookAsync | [androidJvm] Content fun updateWebhookAsync(context: Context, webhookId: Int, targetUrl: URI, event: String, isActive: Boolean = true, callback: UploadcareWebhookCallback) More info Update webhook attributes Asynchronously. |
Properties
| Name | Summary |
|---|---|
| httpClient | [androidJvm] val httpClient: OkHttpClient |
| objectMapper | [androidJvm] val objectMapper: ObjectMapper |
| publicKey | [androidJvm] val publicKey: StringPublic key |
| requestHelper | [androidJvm] val requestHelper: RequestHelper |
| secretKey | [androidJvm] val secretKey: String? = nullPrivate key, required for any request to Uploadcare REST API. |
| simpleAuth | [androidJvm] val simpleAuth: Boolean = falseIf {@code false}, HMAC-based authentication is used, otherwise simple authentication is used. |