mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Fixed wrong MtgJsonV4 data format (#5415);
This commit is contained in:
parent
a922cb4d07
commit
41a2573319
8 changed files with 69 additions and 102 deletions
|
@ -1,8 +0,0 @@
|
||||||
package mage.verify;
|
|
||||||
|
|
||||||
public class Booster {
|
|
||||||
|
|
||||||
public Booster(String mythic){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,59 +3,49 @@ package mage.verify;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class JsonCard {
|
class JsonCard {
|
||||||
|
// docs: https://mtgjson.com/v4/docs.html
|
||||||
|
|
||||||
public String uuid;
|
public String artist;
|
||||||
public String convertedManaCost;
|
public String borderColor;
|
||||||
public List<ForeignData> foreignData;
|
public List<String> colorIdentity;
|
||||||
public boolean isReserved;
|
|
||||||
public String side;
|
|
||||||
public Legality legalities;
|
|
||||||
public List<String> printings;
|
|
||||||
public List<Ruling> rulings;
|
|
||||||
public List<String> colorIndicator;
|
public List<String> colorIndicator;
|
||||||
public String layout;
|
public List<String> colors;
|
||||||
public String name;
|
public float convertedManaCost;
|
||||||
public List<String> names; // flip cards
|
public float faceConvertedManaCost;
|
||||||
public String manaCost;
|
public String flavorText;
|
||||||
|
public List<JsonForeignData> foreignData;
|
||||||
|
public String frameVersion;
|
||||||
public boolean hasFoil;
|
public boolean hasFoil;
|
||||||
public boolean hasNonFoil;
|
public boolean hasNonFoil;
|
||||||
public String multiverseId;
|
public boolean isOnlineOnly;
|
||||||
public String frameVersion;
|
public boolean isOversized;
|
||||||
public int cmc;
|
public boolean isReserved;
|
||||||
public List<String> colors;
|
public boolean isTimeshifted;
|
||||||
public List<String> colorIdentity;
|
public String layout;
|
||||||
public String type;
|
public JsonLegalities legalities;
|
||||||
public List<String> supertypes;
|
|
||||||
public List<String> types;
|
|
||||||
public List<String> subtypes;
|
|
||||||
public String text;
|
|
||||||
public String power;
|
|
||||||
public String toughness;
|
|
||||||
public String loyalty;
|
public String loyalty;
|
||||||
public String imageName;
|
public String manaCost;
|
||||||
public boolean starter; // only available in boxed sets and not in boosters
|
public int multiverseId;
|
||||||
public int hand; // vanguard
|
public String name;
|
||||||
public int life; // vanguard
|
public List<String> names;
|
||||||
|
public String number;
|
||||||
public String originalText;
|
public String originalText;
|
||||||
public String originalType;
|
public String originalType;
|
||||||
public String flavorText;
|
public List<String> printings;
|
||||||
public boolean isOnlineOnly;
|
public String power;
|
||||||
|
|
||||||
// only available in AllSets.json
|
|
||||||
public String artist;
|
|
||||||
public String flavor;
|
|
||||||
public String id;
|
|
||||||
public int multiverseid;
|
|
||||||
public String rarity;
|
public String rarity;
|
||||||
public boolean reserved;
|
public List<JsonRuling> rulings;
|
||||||
public int[] variations;
|
public List<String> subtypes;
|
||||||
public String number;
|
public List<String> supertypes;
|
||||||
public String mciNumber;
|
public String text;
|
||||||
public String releaseDate; // promos
|
public String toughness;
|
||||||
public String border;
|
public String type;
|
||||||
|
public List<String> types;
|
||||||
|
public String uuid;
|
||||||
|
public List<String> variations;
|
||||||
public String watermark;
|
public String watermark;
|
||||||
public boolean timeshifted;
|
|
||||||
public String borderColor;
|
// unknown
|
||||||
public boolean isOversized;
|
public boolean starter;
|
||||||
public String faceConvertedManaCost;
|
public String side;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
package mage.verify;
|
package mage.verify;
|
||||||
|
|
||||||
public class ForeignData {
|
public class JsonForeignData {
|
||||||
|
|
||||||
|
|
||||||
public String language;
|
|
||||||
public String name;
|
|
||||||
public String type;
|
|
||||||
public String text;
|
|
||||||
public String flavorText;
|
public String flavorText;
|
||||||
public String multiverseId;
|
public String language;
|
||||||
|
public int multiverseId;
|
||||||
|
public String name;
|
||||||
|
public String text;
|
||||||
|
public String type;
|
||||||
}
|
}
|
|
@ -2,18 +2,18 @@ package mage.verify;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
public class Legality {
|
public class JsonLegalities {
|
||||||
@JsonProperty("1v1")
|
@JsonProperty("1v1")
|
||||||
public String oneVersusOne;
|
public String oneVersusOne;
|
||||||
|
public String brawl;
|
||||||
public String commander;
|
public String commander;
|
||||||
public String duel;
|
public String duel;
|
||||||
public String legacy;
|
|
||||||
public String penny;
|
|
||||||
public String vintage;
|
|
||||||
public String frontier;
|
public String frontier;
|
||||||
public String modern;
|
|
||||||
public String pauper;
|
|
||||||
public String brawl;
|
|
||||||
public String future;
|
public String future;
|
||||||
|
public String legacy;
|
||||||
|
public String modern;
|
||||||
|
public String penny;
|
||||||
|
public String pauper;
|
||||||
public String standard;
|
public String standard;
|
||||||
|
public String vintage;
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
package mage.verify;
|
package mage.verify;
|
||||||
|
|
||||||
public class Meta {
|
public class JsonMeta {
|
||||||
public String date;
|
public String date;
|
||||||
public String version;
|
public String version;
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
package mage.verify;
|
package mage.verify;
|
||||||
|
|
||||||
public class Ruling {
|
public class JsonRuling {
|
||||||
public String text;
|
|
||||||
public String date;
|
public String date;
|
||||||
|
public String text;
|
||||||
}
|
}
|
|
@ -1,36 +1,20 @@
|
||||||
package mage.verify;
|
package mage.verify;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
class JsonSet {
|
class JsonSet {
|
||||||
public String name;
|
|
||||||
public String code;
|
|
||||||
public String oldCode;
|
|
||||||
public String gathererCode;
|
|
||||||
public String magicCardsInfoCode;
|
|
||||||
public String[] magicRaritiesCodes;
|
|
||||||
public String[] alternativeNames;
|
|
||||||
public String releaseDate;
|
|
||||||
public String border;
|
|
||||||
public String type;
|
|
||||||
public List<Object> booster; // [String|[String]]
|
|
||||||
public List<JsonCard> cards;
|
|
||||||
public String block;
|
|
||||||
public boolean onlineOnly;
|
|
||||||
public String mkm_id;
|
|
||||||
public String mkm_name;
|
|
||||||
public Map<String, String> translations;
|
|
||||||
public int baseSetSize;
|
public int baseSetSize;
|
||||||
@JsonIgnore
|
public String block;
|
||||||
public List<Booster> boosterV3;
|
public List<Object> boosterV3; // [["rare", "mythic rare"], "uncommon", "uncommon", "uncommon", "common"]
|
||||||
public String borderColor;
|
public List<JsonCard> cards;
|
||||||
public Meta meta;
|
public String code;
|
||||||
public String mtgoCode;
|
|
||||||
public List<Token> tokens;
|
|
||||||
public int totalSetSize;
|
|
||||||
public boolean isOnlineOnly;
|
|
||||||
public boolean isFoilOnly;
|
public boolean isFoilOnly;
|
||||||
|
public boolean isOnlineOnly;
|
||||||
|
public JsonMeta meta;
|
||||||
|
public String mtgoCode;
|
||||||
|
public String name;
|
||||||
|
public String releaseDate;
|
||||||
|
public List<JsonToken> tokens;
|
||||||
|
public int totalSetSize;
|
||||||
|
public String type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,20 @@ package mage.verify;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Token {
|
public class JsonToken {
|
||||||
public String artist;
|
public String artist;
|
||||||
public String borderColor;
|
public String borderColor;
|
||||||
public List<String> colorIdentity;
|
public List<String> colorIdentity;
|
||||||
|
public List<String> colorIndicator;
|
||||||
public List<String> colors;
|
public List<String> colors;
|
||||||
|
public String loyalty;
|
||||||
public String name;
|
public String name;
|
||||||
public String number;
|
public String number;
|
||||||
public String power;
|
public String power;
|
||||||
public String toughness;
|
|
||||||
public List<String> reverseRelated;
|
public List<String> reverseRelated;
|
||||||
|
public String side;
|
||||||
public String text;
|
public String text;
|
||||||
|
public String toughness;
|
||||||
public String type;
|
public String type;
|
||||||
public String uuid;
|
public String uuid;
|
||||||
public String watermark;
|
public String watermark;
|
Loading…
Reference in a new issue