Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AutocompleteResult(val objectType: String, val totalValues: Int, val data: List<String>)
Link copied to clipboard
@Serializable
data class BulkData(val objectType: String = "bulk_data", val id: String, val uri: String, val type: String, val name: String, val description: String, val downloadUri: String, val updatedAt: String, val size: Long, val contentType: String, val contentEncoding: String)
Link copied to clipboard
@Serializable
data class Card(val arenaId: Int? = null, val id: String, val language: String, val mtgoId: Int? = null, val mtgoFoilId: Int? = null, val multiverseIds: List<Int>? = null, val tcgplayerId: Int? = null, val tcgplayerEtchedId: Int? = null, val cardmarketId: Int? = null, val resourceId: String? = null, val objectType: String, val layout: String, val oracleId: String? = null, val printsSearchUri: String, val rulingsUri: String, val scryfallUri: String, val uri: String, val allParts: List<RelatedCard>? = null, val cardFaces: List<CardFace>? = null, val manaValue: Double = 0.0, val colorIdentity: List<String> = emptyList(), val colorIndicator: List<String>? = null, val colors: List<String>? = null, val defense: String? = null, val edhrecRank: Int? = null, val gameChanger: Boolean? = null, val handModifier: String? = null, val keywords: List<String> = emptyList(), val legalities: Legalities = Legalities(), val lifeModifier: String? = null, val loyalty: String? = null, val manaCost: String? = null, val name: String, val oracleText: String? = null, val oversized: Boolean = false, val pennyRank: Int? = null, val power: String? = null, val producedMana: List<String>? = null, val reserved: Boolean = false, val toughness: String? = null, val typeLine: String, val artist: String? = null, val artistIds: List<String>? = null, val attractionLights: List<Int>? = null, val booster: Boolean = false, val borderColor: String, val cardBackId: String? = null, val collectorNumber: String, val contentWarning: Boolean? = null, val digital: Boolean, val finishes: List<String> = emptyList(), val flavorName: String? = null, val flavorText: String? = null, val frameEffects: List<String>? = null, val frame: String, val fullArt: Boolean, val games: List<String> = emptyList(), val highresImage: Boolean, val illustrationId: String? = null, val imageStatus: String, val imageUris: ImageUris? = null, val prices: Prices? = Prices(), val printedName: String? = null, val printedText: String? = null, val printedTypeLine: String? = null, val promo: Boolean, val promoTypes: List<String>? = null, val purchaseUris: Map<String, String>? = null, val rarity: String, val relatedUris: Map<String, String>, val releasedAt: String, val reprint: Boolean, val scryfallSetUri: String, val setName: String, val setSearchUri: String, val setType: String, val setUri: String, val setCode: String, val setId: String, val storySpotlight: Boolean, val textless: Boolean, val variation: Boolean, val variationOf: String? = null, val securityStamp: String? = null, val watermark: String? = null, val preview: Preview? = null)
Link copied to clipboard
@Serializable
data class CardFace(val artist: String? = null, val artistId: String? = null, val manaValue: Double? = null, val colorIndicator: List<String>? = null, val colors: List<String>? = null, val defense: String? = null, val flavorText: String? = null, val illustrationId: String? = null, val imageUris: ImageUris? = null, val layout: String? = null, val loyalty: String? = null, val manaCost: String, val name: String, val objectType: String, val oracleId: String? = null, val oracleText: String? = null, val power: String? = null, val printedName: String? = null, val printedText: String? = null, val printedTypeLine: String? = null, val toughness: String? = null, val typeLine: String? = null, val watermark: String? = null)

Individual face information for multiface cards.

Link copied to clipboard
@Serializable
data class CardSymbol(val objectType: String = "card_symbol", val symbol: String, val looseVariant: String? = null, val english: String, val transposable: Boolean, val representsMana: Boolean, val manaValue: Double? = null, val appearsInManaCosts: Boolean, val funny: Boolean, val colors: List<String>, val hybrid: Boolean, val phyrexian: Boolean, val gathererAlternates: List<String>? = null, val svgUri: String? = null)

https://scryfall.com/docs/api/card-symbols

Link copied to clipboard
@Serializable
data class Catalog(val objectType: String = "catalog", val uri: String, val totalValues: Int, val data: List<String>)
Link copied to clipboard
@Serializable
data class Identifier(val id: String? = null, val oracleId: String? = null, val illustrationId: String? = null, val multiverseId: Int? = null, val mtgoId: Int? = null, val arenaId: Int? = null, val set: String? = null, val collectorNumber: String? = null, val name: String? = null)
Link copied to clipboard
@Serializable
data class IdentifiersRequest(val identifiers: List<Identifier>, val pretty: Boolean? = false)
Link copied to clipboard
@Serializable
data class ImageUris(val small: String? = null, val normal: String? = null, val large: String? = null, val png: String? = null, val artCrop: String? = null, val borderCrop: String? = null)

Available imagery for a card or card face.

Link copied to clipboard
@Serializable
data class Legalities(val standard: String? = null, val future: String? = null, val historic: String? = null, val timeless: String? = null, val gladiator: String? = null, val pioneer: String? = null, val explorer: String? = null, val modern: String? = null, val legacy: String? = null, val pauper: String? = null, val vintage: String? = null, val penny: String? = null, val commander: String? = null, val oathbreaker: String? = null, val brawl: String? = null, val historicBrawl: String? = null, val alchemy: String? = null, val pauperCommander: String? = null, val duel: String? = null, val oldschool: String? = null, val premodern: String? = null, val predh: String? = null, val standardBrawl: String? = null)

