steamwebapi

0.0.4 • Public • Published

Steam Web API Node.js SDK

Travis CI

Node.js SDK for interfacing with Steam's Web API.

Requirements

Node.js >= 6.0

Installation

Run the following command:

npm install steamwebapi

Usage

Require the SDK in your module by adding the following code

var SteamWebAPI = require('steamwebapi');

Set your API Key (Optional, but required for most API requests)

SteamWebAPI.setAPIKey('***My Steam API Key***');

Set your response format (Default json)

SteamWebAPI.setFormat('xml');

Example

Example for retrieving a list of the 5 most recently played games for a given Steam 64 bit ID, and logging the response in console:

SteamWebAPI.getRecentlyPlayedGames('76561198020275445', 5, function(response) {
    console.log(response);
});

Handling any errors in your request:

SteamWebAPI.getRecentlyPlayedGames('76561198020275445', 5, function(response) {
    if (typeof response.error !== 'undefined') {
        console.log(response.error)
    }
    ...
});

Testing

npm test

Documentation

The official Steam documentation is found at: https://developer.valvesoftware.com/wiki/Steam_Web_API

SDK Documentation:

out/module-SteamWebAPI.html

Supported Enpoints:

  • getFriendList
  • getGlobalAchievementPercentagesForApp
  • getGlobalStatsForGame
  • getNewsForApp
  • getOwnedGames
  • getPlayerAchievements
  • getPlayerSummaries
  • getRecentlyPlayedGames
  • getUserStatsForGame
  • isPlayingSharedGame

License

The Unlicense

Latest version

0.0.4

Package Sidebar

Install

npm i steamwebapi

Weekly Downloads

1

Version

0.0.4

License

Unlicense

Unpacked Size

1.11 MB

Total Files

39

Last publish

Collaborators

  • ksean