Skip to content

TeraInferno/mtg-sdk-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic: The Gathering Java SDK

Build Status Maven Central Codacy Badge license mtg-developers on discord

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 the official API website for more information.

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

Prerequisites

  • Java JDK 7 or higher

Integration

Maven

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

Gradle

compile 'io.magicthegathering:javasdk:0.0.6'

Ivy

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

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();

Generate a Booster

String setCode = "KLD";
List<Card> booster = SetAPI.getBooster(setCode);

License

This project is licensed under MIT license.

About

Magic: The Gathering SDK - Java

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%