Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 1.99 KB

README.md

File metadata and controls

89 lines (60 loc) · 1.99 KB

SpaceTradersKMP

SpaceTradersKMP is an API wrapper for SpaceTraders game in Kotlin Multiplatform.

Preface

This library is mainly intended to be used for Kotlin Multiplatform.

Build Compatibility

JVM

Note

JVM Toolchain Version: 17

Usage

Tip

Check latest version from Maven Repository or here.

Install

Kotlin Multiplatform

Gradle Kotlin DSL
implementation("com.github.yamin8000:SpaceTradersKMP:version")

JVM

Gradle Groovy DSL
implementation group: 'com.github.yamin8000', name: 'SpaceTradersKMP-jvm', version: 'version'
Gradle Kotlin DSL
implementation("com.github.yamin8000:SpaceTradersKMP-jvm:version")
Maven
<dependency>
    <groupId>com.github.yamin8000</groupId>
    <artifactId>SpaceTradersKMP</artifactId>
    <version>version</version>
</dependency>

Sample code

Client initialization

val client = GameClient(token = "")

Register

val request = RegisterRequest(
    faction = FactionSymbol.COSMIC,
    symbol = "yamin",
    email = "[email protected]"
)
val response = client.register(request)
println(response.data)

Features

License

Important

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.