/steam-webapi-kt

Steam WebAPI wrapper in Kotlin and Ktor

Primary LanguageKotlinMIT LicenseMIT

steam-webapi-kt

Maven Central JitPack KDoc javadoc codecov

Steam WebAPI wrapper written in Kotlin and Ktor.

Installation

Gradle Kotlin DSL

dependencies {
    implementation("com.github.j4ckofalltrades:steam-webapi-kt:1.2.2")
}

Gradle Groovy DSL

dependencies {
    implementation "com.github.j4ckofalltrades:steam-webapi-kt:1.2.2"
}

Apache Maven

<dependency>
    <groupId>com.github.j4ckofalltrades</groupId>
    <artifactId>steam-webapi-kt</artifactId>
    <version>1.2.2</version>
</dependency>

Installing from the JitPack repository

Add the JitPack repository to the list of repositories, and then add the package as a dependency.

Sample using Kotlin DSL:

repositories {
    maven(url="https://jitpack.io")
}

dependencies {
    implementation("com.github.j4ckofalltrades:steam-webapi-kt:1.2.2")
}

Installing via GitHub Packages

  1. Authenticate to GitHub Packages. For more information, see "Authenticating to GitHub Packages".

  2. Add the package as a dependency.

dependencies {
    implementation("com.github.j4ckofalltrades:steam-webapi-kt:1.2.2")
}
  1. (Optional) If using Gradle, add the maven plugin to your build file.
plugins {
    `maven`
}

Usage

This requires a Steam WebAPI Key, you can get one at https://steamcommunity.com/dev/apikey

You can use either the provided SteamWebApi wrapper

import io.github.j4ckofalltrades.steam_webapi.core.SteamWebApi

val steamWebApi = SteamWebApi("web_api_key")
steamWebApi.userApi().getPlayerSummaries(listOf("steam_ids"))

or with a specific interface e.g. ISteamUserWrapper

import io.github.j4ckofalltrades.steam_webapi.wrapper.ISteamUserWrapper

val steamUserApi = new ISteamUserWrapper("web_api_key")
steamUserApi.getPlayerSummaries(listOf("steam_ids"))

Stats

Alt