deckstats.net
You need to be logged in to do this.
The buttons above will open in a new window. Please return to this window after you have logged in. When you have logged in, click the Refresh Session button and then try again.

Author Topic: Deck Export to JSON  (Read 3490 times)

Death_Stapler

  • New Member
  • *
  • Posts: 1
  • Karma: 1
  • Decks
Deck Export to JSON
« on: March 29, 2019, 06:28:28 pm »
Is there a way to export a deck to JSON that would include deck info and card list with multiverse id or set code.

I wrote a deck loader for Tabletop Simulator that works with tappedout.net.  I was thinking of adding in the ability to load in a deck from deckstats.net.   The way it works now is I get the deck list and then use the multiverse id or card name to get the card images from scryfall.com.

Nils

  • Hero Member
  • *****
  • Posts: 1792
  • Karma: 854
  • Decks
Re: Deck Export to JSON
« Reply #1 on: April 13, 2019, 02:59:42 pm »
We don't have an official way for doing this but you could just use our internal API. It's not officially supported so it might change at some point, but I don't anticipate this will happen anytime soon.

I should probably write up some proper documentation for this at some point but here is a quick description: https://deckstats.net/forum/index.php/topic,41323.msg112773.html#msg112773

If you set response_type to "json" you'll get something like this: https://deckstats.net/api.php?action=get_deck&id_type=saved&owner_id=24472&id=1126678&response_type=json