Steamworks Web API wrapper for Node.js.
- Steamworks API endpoints
npm install steamworks-api
# 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.
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);
}
})();