xxgicoxx / steamworks-api

Steamworks Web API wrapper for Node.js.

Home Page:https://www.npmjs.com/package/steamworks-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

steamworks-api

Steamworks Web API wrapper for Node.js.

Features

  • Steamworks API endpoints

Docs

Prerequisites

Installation

npm install steamworks-api

Credentials

1. Steam

# Account
Create an Steam account on https://store.steampowered.com/.

# API Key
Create an API key on https://steamcommunity.com/login/home/?goto=%2Fdev%2Fapikey.

Example

const Steam = require('steamworks-api');

const steam = new Steam({
  key: 'STEAM_API_KEY',
});

(async () => {
  try {
    const recentlyPlayedGames = await steam.get('/IPlayerService/GetRecentlyPlayedGames/v1/', { steamid: '76561198027639832' });
    console.log(await recentlyPlayedGames.json());

    const ownedGames = await steam.get('/IPlayerService/GetOwnedGames/v1/', { steamid: '76561198027639832' });
    console.log(await ownedGames.json());
  } catch (error) {
    console.error(error);
  }
})();

Built With

Authors

Acknowledgments

About

Steamworks Web API wrapper for Node.js.

https://www.npmjs.com/package/steamworks-api

License:MIT License


Languages

Language:JavaScript 100.0%