All Projects → xDimGG → node-steamapi

xDimGG / node-steamapi

Licence: other
A nice Steam API wrapper for nodejs

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-steamapi

market-pricing
Wrapper for the unofficial Steam Market Pricing API
Stars: ✭ 21 (-81.25%)
Mutual labels:  promise, steam-api
Rapid.js
An ORM-like Interface and a Router For Your API Requests
Stars: ✭ 700 (+525%)
Mutual labels:  promise, api-wrapper
Steamapi
A PHP wrapper for interacting with Valve's Steam Community.
Stars: ✭ 25 (-77.68%)
Mutual labels:  api-wrapper, steam-api
popyt
A very easy to use Youtube Data v3 API wrapper.
Stars: ✭ 42 (-62.5%)
Mutual labels:  promise, api-wrapper
purescript-promises
An alternative effect monad for PureScript.
Stars: ✭ 23 (-79.46%)
Mutual labels:  promise
Actuate
One line easy actuation of CSS animation sequences
Stars: ✭ 42 (-62.5%)
Mutual labels:  promise
primeuploads-py
An unoffcial python API client for primeuploads.com
Stars: ✭ 40 (-64.29%)
Mutual labels:  api-wrapper
arraync
Async Array methods polyfills
Stars: ✭ 16 (-85.71%)
Mutual labels:  promise
ro.py
ro.py is a modern, asynchronous Python 3 wrapper for the Roblox API.
Stars: ✭ 65 (-41.96%)
Mutual labels:  api-wrapper
humanapi
The easiest way to integrate health data from anywhere - https://www.humanapi.co
Stars: ✭ 21 (-81.25%)
Mutual labels:  api-wrapper
ReplAPI.it-NodeJS
[DEPRECIATED] 𝙀𝙫𝙚𝙧𝙮𝙩𝙝𝙞𝙣𝙜 𝙍𝙚𝙥𝙡𝙞𝙩, 𝙖𝙡𝙡 𝙖𝙩 𝙮𝙤𝙪𝙧 𝙙𝙞𝙨𝙥𝙤𝙨𝙖𝙡. This is the single most extensive Replit package, allowing you to access various parts of the site with just a few classes and methods. Maintained by @RayhanADev.
Stars: ✭ 32 (-71.43%)
Mutual labels:  api-wrapper
ramapi
Python implementation for the Rick and Morty API
Stars: ✭ 17 (-84.82%)
Mutual labels:  api-wrapper
blscrapeR
A tool to gather, analyze and visualize data from the Bureau of Labor Statistics (BLS) API. Functions include segmentation, geographic analysis and visualization.
Stars: ✭ 89 (-20.54%)
Mutual labels:  api-wrapper
crynamo
DynamoDB client for Crystal.
Stars: ✭ 14 (-87.5%)
Mutual labels:  object-oriented
replace-in-files
Replace text in one or more files or globs.
Stars: ✭ 21 (-81.25%)
Mutual labels:  promise
sparql-micro-service
SPARQL micro-services: A lightweight approach to query Web APIs with SPARQL
Stars: ✭ 22 (-80.36%)
Mutual labels:  api-wrapper
digitalocean
A prototype API for Digital Ocean.
Stars: ✭ 35 (-68.75%)
Mutual labels:  api-wrapper
steam-stylegan2
Train a StyleGAN2 model on Colaboratory to generate Steam banners.
Stars: ✭ 30 (-73.21%)
Mutual labels:  steam-api
lifx-http-api
💡 Thin wrapper around the Lifx HTTP API (http://api.developer.lifx.com/)
Stars: ✭ 17 (-84.82%)
Mutual labels:  promise
blog
My Blog About Computers
Stars: ✭ 106 (-5.36%)
Mutual labels:  object-oriented

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 generate an API key.

Usage

First, we start by making a SteamAPI "user".

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

Now, we can call methods on the steam object.

For example, let's retrieve the SteamID64 of a user. SteamAPI provides a resolve method, which accepts URLs and IDs.

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

Now let's take that ID, and fetch the user's 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
	}
	*/
});

Documentation

SteamAPI

Kind: global class

new SteamAPI(key, [options])

Sets Steam key for future use.

Param Type Default Description
key string Steam key
[options] Object {} Optional options for caching and warnings getGameDetails()
[options.enabled] boolean true Whether caching is enabled
[options.expires] number 86400000 How long cache should last for in ms (1 day by default)
[options.disableWarnings] boolean false Whether to suppress warnings

steamAPI.get(path, [base], [key]) ⇒ Promise.<Object>

Get custom path that isn't in SteamAPI.

Kind: instance method of SteamAPI
Returns: Promise.<Object> - JSON Response

Param Type Default Description
path string Path to request e.g '/IPlayerService/GetOwnedGames/v1?steamid=76561198378422474'
[base] string "this.baseAPI" Base URL
[key] string "this.key" The key to use

