https://github.com/tcgdex/java-sdk
Communicate with the Open Source TCGdex API in Kotlin/Java using the SDK
https://github.com/tcgdex/java-sdk
api card java kotlin pokemon sdk tcg tcgdex trading
Last synced: 2 months ago
JSON representation
Communicate with the Open Source TCGdex API in Kotlin/Java using the SDK
- Host: GitHub
- URL: https://github.com/tcgdex/java-sdk
- Owner: tcgdex
- License: mit
- Created: 2021-11-04T16:23:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-20T14:55:39.000Z (3 months ago)
- Last Synced: 2025-03-23T09:48:28.210Z (3 months ago)
- Topics: api, card, java, kotlin, pokemon, sdk, tcg, tcgdex, trading
- Language: Kotlin
- Homepage:
- Size: 135 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TCGdex Kotlin/Java SDK
The Kotlin/Java SDK provides a convenient access with the Open Source TCGdex API.
The SDK is available both for Kotlin use and Java.
## Documentation
_The full API/SDK documentation in progress at [API Documentation - TCGdex](https://www.tcgdex.dev)_
### Getting Started
#### How To install
**Gradle**
1. add the repository in you `build.gradle`
```gradle
repositories {
...
maven { url 'https://jitpack.io' }
}
```2. Add the dependency in your `build.gradle`
```gradle
dependencies {
implementation 'net.tcgdex:java-sdk:{Version}'
}
```
**Maven**1. add the repository in your `pom.xml`
```xml
jitpack.io
https://jitpack.io
```
2. Add the depedency in your `pom.xml`
```xml
net.tcgdex
java-sdk
{Version}```
#### Usage
_Note: a complete documentation is available at [TCGdex.dev](https://www.tcgdex.dev)_
##### Kotlin
**Example: Fetch a Card**
```kotlin
// Import the SDK
import net.tcgdex.sdk.TCGdex// Init the library with the language code (see the API REST documentation for the list)
val api = TCGdex("en")// returns you a Card Class with every informations filled!
val card = api.fetchCard("swsh1-1")
```**Other Functions**
```kotlin
api.fetchCard("swsh3-136")
api.fetchCard("swsh3", "136")
api.fetchSet("swsh3")
api.fetchSets()
api.fetchSerie("swsh")
api.fetchSeries()
api.fetchTypes()
api.fetchType("Colorless")
api.fetchRetreats()
api.fetchRetreat("1")
api.fetchRarities()
api.fetchRarity("Uncommon")
api.fetchIllustrators()
api.fetchIllustrator("tetsuya koizumi")
api.fetchHPs()
api.fetchHP("110")
api.fetchCategories()
api.fetchCategory("Pokemon")
api.fetchDexIds()
api.fetchDexId("162")
api.fetchEnergyTypes()
api.fetchEnergyType("Special")
api.fetchRegulationMarks()
api.fetchRegulationMark("D")
api.fetchStages()
api.fetchStage("Basic")
api.fetchSuffixes()
api.fetchSuffix("EX")
api.fetchTrainerTypes()
api.fetchTrainerType("Tool")
api.fetchVariants()
api.fetchVariant("holo")
```## Contributing
See [CONTRIBUTING.md](https://github.com/tcgdex/javascript-sdk/blob/master/CONTRIBUTING.md)
TL::DR
- Fork
- Commit your changes
- Pull Request on this Repository
## License
This project is licensed under the MIT License. A copy of the license is available at [LICENSE.md](https://github.com/tcgdex/javascript-sdk/blob/master/LICENSE.md)
This is based on the [Maxopoly](https://github.com/Maxopoly) TCGdex Java SDK