Skip to content

byome/steamjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SteamJS

Javascript access to the Steam Community API

Initialize

This module uses dotenv, so you can set the ENV variable STEAM_API_KEY. If you do not use a .env file, you can set the apiKey manually:

With dotenv

import Steam from 'steamjs';
const steamClient = new Steam();

Default

import Steam from 'steamjs';
const steamClient = new Steam({ apiKey: '1234ASDF' });

API

getPlayerSummaries(steamIds)

Returns Promise

Note: the Player API is documented in the wiki.

Usage

let players = await getPlayerSummaries('1234,5678');
players.forEach((player) => console.log(player.name()));

or

getPlayerSummaries('1234').then((players) => {
  players.forEach((player) => console.log(player.name()));
});

About

Javascript access to the Steam Community API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published