/mtg-sdk-java

Primary LanguageJavaMIT LicenseMIT

mtg-sdk-java

Build Status Maven Central

Java SDK for using the magicthegathering.io APIs. Note that API use is free and does not require authentication or registration, but some rate limits apply. Read official API website for more information.

Add the dependency to your project and you're good to go!

Integration

Maven

<dependency>
    <groupId>io.magicthegathering</groupId>
    <artifactId>javasdk</artifactId>
    <version>0.0.1</version>
</dependency>

Gradle

compile 'io.magicthegathering:javasdk:0.0.1'

Ivy

<dependency org="io.magicthegathering" name="javasdk" rev="0.0.1"/>

Usage examples

Get a Card

int multiverseId = 1;
Card card = CardAPI.getCard(multiverseId);

Get all Cards

List<Card> cards = CardAPI.getAllCards();

Get a Set

String setCode = "KLD";
MtgSet set = SetAPI.getSet(setCode);

Get all Sets

List<MtgSet> sets = SetAPI.getAllSets();

License

This project is licensed under MIT license.