GofileClient

class GofileClient(client: HttpClient)

Gofile.io client that uses a pre-setup HttpClient.

Constructors

Link copied to clipboard
constructor()

Gofile.io client that uses an auto-setup HttpClient.

constructor(engine: HttpClientEngine)

Gofile.io client that uses an auto-setup HttpClient.

constructor(factory: HttpClientEngineFactory<*>)

Gofile.io client that uses an auto-setup HttpClient.

constructor(client: HttpClient)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun copyContent(contentId: String, folderIdDest: String, token: String): Result<Unit>
suspend fun copyContent(contentsId: List<String>, folderIdDest: String, token: String): Result<Unit>

Copy one or multiple contents to another folder. Only available to premium users.

Link copied to clipboard
suspend fun createFolder(parentFolderId: String, folderName: String, token: String): Result<GofileCreateFolderResponse>

Create a new folder.

Link copied to clipboard
suspend fun deleteContent(contentId: String, token: String): Result<Map<String, String>>
suspend fun deleteContent(contentsId: List<String>, token: String): Result<Map<String, String>>

Delete one or multiple files/folders.

Link copied to clipboard

Retrieving specific account information. The statistics are updated every 24 hours.

Link copied to clipboard
suspend fun getContent(contentId: String, token: String): Result<GofileContent>

Get a specific content details. Only available to premium users.

Link copied to clipboard

Get the best server available to receive files.

Link copied to clipboard
suspend fun setOption(contentId: String, option: GofileOption, token: String): Result<Unit>

Set an option on a folder or file.

Link copied to clipboard
suspend fun uploadFile(fileName: String, fileContent: ByteArray, contentType: String, token: String? = null, folderId: String? = null, server: String? = null): Result<GofileUploadFileResponse>

Upload one file on a specific server. If you specify a folderId, the file will be added to this folder.

Link copied to clipboard
suspend fun GofileClient.uploadFile(file: File, token: String? = null, folderId: String? = null, server: String? = null): Result<GofileUploadFileResponse>
suspend fun GofileClient.uploadFile(file: File, contentType: String, token: String? = null, folderId: String? = null, server: String? = null): Result<GofileUploadFileResponse>

Upload one file on a specific server. If you specify a folderId, the file will be added to this folder.