Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

steamapi

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

steamapi

A nice Steam API wrapper.

  • 2.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
356
decreased by-51.56%
Maintainers
1
Weekly downloads
 
Created
Source

SteamAPI

NPM Discord

Setup

Installation

npm i steamapi

Getting an API Key

Once signed into Steam, head over to http://steamcommunity.com/dev/apikey to make an API key

Usage

First, start by making a new SteamAPI "user"

const SteamAPI = require('steamapi');
const steam = new SteamAPI('steam token');

Now, you can call methods to the steam object

For example, lets get the SteamID64 of a user. SteamAPI provides a resolve method which allows urls/id/profile

steam.resolve('https://steamcommunity.com/id/DimGG').then(id => {
	console.log(id); // 76561198146931523
});

Now let's take that ID and get their profile

steam.getUserSummary('76561198146931523').then(summary => {
	console.log(summary);
	/**
	PlayerSummary {
		avatar: {
			small: 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/7f/7fdf55394eb5765ef6f7be3b1d9f834fa9c824e8.jpg',
			medium: 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/7f/7fdf55394eb5765ef6f7be3b1d9f834fa9c824e8_medium.jpg',
			large: 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/7f/7fdf55394eb5765ef6f7be3b1d9f834fa9c824e8_full.jpg'
		},
		steamID: '76561198146931523',
		url: 'http://steamcommunity.com/id/DimGG/',
		created: 1406393110,
		lastLogOff: 1517725233,
		nickname: 'Dim',
		primaryGroupID: '103582791457347196',
		personaState: 1,
		personaStateFlags: 0,
		commentPermission: 1,
		visibilityState: 3
	}
	*/
});

Methods

  • resolve(info)
  • get(path)
  • getAppList()
  • getFeaturedCategories()
  • getFeaturedGames()
  • getGameAchievements(app)
  • getGameDetails(app)
  • getGameNews(app)
  • getGamePlayers(app)
  • getGameSchema(app)
  • getServers(ip)
  • getUserAchievements(id, app)
  • getUserBadges(id)
  • getUserBans(id)
  • getUserFriends(id)
  • getUserGroups(id)
  • getUserLevel(id)
  • getUserOwnedGames(id)
  • getUserRecentGames(id)
  • getUserServers([hide], [key])
  • getUserStats(id, app)
  • getUserSummary(id)

Keywords

FAQs

Package last updated on 24 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc