DiscordPHP-MTG Documentation

Database

Table of Contents

Classes

Booster
Opens booster packs from a set's MTGJSON booster configuration, as stored in the AllPrintings build's `setBooster*` tables.
CardQuery
A card search against the AllPrintings build's `cards` table, joined to `sets` (for `setName`), `cardIdentifiers` and `cardLegalities` as filters need them. One row per card face per printing, as in MTGJSON.
Database
A local copy of MTGJSON's AllPrintings SQLite build, kept current from the API. MTGJSON has no query endpoint — it publishes whole files — so card and set searches run here instead of over HTTP.
PriceBuilder
Turns MTGJSON's `AllPricesToday.json` into the small SQLite build {@see PriceDatabase} reads.
PriceDatabase
Today's card prices, kept current the same way as the card build: a small SQLite file ({@see PriceBuilder}) that the `prices` GitHub Actions workflow builds daily from MTGJSON's `AllPricesToday` and publishes as an asset of the `prices` release, beside a `prices.json` holding its version.
Query
Compiles a search — the same `key => value` filters the old api.magicthegathering.io took — into SQL against the AllPrintings build.
SetQuery
A set search against the AllPrintings build's `sets` table.
Suggestions
Autocomplete answers for command options — card names, sets, booster types, set types, keywords and formats — fast enough to run on every keystroke inside Discord's three-second window.
On this page

Search results