Skip to content

j4ckofalltrades/steam-webapi-kt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9504bd1 · Jun 26, 2024

History

39 Commits
Jan 14, 2024
Mar 11, 2024
Mar 11, 2024
Jun 26, 2024
Mar 11, 2024
Jul 10, 2021
Nov 24, 2021
Jul 10, 2021
Jul 12, 2021
Mar 11, 2024
Jul 10, 2021
Mar 11, 2024
Mar 11, 2024
Jul 10, 2021

Repository files navigation

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