Closed mattcan closed 6 years ago
Thanks a lot! I can definitely add the PTCGO codes to the API. Where does one find the codes for a set so that I can keep up to date when new sets are released?
I really hope to find a better way than this at some point but my process to get the current list was:
I took a quick look at Bulbapedia but didn't find anything and nothing jumped out from the data files for the game. If I happen across a better source I'll try to remember to update here.
After scouring the web looking for a place with these codes, I think I finally found one:
They look to match up to the ones you found as well!
Oh perfect, that goes all the way back!
I'm actually running into this on my project as well - I parsed by the full set name instead but i might move it over to something like this using the code instead. Here's my current list as of today - but i'm still making changes as i find issues with importing things from the game:
I'm simply running this to reverse the object keys and values for now. (i'm importing and exporting)
let ret = {}
for(let key in this.toCode()){
ret[json[key]] = key
}
return ret
(this.toCode() being the other table) If I move to using set codes (maybe in the next couple days) i'll update here.
https://gist.github.com/Eein/12a004389046f731d63b795984859fb0
Another resource for finding new set codes from an official source is the decklist form found on pokemon,com at http://www.pokemon.com/us/play-pokemon/about/tournaments-rules-and-resources/ They sometimes take a little while to add new sets.
This would be useful. Another resource would be here: http://ptcgohub.com/list-of-expansion-sets
ptcgoCode
has now been added to the Sets resource!
@adback03
Just sense checking some of these and this is what I have initially found:
"ptcgoCode": "PR",
"name": "SM Black Star Promos",
Should actually be "PR-SM SM"
"ptcgoCode": "PR",
"name": "XY Black Star Promos",
Should actually be "PR-XY"
"ptcgoCode": "PR",
"name": "BW Black Star Promos",
Should actually be "PR-BLW"
And then I stopped ;-)
This is my master list which I used before you added this feature:
public static Dictionary<string, string> SetMapping = new Dictionary<string, string>
{
{ "Base Set", "BS"},
{ "Jungle", "JU"},
{"Fossil", "FO"},
{"Base Set 2", "B2"},
{"Team Rocket", "TR"},
{"Gym Heroes", "G1"},
{"Gym Challenge", "G2"},
{"Neo Genesis", "N1"},
{"Neo Discovery", "N2"},
{"Southern Islands", "SI"},
{"Neo Relevation", "N3"},
{"Neo Destiny", "N4"},
{"Legendary Collection", "LC"},
{"Expedition base set", "EX"},
{"Aquapolis", "AQ"},
{"Skyridge", "SK"},
{"EX Ruby & Sapphire", "RS"},
{"EX Sandstorm", "SS"},
{"EX Dragon", "DR"},
{"EX Team Magma vs Team Aqua", "MA"},
{"EX Hidden Legends", "HL"},
{"EX FireRed & LeafGreen", "RG"},
{"EX Team Rocket Returns", "RR"},
{"EX Deoxys", "DX"},
{"EX Emerald", "EM"},
{"EX Unseen Forces", "UF"},
{"EX Delta Species ", "DS"},
{"EX Legend Maker", "LM"},
{"EX Holon Phantoms", "HP"},
{"EX Crystal Guardians", "CG"},
{"EX Dragon Frontiers", "DF"},
{"EX Power Keepers", "PK"},
{"Diamond & Pearl", "DP"},
{"Mysterious Treasures", "MT"},
{"Secret Wonders", "SW"},
{"Great Encounters", "GE"},
{"Majestic Dawn", "MD"},
{"Legends Awakened", "LA"},
{"Stormfront", "SF"},
{"Platinum", "PL"},
{"Rising Rivals", "RR"},
{"Supreme Victors", "SV"},
{"Arceus", "AR"},
{"Pokemon Rumble", "RM"},
{"HeartGold & SoulSilver Black Star Promos", "PR-HS"},
{"HeartGold & SoulSilver", "HS"},
{"HS Unleashed", "UL"},
{"HS Undaunted", "UD"},
{"HS Triumphant", "TM"},
{"Call of Legends", "CL"},
{"BW Black Star Promos", "PR-BLW"},
{"Black & White", "BLW"},
{"Emerging Powers", "EPO"},
{"Noble Victories ", "NVI"},
{"Next Destinies", "NXD"},
{"Dark Explorers", "DEX"},
{"Dragons Exalted", "DRX"},
{"Dragon Vault", "DRV"},
{"Boundaries Crossed", "BCR"},
{"Plasma Storm", "PLS"},
{"Plasma Freeze", "PLF"},
{"Plasma Blast", "PLB"},
{"Legendary Treasures", "LTR"},
{"XY Black Star Promos", "PR-XY"},
{"Kalos Starter Set", "KSS"},
{"XY Base Set", "XY"},
{"Flashfire", "FLF"},
{"Furious Fists", "FFI"},
{"Phantom Forces ", "PHF"},
{"Primal Clash", "PRC"},
{"Double Crisis", "DCR"},
{"Roaring Skies", "ROS"},
{"Ancient Origins", "AOR"},
{"BREAKthrough", "BKT"},
{"BREAKpoint", "BKP"},
{"Generations", "GEN"},
{"Fates Collide", "FCO"},
{"Steam Siege", "STS"},
{"Evolutions", "EVO"},
{"Sun & Moon", "SUM"},
{"SM Black Star Promos", "PR-SM SM"},
{"Guardians Rising", "GRI"},
{"Burning Shadows", "BUS"},
//{"Shining Legends"},
//{"Crimson Invasion"}
};```
@adback03
Can you confirm you've seen this?
@jaymarvels thanks I'll take a look!
These have been addressed. For future reference, where do you usually obtain the codes? I was able to find all of them other than the promo ones.
@adback03
I used this as reference:
//ref: http://ptcgohub.com/list-of-expansion-sets
But I think I manually checked the promos within PTCGO manually.
A project I'm working on required translating the set code from PTCGO to set code used in the API. I thought I'd let you know about the lookup table I've created in the event you wanted to add it to the API.
Table: https://gist.github.com/mattcan/d2e5873dcb78849b63e7071218afabf0