Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class GofileClient(client: HttpClient)

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

Link copied to clipboard
@Serializable(with = GofileContentSerializer::class)
sealed class GofileContent
Link copied to clipboard

Serializer for GofileContent.

Link copied to clipboard

File types.

Link copied to clipboard
@Serializable
data class GofileCreateFolderResponse(val id: String, val type: GofileContentType, val name: String, val parentFolder: String, val createTime: Long, val childs: List<String>, val code: String)
Link copied to clipboard
@Serializable
data class GofileGetAccountDetailsResponse(val token: String, val email: String, val tier: GofileTier, val tierAmount: Int? = null, val rootFolder: String, val filesCount: Int, val foldersCount: Int? = null, val totalSize: Double, val totalDownloadCount: Int? = null)

The statistics are updated every 24 hours.

Link copied to clipboard
@Serializable
data class GofileGetServerResponse(val server: String)
Link copied to clipboard
sealed class GofileOption

The value of the option to be defined.

Link copied to clipboard
class GofileStatusException(val response: HttpResponse, val status: String) : IllegalStateException

Gofile.io returns some error.

Link copied to clipboard
@Serializable(with = GofileTierSerializer::class)
sealed class GofileTier

Account tier.

Link copied to clipboard
class GofileTierSerializer : KSerializer<GofileTier>

Serializer for GofileTier.

Link copied to clipboard
@Serializable
data class GofileUploadFileResponse(val downloadPage: String, val code: String, val parentFolder: String, val fileId: String, val fileName: String, val md5: String, val guestToken: String? = null)
Link copied to clipboard

The content type could not be determined. Check the file or specify the contentType.

Functions

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.