一个面向对象的 Steam API 包装器,适用于 Node.js 开发人员。
A list of all the methods SteamAPI provides is available here.
import statement instead of require(){ enabled, expires, disableWarnings } to { language, currency, headers, baseAPI, baseStore, baseActions, inMemoryCacheEnabled, gameDetailCacheEnabled, gameDetailCacheTTL, userResolveCacheEnabled, userResolveCacheTTL }inMemoryCacheEnabled: false and setting .gameDetailCache/.userResolveCache. Must implement CacheMap interface in src/Cache.tsgetGameDetails to return either a GameDetails object or a map of string to GameDetails depending on if the user supplied a single id or an array of ids.npm i steamapiOnce signed into Steam, head over to http://steamcommunity.com/dev/apikey to generate an API key.
First, we start by making a SteamAPI "user".
import SteamAPI from '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.
…暂无开放 Issues,或尚未同步最近议题。