ScryfallList

@Serializable
data class ScryfallList<T>(val objectType: String = "list", val hasMore: Boolean = false, val nextPage: String? = null, val totalCards: Int? = null, val data: List<T> = emptyList(), val warnings: List<String>? = null, val notFound: List<NotFound>? = null)

A List object represents a requested sequence of other objects (Cards, Sets, etc). List objects may be paginated, and also include information about issues raised when generating the list. https://scryfall.com/docs/api/lists

Constructors

Link copied to clipboard
constructor(objectType: String = "list", hasMore: Boolean = false, nextPage: String? = null, totalCards: Int? = null, data: List<T> = emptyList(), warnings: List<String>? = null, notFound: List<NotFound>? = null)

Properties

Link copied to clipboard
@SerialName(value = "data")
val data: List<T>
Link copied to clipboard
@SerialName(value = "has_more")
val hasMore: Boolean
Link copied to clipboard
@SerialName(value = "next_page")
val nextPage: String?
Link copied to clipboard
@SerialName(value = "not_found")
val notFound: List<NotFound>?
Link copied to clipboard
@SerialName(value = "object")
val objectType: String
Link copied to clipboard
@SerialName(value = "total_cards")
val totalCards: Int?
Link copied to clipboard
@SerialName(value = "warnings")
val warnings: List<String>?

Functions

Link copied to clipboard
fun <T> ScryfallList<T>.asFlow(client: HttpClient): Flow<T>
Link copied to clipboard
suspend fun <T> ScryfallList<T>.loadNextPage(client: HttpClient): ScryfallList<T>?