Skip to content

j4ckofalltrades/steam-webapi-ts

Repository files navigation

steam-webapi-ts_image

npm Docs codecov

Isomorphic Steam WebAPI wrapper in TypeScript.

Installation

npm

Using npm

$ npm install @j4ckofalltrades/steam-webapi-ts

Using yarn

$ yarn add @j4ckofalltrades/steam-webapi-ts

Using GitHub Packages

This step requires authenticating to GitHub Packages, then installing the package using npm.

$ npm install @j4ckofalltrades/steam-webapi-ts

via CDN

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 { SteamWebApi } from "@j4ckofalltrades/steam-webapi-ts"

const steamWebApi = new SteamWebApi("api_key")
await steamWebApi.usersApi.getPlayerSummaries(["steam_ids"])

or with a specific interface e.g. ISteamUser

import { ISteamUser } from "@j4ckofalltrades/steam-webapi-ts"

const usersApi = new ISteamUser("api_key")
await usersApi.getPlayerSummaries(["steam_ids"])

Stats

Alt