Socket
Socket
Sign inDemoInstall

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 - npm Package Compare versions

Comparing version 2.0.7 to 2.1.0

6

package.json

@@ -6,6 +6,6 @@ {

"main": "index.js",
"version": "2.0.7",
"version": "2.1.0",
"license": "MIT",
"eslintConfig": {
"extends": "eslint-config-lloti"
"extends": "eslint-config-dim"
},

@@ -28,4 +28,4 @@ "keywords": [

"devDependencies": {
"eslint-config-lloti": "github:xDimGG/eslint-config-lloti"
"eslint-config-dim": "github:xDimGG/eslint-config-dim"
}
}

@@ -8,3 +8,3 @@ ## SteamAPI

<a href="https://www.npmjs.com/package/steamapi"><img src="https://img.shields.io/npm/v/steamapi.svg?maxAge=3600" alt="NPM" /></a>
<a href="https://dc.dim.codes"><img src="https://img.shields.io/discord/204352669731520512.svg?maxAge=3600" alt="Discord" /></a>
<a href="https://discord.dim.codes"><img src="https://img.shields.io/discord/204352669731520512.svg?maxAge=3600" alt="Discord" /></a>
</p>

@@ -19,5 +19,5 @@ </div>

### Getting an API Key
Once signed into Steam, head over to http://steamcommunity.com/dev/apikey to make an API key
Once signed into Steam, head over to http://steamcommunity.com/dev/apikey to generate an API key.
### Usage
First, start by making a new SteamAPI "user"
First, we start by making a SteamAPI "user".
```js

@@ -27,5 +27,5 @@ const SteamAPI = require('steamapi');

```
Now, you can call methods to the `steam` object
Now, we can call methods on the `steam` object.
For example, lets get the SteamID64 of a user. SteamAPI provides a `resolve` method which allows urls/id/profile
For example, let's retrieve the SteamID64 of a user. SteamAPI provides a `resolve` method, which accepts URLs and IDs.
```js

@@ -36,3 +36,3 @@ steam.resolve('https://steamcommunity.com/id/DimGG').then(id => {

```
Now let's take that ID and get their profile
Now let's take that ID, and fetch the user's profile.
```js

@@ -363,2 +363,2 @@ steam.getUserSummary('76561198146931523').then(summary => {

| --- | --- | --- |
| id | <code>string</code> | User ID |
| id | <code>string</code> | User ID |

@@ -15,3 +15,4 @@ const PlayerAchievements = require('./structures/PlayerAchievements');

const { version, name } = require('../package.json');
const reApp = /^\d{1,6}$/;
const reApp = /^\d{1,7}$/;
const reRegion = /us|es|de|fr|ru|nz|au|uk/;
const reID = /^\d{17}$/;

@@ -148,9 +149,11 @@

* @param {boolean} [force=false] Overwrite cache
* @param {string} [region=us] Store region
* @returns {Promise<Object>} App details for ID
*/
getGameDetails(app, force = false) {
getGameDetails(app, force = false, region = 'us') {
if (!reApp.test(app)) return Promise.reject(TypeError('Invalid/no app provided'));
if (!reRegion.test(region)) return Promise.reject(TypeError('Invalid region provided'));
const request = () => this
.get(`/appdetails?appids=${app}`, this.baseStore)
.get(`/appdetails?appids=${app}&cc=${region}`, this.baseStore)
.then(json => json[app].success

@@ -391,2 +394,2 @@ ? json[app].data

module.exports = SteamAPI;
module.exports = SteamAPI;

@@ -0,0 +0,0 @@ class Achievement {

@@ -0,0 +0,0 @@ class Badge {

@@ -0,0 +0,0 @@ const Player = require('./Player');

@@ -0,0 +0,0 @@ const cdn = 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/apps';

@@ -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');

@@ -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 @@ /**

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