This is a wrapper around the Cardcast API, designed to have flexible I/O backends.
This code itself is licensed under the WTFPL. However, Cardcast is an external service (of which I have no affiliation in any capacity), and you must obey their terms of service. Failure to abide could result in the API being locked down, or your access revoked. Please, just follow the rules, for everyone's sake.
Here are the rules they've laid out:
ADDITIONAL NOTE FROM THE DEVELOPERS OF CARDCASTGAME.COM ON THE USE OF THEIR API
The Cardcast API isn't public, but we (the developers of cardcastgame.com) don't have a problem with people tapping into it for small projects.
Our only requirements (right now) are:
A) Make users aware you are using Cardcast decks.
B) Direct users to our website for any searching/discovery of play codes (i.e., don't roll your own search engine based on our data).
C) If possible, implement some simple form of caching. The decks aren't immutable (people can edit decks at anytime and the code remains the same), so you shouldn't cache a deck for too long. One popular site caches for 15 minutes.
D) Use at your own risk! If cardcastgame.com goes down or is hacked or whatever, we (the developers of cardcastgame.com) can't be held liable for any impact on your app. We also reserve the right to revoke access at anytime.