search With Builder
suspend fun CardsApi.searchWithBuilder(unique: UniqueModes? = null, order: SortingCards? = null, dir: SortDirection? = null, includeExtras: Boolean = false, includeMultilingual: Boolean = false, includeVariations: Boolean = false, page: Int = 1, builder: SearchQueryBuilder.() -> Unit): ScryfallList<Card>
Searches for cards using the DSL query builder instead of a raw query string.
This extension function provides a more intuitive way to build and execute searches without needing to know the Scryfall search syntax.
Example:
val results = cardsApi.searchWithBuilder {
type("creature")
color("red")
powerRange(min = 4)
cmcRange(max = 5)
isLegal("standard")
}Content copied to clipboard
Return
A ScryfallList containing the matching cards
Parameters
unique
The strategy for omitting similar cards
order
The method to sort returned cards
dir
The direction to sort returned cards
include Extras
If true, extra cards (tokens, planes, etc) will be included
include Multilingual
If true, cards in every language will be included
include Variations
If true, rare card variants will be included
page
The page of results to return (defaults to 1)
builder
A lambda with SearchQueryBuilder as the receiver