steamAPI.resolve(info) ⇒ Promise.<string>

Resolve info based on id, profile, or url. Rejects promise if a profile couldn't be resolved.

Kind: instance method of SteamAPI
Returns: Promise.<string> - Profile ID

Param Type Description
info string Something to resolve e.g 'https://steamcommunity.com/id/xDim'

steamAPI.getAppList() ⇒ Promise.<Array.<App>>

Get every single app on steam.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<App>> - Array of apps

steamAPI.getFeaturedCategories() ⇒ Promise.<Array.<Object>>

Get featured categories on the steam store.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<Object>> - Featured categories

steamAPI.getFeaturedGames() ⇒ Promise.<Object>

Get featured games on the steam store

Kind: instance method of SteamAPI
Returns: Promise.<Object> - Featured games

steamAPI.getGameAchievements(app) ⇒ Promise.<Object>

Get achievements for app id.

Kind: instance method of SteamAPI
Returns: Promise.<Object> - App achievements for ID

Param Type Description
app string App ID

steamAPI.getGameDetails(app, [force]) ⇒ Promise.<Object>

Get details for app id. Requests for this endpoint are limited to 200 every 5 minutes

Kind: instance method of SteamAPI
Returns: Promise.<Object> - App details for ID

Param Type Default Description
app string App ID
[force] boolean false Overwrite cache

steamAPI.getGameNews(app) ⇒ Promise.<Array.<Object>>

Get news for app id.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<Object>> - App news for ID

Param Type Description
app string App ID

steamAPI.getGamePlayers(app) ⇒ Promise.<number>

Get number of current players for app id.

Kind: instance method of SteamAPI
Returns: Promise.<number> - Number of players

Param Type Description
app string App ID

steamAPI.getGameSchema(app) ⇒ Promise.<Object>

Get schema for app id.

Kind: instance method of SteamAPI
Returns: Promise.<Object> - Schema

Param Type Description
app string App ID

steamAPI.getServers(host) ⇒ Promise.<Array.<Server>>

Get every server associated with host.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<Server>> - Server info

Param Type Description
host string Host to request

steamAPI.getUserAchievements(id, app) ⇒ Promise.<PlayerAchievements>

Get users achievements for app id.

Kind: instance method of SteamAPI
Returns: Promise.<PlayerAchievements> - Achievements

Param Type Description
id string User ID
app string App ID

steamAPI.getUserBadges(id) ⇒ Promise.<PlayerBadges>

Get users badges.

Kind: instance method of SteamAPI
Returns: Promise.<PlayerBadges> - Badges

Param Type Description
id string User ID

steamAPI.getUserBans(id) ⇒ Promise.<(PlayerBans|Array.<PlayerBans>)>

Get users bans.

Kind: instance method of SteamAPI
Returns: Promise.<(PlayerBans|Array.<PlayerBans>)> - Ban info

Param Type Description
id string | Array.<string> User ID(s)

steamAPI.getUserFriends(id) ⇒ Promise.<Array.<Friend>>

Get users friends.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<Friend>> - Friends

Param Type Description
id string User ID

steamAPI.getUserGroups(id) ⇒ Promise.<Array.<string>>

Get users groups.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<string>> - Groups

Param Type Description
id string User ID

steamAPI.getUserLevel(id) ⇒ Promise.<number>

Get users level.

Kind: instance method of SteamAPI
Returns: Promise.<number> - Level

Param Type Description
id string User ID

steamAPI.getUserOwnedGames(id) ⇒ Promise.<Array.<Game>>

Get users owned games.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<Game>> - Owned games

Param Type Description
id string User ID

steamAPI.getUserRecentGames(id) ⇒ Promise.<Array.<RecentGame>>

Get users recent games.

Kind: instance method of SteamAPI
Returns: Promise.<Array.<RecentGame>> - Recent games

Param Type Description
id string User ID

steamAPI.getUserServers([hide], [key]) ⇒ Promise.<PlayerServers>

Gets servers on steamcommunity.com/dev/managegameservers using your key or provided key.

Kind: instance method of SteamAPI
Returns: Promise.<PlayerServers> - Servers

Param Type Default Description
[hide] boolean false Hide deleted/expired servers
[key] string "this.key" Key

steamAPI.getUserStats(id, app) ⇒ Promise.<PlayerStats>

Get users stats for app id.

Kind: instance method of SteamAPI
Returns: Promise.<PlayerStats> - Stats for app id

Param Type Description
id string User ID
app string App ID

steamAPI.getUserSummary(id) ⇒ Promise.<PlayerSummary>

Get users summary.

Kind: instance method of SteamAPI
Returns: Promise.<PlayerSummary> - Summary

Param Type Description
id string User ID
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].