Skip to content

SwitchbladeBot/steamladder.js

Repository files navigation


Node.js wrapper for the Steam Ladder API

Documentation deployed by Netlify
Discord Server CI Testing License Backers Sponsors Hacktoberfest

Read the documentation

Installing

You will need atleast Node v12.

$ npm install steamladder

Getting an API key

Login into SteamLadder using your Steam account and head over to https://steamladder.com/user/settings/api to get your API key.

Usage

First, initialize the client using your STEAMLADDER_API_KEY.

const { SteamLadderAPI } = require("steamladder");

const steamladder = new SteamLadderAPI("STEAMLADDER_API_KEY");

Now you can use the steamladder methods.

Getting a profile

steamladder.getProfile("steamid64").then((data) => console.log(data)); // Profile data

Getting a ladder

const { LadderType, Region } = require("steamladder");

steamladder.getLadder(LadderType.XP).then((data) => console.log(data)); // Using LadderType
steamladder.getLadder("xp").then((data) => console.log(data)); // Using string

steamladder
  .getLadder("xp", Region.SOUTH_AMERICA)
  .then((data) => console.log(data)); // Using region
steamladder.getLadder("xp", "south_america").then((data) => console.log(data)); // Using region string
steamladder.getLadder("xp", "BR").then((data) => console.log(data)); // Using ISO 3166-1 alpha-2 country code

Backers

Backers are the people who contribute to our projects monetarily. They get their image with a link to their website on this page, an awesome badge on their Switchblade profile and a role that grants exclusive access to some channels in our discord server. Click here and become a backer today!

Sponsors

Sponsors are organizations and companies that contribute to our projects with money. They get their logo with a link to their website on this page! Click here and become a sponsor today!