Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Account(val now: Instant, val uid: Long? = null, val login: String? = null, val fullName: String? = null, val secondName: String? = null, val firstName: String? = null, val displayName: String? = null, val birthday: LocalDate? = null, val serviceAvailable: Boolean, val hostedUser: Boolean? = null, val passportPhones: List<PassportPhone> = listOf(), val registeredAt: Instant? = null, val child: Boolean? = null, val nonOwnerFamilyMember: Boolean? = null, val region: Int? = null)

Аккаунт пользователя

Link copied to clipboard
@Serializable
data class AutoRenewable(val expires: Instant, val vendor: String, val vendorHelpUrl: String, val finished: Boolean, val masterInfo: User? = null, val productId: String? = null, val orderId: Int? = null)

Описание подписки

Link copied to clipboard
@Serializable
data class BarBellow(val alertId: String, val text: String, val bgColor: String, val textColor: String, val alertType: String, val button: Button, val closeButton: Boolean)
Link copied to clipboard
@Serializable
data class Button(val text: String, val bgColor: String, val textColor: String, val uri: String)
Link copied to clipboard
@Serializable
data class PassportPhone(val phone: String)

Описание номеров телефона пользователя

Link copied to clipboard
@Serializable
enum Permission : Enum<Permission>

Все возможные права пользователя

Link copied to clipboard
@Serializable
data class Permissions(val until: Instant, val values: Set<Permission>, val default: Set<Permission>)

Права пользователя

Link copied to clipboard
@Serializable
data class Plus(val hasPlus: Boolean, val isTutorialCompleted: Boolean)

Описание наличия подписки у пользователя

Link copied to clipboard
@Serializable
data class PromoCodeStatus(val status: String, val description: String, val accountStatus: Status)

Статус промокода после использования

Link copied to clipboard
@Serializable
data class Status(val account: Account, val permissions: Permissions, val subscription: Subscription? = null, val barBellow: BarBellow? = null, val isSubEditor: Boolean? = null, val subeditorLevel: Int? = null, val pretrialActive: Boolean? = null, val plus: Plus? = null, val defaultEmail: String? = null, val userHash: String? = null)

Статус пользователя, то есть имеет ли он подписки, права и т.п.

Link copied to clipboard
@Serializable
data class Subscription(val familyAutoRenewable: List<AutoRenewable>? = null, val hadAnySubscription: Boolean? = null, val canStartTrial: Boolean? = null, val mcdonalds: Boolean? = null, val end: Instant? = null)
Link copied to clipboard
@Serializable
enum Theme : Enum<Theme>
Link copied to clipboard
@Serializable
data class User(val uid: Int, val login: String, val name: String? = null, val displayName: String? = null, val sex: String? = null, val regions: List<Int> = listOf())
Link copied to clipboard
@Serializable
data class UserSettings(var uid: Int? = null, var lastFmScrobblingEnabled: Boolean, var facebookScrobblingEnabled: Boolean, var shuffleEnabled: Boolean, var addNewTrackOnPlaylistTop: Boolean, var volumePercents: Int, var userMusicVisibility: Visibility, var userSocialVisibility: Visibility, var modified: Instant? = null, var theme: Theme, var promosDisabled: Boolean, var autoPlayRadio: Boolean, var syncQueueEnabled: Boolean, var childModEnabled: Boolean?, var adsDisabled: Boolean?)
Link copied to clipboard
@Serializable
enum Visibility : Enum<Visibility>