Companion

object Companion

Properties

Link copied to clipboard
private const val CAPTIONED_IMAGE_KEY: String
Link copied to clipboard
private val cardTypeMap: ERROR CLASS: Unresolved name: mapOf
Link copied to clipboard
private const val CONTROL_KEY: String
Link copied to clipboard
private const val IMAGE_ONLY_KEY: String
Link copied to clipboard
private const val SHORT_NEWS_KEY: String
Link copied to clipboard
private const val TEXT_ANNOUNCEMENT_KEY: String

Functions

Link copied to clipboard
fun getCardTypeFromJson(jsonObject: JSONObject): CardType?

Parses out the card type from the json and returns a CardType. If the type is that of a CardType.SHORT_NEWS and no image url is present, then the type returned will be that of a CardType.TEXT_ANNOUNCEMENT.

Link copied to clipboard

Returns the server key for the CardType, or null if the server key cannot be found.