Template:Scryfall count

From MTG Wiki
Jump to navigation Jump to search

This template is meant to make automatically count the total numeric result of a specific search query on Scryfall.

Works in tandem with {{Scryfall stats}}.

disabled code: {{#external_value:total_cards|0|source=https://api.scryfall.com/cards/search?q=|format=json|hidden=true|throttle interval=7200}} cards

Parameter

  • {{{1}}} the search query, e.g. type:"Angel"
  • {{{label}}} (optional) if something other than card(s) should be displayed.
  • {{{pre}}} (optional) if something should appear before card(s).
  • {{{post}}} (optional) if something should appear after card(s).

Usage

Simple example

Code: {{Scryfall count|type:"Angel"}}

Result: cards

Complex search query

Code: {{Scryfall count|type:"Town" -type:"Townsfolk"}}

Result: cards

Complex search query with post info

Code: {{Scryfall count|fo:/\bAngels?\b/|post=with Angel in textbox}}

Result: cards with Angel in textbox

Simple search (just number)

Code: {{Scryfall count|type:"Angel"|label=}}

Result: [1]