Option

data class Option(val url: String, val imageUrl: String? = null, val voteUrl: String? = null, val description: String? = null, val id: String, val translatableFields: List<String>? = null, val translations: Any? = null, var voteCount: Int? = null, var isCorrect: Boolean? = null, val answerUrl: String? = null, var answerCount: Int? = null, val correctNumber: Int? = null, var number: Int? = null, var earnableRewards: List<OptionReward>, val rewardItemId: String?, val rewardItemAmount: Double?)

Constructors

Link copied to clipboard
constructor(url: String, imageUrl: String? = null, voteUrl: String? = null, description: String? = null, id: String, translatableFields: List<String>? = null, translations: Any? = null, voteCount: Int? = null, isCorrect: Boolean? = null, answerUrl: String? = null, answerCount: Int? = null, correctNumber: Int? = null, number: Int? = null, earnableRewards: List<OptionReward>, rewardItemId: String?, rewardItemAmount: Double?)

Properties

Link copied to clipboard
@SerializedName(value = "answer_count")
var answerCount: Int?
Link copied to clipboard
@SerializedName(value = "answer_url")
val answerUrl: String?
Link copied to clipboard
@SerializedName(value = "correct_number")
val correctNumber: Int?
Link copied to clipboard
@SerializedName(value = "description")
val description: String?
Link copied to clipboard
@SerializedName(value = "earnable_rewards")
var earnableRewards: List<OptionReward>
Link copied to clipboard
@SerializedName(value = "id")
val id: String
Link copied to clipboard
@SerializedName(value = "image_url")
val imageUrl: String?
Link copied to clipboard
@SerializedName(value = "is_correct")
var isCorrect: Boolean?
Link copied to clipboard
@SerializedName(value = "number")
var number: Int?
Link copied to clipboard
Link copied to clipboard
@SerializedName(value = "reward_item_amount")
val rewardItemAmount: Double?
Link copied to clipboard
@SerializedName(value = "reward_item_id")
val rewardItemId: String?
Link copied to clipboard
@SerializedName(value = "translatable_fields")
val translatableFields: List<String>?
Link copied to clipboard
@SerializedName(value = "translations")
val translations: Any?
Link copied to clipboard
val url: String
Link copied to clipboard
@SerializedName(value = "vote_count")
var voteCount: Int?
Link copied to clipboard
@SerializedName(value = "vote_url")
val voteUrl: String?

Functions

Link copied to clipboard
fun copy(imageUrl: String? = this.imageUrl, voteUrl: String? = this.voteUrl, description: String? = this.description, id: String = this.id, translatableFields: List<String>? = this.translatableFields, translations: Any? = this.translations, voteCount: Int? = this.voteCount, isCorrect: Boolean? = this.isCorrect, answerUrl: String? = this.answerUrl, answerCount: Int? = this.answerCount, correctNumber: Int? = this.correctNumber, number: Int? = this.number, rewardItemId: String? = this.rewardItemId, rewardItemAmount: Double? = this.rewardItemAmount): Option

Copy function for the Option class, skipping the url field. Allows all other fields to be customized while preserving defaults.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getPercent(total: Float): Int
Link copied to clipboard
fun updateCount(option: Option)