Package-level declarations

Types

Link copied to clipboard
abstract class AccountManager
Link copied to clipboard
abstract class AuthAPI

Stateless Authentication class used for all personalized content

Link copied to clipboard
@Serializable
data class AuthData(val user: AuthUser, val token: AuthToken)

Stores all information that should be used to authorize access. Be aware that token and user may change independently when a refresh is needed, and as such there should be no strong pairing between the two.

Link copied to clipboard
data class AuthLoginPage(val url: String, val payload: String? = null)
Link copied to clipboard
data class AuthLoginRequirement(val password: Boolean = false, val username: Boolean = false, val email: Boolean = false, val server: Boolean = false)

The login field requirements to display to the user

Link copied to clipboard
@Serializable
data class AuthLoginResponse(val password: String?, val username: String?, val email: String?, val server: String?)

What the user responds to the AuthLoginRequirement

Link copied to clipboard
data class AuthPinData(val deviceCode: String, val userCode: String, val verificationUrl: String, val expiresIn: Int, val interval: Int)
Link copied to clipboard
abstract class AuthRepo(val api: AuthAPI)

Safe abstraction for AuthAPI that provides both a catching interface, and automatic token management.

Link copied to clipboard
@Serializable
data class AuthToken(val accessToken: String? = null, val refreshToken: String? = null, val accessTokenLifetime: Long? = null, val refreshTokenLifetime: Long? = null, val payload: String? = null)
Link copied to clipboard
@Serializable
data class AuthUser(val name: String?, val id: Int, val profilePicture: String? = null, val profilePictureHeaders: Map<String, String>? = null)
Link copied to clipboard
abstract class BackupAPI : AuthAPI

Work in progress

Link copied to clipboard

General-purpose repo

Link copied to clipboard
abstract class SubtitleAPI : AuthAPI

Stateless subtitle class for external subtitles.

Link copied to clipboard

Stateless safe abstraction of SubtitleAPI

Link copied to clipboard
abstract class SyncAPI : AuthAPI

Stateless synchronization class, used for syncing status about a specific movie/show.

Link copied to clipboard
class SyncRepo(val api: SyncAPI) : AuthRepo

Stateless safe abstraction of SyncAPI