Steam WebAPI library for node.js
Supports Node v0.8.26 (or newer) but might work on older versions
A Steam API Key is needed for many of the methods in the API and is a requirement for this library.
All the methods are created at runtime (available after Steam.ready, which retrieves the API methods), rather than compile-time, so this should theoretically support all (existing and future) Steam API methods. No need to worry about calling the correct API version, as it will always be the latest. If you must use a different version simply pass in a {'version': x} option into a method.
To install:
npm install steam-webapi
Example
var Steam = ; // Set global Steam API KeySteamkey = "YOUR API KEY"; Steam;
Example with generators and promises
// Requires node 0.11+ and "node --harmony" var Steam = ;var Promise = ; // Set global Steam API KeySteamkey = "YOUR API KEY"; Steam;
If you plan on only using this for TF2 data only (or just want to default to it), the first example can be rewritten.
var steam = gameid: SteamTF2 appid:SteamTF2; steam;
It works the same for 'key' and other fields.
Tests
$ npm run test
License
MIT