# steamwrap

> Steam API wrapper for Node.js

Latest version **0.2.0** (published 2017-06-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install steamwrap
pnpm add steamwrap
yarn add steamwrap
bun add steamwrap
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-06-01 |
| First published | 2017-05-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Drake Main |
| Maintainers | drakemain |

## Links

- npm: https://www.npmjs.com/package/steamwrap
- Repository: https://github.com/drakemain/steamwrap
- Homepage: https://github.com/drakemain/steamwrap#readme
- Issues: http://github.com/drakemain/steamwrap/issues
- npm.io page: https://npm.io/package/steamwrap

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.81.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.1

## Recent versions

- 0.2.0 (latest) — 2017-06-01
- 0.1.5 — 2017-05-30
- 0.1.4 — 2017-05-29
- 0.1.3 — 2017-05-29

## README

# Steamwrap
A Steam API wrapper for Node.js.


# Setup
`npm install steamwrap`

```javascript
var Steamwrap = require('steamwrap');
```

Many API calls (but not all) require a Steam API key. Make sure to use the SetKey method once at the start of your application.

`Steamwrap.SetKey(key)`


# Usage

Return data can be accessed by appending `.then()` to method calls and passing in a single parameter function. Errors can be handled using `.catch()`.

```javascript
Steamwrap.GetNewsForApp(220).then(function(data) {console.log(data);}).catch(function(err) {console.error(err);});
```

Note that return data is a string.

[More information](http://bluebirdjs.com/docs/getting-started.html)

# Methods

The format parameter is optional for all methods. If ommited, JSON will be returned. Possible formats include JSON, xml, and VDF (Valve Data Fromat).

## ISteamUserStats

`GetGlobalStatsForGame(appid, statsArray, format)`

```
statsArray is an array containing the names of achievements as defined in Steamworks.
```

`GetGlobalAchievementPercentagesForApp(appid, format)`

`GetPlayerAchievements(steamid, appid, format)`

`GetUserStatsForGame(steamid, appid, format)`

`GetSchemaForGame(appid, format)`

## ISteamNews

`GetNewsForApp(appid, feedParameters)`

```
feedParameters is optional. It can include any of the following:
*count*: the number of news items returned (default: 1)
*maxlength*: how many characters of the body of each news item is returned (default: 300)
*format*: the format of the returned data (default: JSON)
```

## ISteamUser

`GetFriendList(steamid, format)`

`GetPlayerSummaries(steamids, format)`

```
steamids is an array of valid Steam IDs.
```

`GetPlayerBans(steamids)`

```
steamids is an array of valid Steam IDs.
```

`ResolveVanityURL(vanityurl, format)`

```
Note that vanityurl is the customizable name at the end of a steam profile url. For example to get the Steam ID for the profile steamcommunity.com/id/robinwalker, you would pass in robinwalker for the vanityurl and not the url itself, despite the name of the parameter.
```

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