Legal status for each supported format. Possible legalities are legal, not_legal, restricted, and banned.

Link copied to clipboard
@Serializable
data class NotFound(val objectType: String = "not_found", val name: String? = null, val set: String? = null, val collectorNumber: String? = null, val type: String? = null)
Link copied to clipboard
@Serializable
data class ParsedManaCost(val objectType: String = "mana_cost", val cost: String, val cmc: Double, val colors: List<String>, val colorless: Boolean, val monocolored: Boolean, val multicolored: Boolean)

https://scryfall.com/docs/api/card-symbols/parse-mana

Link copied to clipboard
@Serializable
data class Preview(val previewedAt: String? = null, val sourceUri: String? = null, val source: String? = null)

Preview metadata supplied by Scryfall.

Link copied to clipboard
@Serializable
data class Prices(val usd: String? = null, val usdFoil: String? = null, val usdEtched: String? = null, val eur: String? = null, val eurFoil: String? = null, val eurEtched: String? = null, val tix: String? = null)

Price information in multiple currencies.

Link copied to clipboard
@Serializable
data class RelatedCard(val id: String, val objectType: String, val component: String, val name: String, val typeLine: String, val uri: String)

Related card reference (meld parts, combo pieces, tokens, etc.).

Link copied to clipboard
@Serializable
data class Ruling(val objectType: String = "ruling", val oracleId: String, val source: String, val publishedAt: String, val comment: String)
Link copied to clipboard
@Serializable
data class ScryfallError(val objectType: String = "error", val code: String? = null, val status: Int? = null, val details: String? = null, val type: String? = null, val warnings: List<String>? = null)
Link copied to clipboard
@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

Link copied to clipboard
@Serializable
data class Set(val objectType: String = "set", val id: String, val code: String, val mtgoCode: String? = null, val arenaCode: String? = null, val tcgplayerId: Int? = null, val name: String, val setType: String, val releasedAt: String? = null, val blockCode: String? = null, val block: String? = null, val parentSetCode: String? = null, val cardCount: Int, val printedSize: Int? = null, val digital: Boolean = false, val foilOnly: Boolean, val nonfoilOnly: Boolean, val scryfallUri: String, val uri: String, val iconSvgUri: String, val searchUri: String)

A Set object represents a group of related Magic cards. All Card objects on Scryfall belong to exactly one set. https://scryfall.com/docs/api/sets

Link copied to clipboard

The direction to sort the cards. If not provided, Scryfall chooses a reasonable default for the order.

Link copied to clipboard

The order parameter determines how Scryfall should sort the returned cards.

Link copied to clipboard

The unique parameter specifies if Scryfall should remove “duplicate” results in your query. The options are:

Functions

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

Filters cards that are artifacts.

Link copied to clipboard

Filters cards by converted mana cost (mana value).

Link copied to clipboard
fun List<Card>.filterByCmcRange(min: Double? = null, max: Double? = null): List<Card>

Filters cards by CMC range.

Link copied to clipboard
fun List<Card>.filterByColor(vararg colors: String): List<Card>

Filters cards by exact color identity. Returns only cards that have ALL specified colors (and only those colors).

Link copied to clipboard

Filters cards that contain any of the specified colors.

Link copied to clipboard

Filters cards by rarity.

Link copied to clipboard

Filters cards by type line.

Link copied to clipboard

Filters cards that are colorless.

Link copied to clipboard

Filters cards that are creatures.

Link copied to clipboard

Filters cards that are enchantments.

Link copied to clipboard

Filters cards that are instants.

Link copied to clipboard

Filters cards that are lands.

Link copied to clipboard

Filters cards that are legal in the specified format.

Link copied to clipboard

Filters cards that are multicolored.

Link copied to clipboard

Filters cards that are planeswalkers.

Link copied to clipboard

Filters cards that are sorceries.

Link copied to clipboard

Checks if this card has the specified color.

Link copied to clipboard
fun Card.hasKeyword(keyword: String): Boolean

Checks if this card has the specified keyword ability.

Link copied to clipboard

Checks if this card is an artifact.

Link copied to clipboard

Checks if this card is a battle.

Link copied to clipboard

Checks if this card is colorless.

Link copied to clipboard

Checks if this card is a creature.

Link copied to clipboard

Checks if this card is an enchantment.

Link copied to clipboard

Checks if this card is an instant.

Link copied to clipboard

Checks if this card is a land.

Link copied to clipboard

Checks if this card is legal in the specified format.

Link copied to clipboard

Checks if this card is multicolored (has more than one color).

Link copied to clipboard

Checks if this card is a planeswalker.

Link copied to clipboard

Checks if this card is a sorcery.

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

Sorts cards by converted mana cost (mana value).

Link copied to clipboard

Sorts cards by collector number. Numeric collector numbers are sorted numerically, others by hash code.

Link copied to clipboard

Sorts cards alphabetically by name.

Link copied to clipboard

Sorts cards by USD price. Cards with null or unparseable prices are sorted to the end.

Link copied to clipboard

Sorts cards by rarity in order: common, uncommon, rare, mythic.

Link copied to clipboard

Sorts cards by release date.