@qgisk/steamresolver
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -0,1 +1,19 @@ | ||
#### 2.0.2 (2021-12-02) | ||
##### Chores | ||
* update plausible url ([fe8e4199](https://github.com/QGIsK/steamResolver/commit/fe8e41998480929a6e7bc3d3e938c2cc12ac828f)) | ||
##### New Features | ||
* group id to full profile ([335c5d84](https://github.com/QGIsK/steamResolver/commit/335c5d848b08d50def10b5cd3be223c35127a250)) | ||
* group id to custom url ([ce1607f8](https://github.com/QGIsK/steamResolver/commit/ce1607f8d1dd94e34932a75b50399b01d1319f26)) | ||
#### 2.0.1 | ||
##### Breaking Changes | ||
* 64 -> id ([4d341c89](https://github.com/QGIsK/steamResolver/commit/4d341c8967ec2c0937ce262e09f4e7cf8bd9af9f)) | ||
#### 2.0.0 (2021-11-21) | ||
@@ -2,0 +20,0 @@ |
{ | ||
"name": "@qgisk/steamresolver", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Steam ID Lookup from custom urls and the other way around", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,8 +46,8 @@ const fetch = require('isomorphic-unfetch'); | ||
/** | ||
* @description From 64 to full information | ||
* @function from64ToProfile() | ||
* @description From ID to full information | ||
* @function fromIDToProfile() | ||
* @param {String} steamID | ||
* @returns {String} | ||
*/ | ||
async from64ToProfile(steamID) { | ||
async fromIDToProfile(steamID) { | ||
const formattedID = Utils.parseParams(steamID); | ||
@@ -89,2 +89,20 @@ | ||
/** | ||
* @description From GID to Custom Group Url | ||
* @function fromGIDToCustomURL() | ||
* @param {String} gid | ||
* @returns {String} | ||
*/ | ||
async fromGIDToCustomURL(gid) { | ||
const formattedID = Utils.parseParams(gid); | ||
const url = `${Constants.BaseURL}/gid/${formattedID}/memberslistxml`; | ||
const res = await this._request(url, 'groupDetails'); | ||
// The response on this endpoint is abit different to the others | ||
// so so is the response | ||
return res.groupURL[0]; | ||
} | ||
/** | ||
* @description From group url to full information | ||
@@ -104,5 +122,20 @@ * @function fromCustomToProfile() | ||
/** | ||
* @description From group url to full information | ||
* @function fromGIDToProfile() | ||
* @param {String} gid | ||
* @returns {Promise} | ||
*/ | ||
async fromGIDToProfile(gid) { | ||
const formattedID = Utils.parseParams(gid); | ||
const url = `${Constants.BaseURL}/gid/${formattedID}/memberslistxml`; | ||
return this._request(url); | ||
} | ||
/** | ||
* @description Formats endpoint and params into a url | ||
* @function _request() | ||
* @param {String} url | ||
* @param {String} output | ||
* @returns {Promise} | ||
@@ -122,5 +155,3 @@ */ | ||
if (output) { | ||
resolve(parsedData[output][0]); | ||
} | ||
if (output) resolve(parsedData[output][0]); | ||
@@ -127,0 +158,0 @@ resolve(parsedData); |
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
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
12465
237