Template:Scryfall stats/data

From Magic: The Gathering Wiki
Jump to navigation Jump to search
 Template Documentation[view | edit | history | purge]
This is a template documentation subpage for Template:Scryfall stats.
It contains usage information, categories, interlanguage links and other content that is not part of the original template page.

This template contains data for all detected Scryfall queries on the site.

Syntax

Get the comma-separated values for a query with:
{{#vardefine:data|{{Template:Scryfall stats/data|query={{{1|}}}}}}}

With this comma-separated variable you can extract 8 fields:

Field index Contents
0 the number of colorless results for the query
1 the number of mono-white results for the query
2 the number of mono-blue results for the query
3 the number of mono-black results for the query
4 the number of mono-red results for the query
5 the number of mono-green results for the query
6 the number of multicolored results for the query
7 the total number of results for the query

Use this index with #explode to extract the value from data; for example:

{{#vardefine:c|{{#explode:{{#var:data}}|,|0}}}}

Example

{{Scryfall_stats/data|query=art:bee}}

produces:

Maintenance

This data is updated by the User:OrmosBot bot running at https://github.com/maxmakesmagic/ormosbot/.

The above documentation is transcluded from Template:Scryfall stats/data/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories and interwikis to the /doc subpage. Subpages of this template.