Comparing version 2.0.2 to 2.0.3
{ | ||
"author": "lloti <dimggyt@gmail.com> (https://dim.codes)", | ||
"author": "xDimGG <dimggyt@gmail.com> (https://dim.codes)", | ||
"name": "steamapi", | ||
"description": "A nice Steam API wrapper.", | ||
"main": "index.js", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"license": "MIT", | ||
@@ -19,12 +19,12 @@ "eslintConfig": { | ||
"bugs": { | ||
"web": "https://github.com/lloti/node-steamapi/issues" | ||
"web": "https://github.com/xDimGG/node-steamapi/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/lloti/node-steamapi" | ||
"url": "https://github.com/xDimGG/node-steamapi" | ||
}, | ||
"homepage": "https://github.com/lloti/node-steamapi#readme", | ||
"homepage": "https://github.com/xDimGG/node-steamapi#readme", | ||
"devDependencies": { | ||
"eslint-config-lloti": "github:lloti/eslint-config-lloti" | ||
"eslint-config-lloti": "github:xDimGG/eslint-config-lloti" | ||
} | ||
} |
@@ -0,0 +0,0 @@ ## SteamAPI |
@@ -66,3 +66,3 @@ const PlayerAchievements = require('./structures/PlayerAchievements'); | ||
const id = info.match(profileIDReg)[1]; | ||
if (this.resolveCache.has(id)) return this.resolveCache.get(id); | ||
if (this.resolveCache.has(id)) return Promise.resolve(this.resolveCache.get(id)); | ||
@@ -214,3 +214,3 @@ return this | ||
return this | ||
.get(`/ISteamUserStats/GetPlayerAchievements/v1?steamid=${id}&appid=${app}`) | ||
.get(`/ISteamUserStats/GetPlayerAchievements/v1?steamid=${id}&appid=${app}&l=english`) | ||
.then(json => json.playerstats.success ? new PlayerAchievements(json.playerstats) : Promise.reject(new Error('No app/player found'))); | ||
@@ -299,3 +299,3 @@ } | ||
return this | ||
.get(`/IPlayerService/GetOwnedGames/v1?steamid=${id}`) | ||
.get(`/IPlayerService/GetOwnedGames/v1?steamid=${id}&include_appinfo=1`) | ||
.then(json => json.response.games.map(game => new Game(game))); | ||
@@ -364,2 +364,2 @@ } | ||
module.exports = SteamAPI; | ||
module.exports = SteamAPI; |
class Achievement { | ||
constructor(achievement) { | ||
this.api = achievement.apiname; | ||
this.name = achievement.name; | ||
this.description = achievement.description; | ||
this.achieved = Boolean(achievement.achieved); | ||
@@ -17,2 +19,2 @@ this.unlockTime = achievement.unlocktime; | ||
module.exports = Achievement; | ||
module.exports = Achievement; |
@@ -0,0 +0,0 @@ class Badge { |
@@ -0,0 +0,0 @@ const Player = require('./Player'); |
@@ -0,9 +1,14 @@ | ||
const cdn = 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/apps'; | ||
class Game { | ||
constructor(game) { | ||
this.name = game.name; | ||
this.appID = game.appid; | ||
this.playTime = game.playtime_forever; | ||
this.playTime2 = game.playtime_2weeks || 0; | ||
this.logoURL = `${cdn}/${game.appid}/${game.img_logo_url}.jpg`; | ||
this.iconURL = `${cdn}/${game.appid}/${game.img_icon_url}.jpg`; | ||
} | ||
} | ||
module.exports = Game; | ||
module.exports = Game; |
@@ -0,0 +0,0 @@ class GameServer { |
@@ -0,0 +0,0 @@ class Player { |
@@ -0,0 +0,0 @@ const Achievement = require('./Achievement'); |
@@ -0,0 +0,0 @@ const Badge = require('./Badge'); |
@@ -0,0 +0,0 @@ const Player = require('./Player'); |
@@ -0,0 +0,0 @@ const GameServer = require('./GameServer'); |
@@ -0,0 +0,0 @@ const Player = require('./Player'); |
@@ -21,2 +21,5 @@ const Player = require('./Player'); | ||
this.visibilityState = player.communityvisibilitystate; | ||
this.countryCode = player.loccountrycode; | ||
this.stateCode = player.locstatecode; | ||
this.cityID = player.loccityid; | ||
} | ||
@@ -41,2 +44,2 @@ | ||
module.exports = PlayerSummary; | ||
module.exports = PlayerSummary; |
@@ -0,0 +0,0 @@ const Game = require('./Game'); |
@@ -0,0 +0,0 @@ class Server { |
@@ -0,0 +0,0 @@ const { createDeflate, createGunzip } = require('zlib'); |
@@ -0,0 +0,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
24967
606