Steam Web API for Node.js and io.js
This is an extremely simple node wrapper for Steam Web API. It's very experimental and the API will likely change.
Installation
npm install steam-web-api
Usage
The module exports a single getInterface
function.
var getInterface = ;
Call it with a Web API interface name and an optional API key.
var steamRemoteStorage = ;// orvar steamRemoteStorage = ;
It returns an object with two properties: get
and post
. Both are functions that accept the following arguments:
- Method name, e.g.
'GetCollectionDetails'
. - Method version, e.g.
1
. - Object with the parameters which will be serialized into a query string. Multiple values (e.g. for "publishedfileids") can be passed as arrays. Unlike other query string modules, this supports binary data (as Buffers) used in AuthenticateUser.
- Callback. The first argument is status code, the second argument is the parsed JSON response if status code is 200.
get
sends a GET request, post
sends a POST request. It retries automatically on network errors.
steamRemoteStorage; steamRemoteStorage;