# steam-web-api

> Steam Web API for Node.js

Latest version **0.0.1** (published 2015-07-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install steam-web-api
pnpm add steam-web-api
yarn add steam-web-api
bun add steam-web-api
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-07-16 |
| First published | 2015-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Nikolai Vavilov |
| Maintainers | seishun |
| Keywords | steam |

## Links

- npm: https://www.npmjs.com/package/steam-web-api
- Repository: https://github.com/seishun/node-steam-web-api
- Issues: https://github.com/seishun/node-steam-web-api/issues
- npm.io page: https://npm.io/package/steam-web-api

## Recent versions

- 0.0.1 (latest) — 2015-07-16

## README

# 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.

```js
var getInterface = require('steam-web-api');
```

Call it with a Web API interface name and an optional API key.

```js
var steamRemoteStorage = getInterface('ISteamRemoteStorage');
// or
var steamRemoteStorage = getInterface('ISteamRemoteStorage', 'API KEY');
```

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.

```js
steamRemoteStorage.get('GetUGCFileDetails', 1, {
  ugcid: '534000675759633498',
  appid: 767
}, function(statusCode, response) {
  if (statusCode == 200)
    console.log(response);
});

steamRemoteStorage.post('GetPublishedFileDetails', 1, {
  itemcount: 2,
  publishedfileids: ['406121458', '425876040']
}, function(statusCode, response) {
  if (statusCode == 200)
    console.log(response);
});
```

---
_Source: https://npm.io/package/steam-web-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
