English-language Forums > General Magic

Deckstats API?

(1/2) > >>

Hello, sorry if this is the wrong place to ask, but it seemed like the closet. But does Deckstats have any sorta api? My friends are working on a program to import decks into tabletop sim, he mostly has tapped out done but eventually wants to try and get deckstats and mtggoldfish too.
So I figured I could do some leg work and see what we have to work with. Thanks

Morganator 2.0:
I can't answer if Deckstats has an API (I don't even know what it is). Nils is the one who can answer that.

In the meantime, tell me more about what you're making. It sounds interesting.

Well, when I first started playing (around a year or two ago) we used TableTop Sim on steam as it was an easy way to play the game cheap. So my friends have forked another projects that downloaded the card images and make an object for tabletop. With the popularity of scryfall they changed the image importer to download from them because they have great image quality.

Right now the importer only works for TappedOut and because I mainly use deckstats, he wanted to add support for you all too.

Here is the current dev version: https://github.com/erieflin/TTSDeckImporterTappedOut/tree/overhaul

if everything else fails, try contacting him directly?

https://deckstats.net/?lng=en&about=1 // https://koelling.co.uk/contact.php?lng=en

Thank you for your interest in adding support for deckstats to this! In general I am happy to support this but it will depend a bit on exactly what kind of API you need.

A full public API (with user authentication etc) is something that has been on my to-do list for ages. Unfortunately that is still not close to being done.

However, if all you need is the deck list then I think you might be able to do something much simpler:

* Ask the user for a link to the deck they want to import. It has to be saved to their account and public. Eg.: https://deckstats.net/decks/24472/1126678-guttersniplicate
* Extract the owner ID and the deck ID (eg. 24472 and 1126678, respectively) from the URL
* Make a request to our internal API using these IDs:
The result will look like this: https://deckstats.net/api.php?action=get_deck&id_type=saved&owner_id=24472&id=1126678&response_type=list

In principle this is an internal API that might change in the future. However, I don't anticipate any major changes to this anytime soon so you should be pretty safe using this.

Is this the kind of thing you were looking for?


[0] Message Index

[#] Next page

Go to full version