Package Exports
- steamid-resolver
- steamid-resolver/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (steamid-resolver) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-steamid-resolver
NPM library to get steamIDs from profile or group links, the other way around and validate sharedfileIDs.
Sharedfile IDs are used to uniquely identify Screenshots, Artworks and Guides on Steam.
It can also return you all information Steam knows about a profile in a nice object format.
Install
Note: If you are here from GitHub Packages please use the npm package with the command below instead of the scoped GitHub command from above. It won't work.
Open a terminal in your project folder and run:npm install steamid-resolver
You can then import the library in your code:
const steamIdResolver = require("steamid-resolver")
Functions
All functions support both Promises and callbacks!
This means you can either use await, .then(response => {}) & .catch(err => {}) or pass a callback function (err, response) => {} as parameter.
Note: You cannot use both callbacks and .catch() as a Promise is only rejected when no callback was passed. This prevents any UnhandledPromiseRejection errors crashing your process.
steamID64ToCustomUrl(steamID64, callback)
steamID64- steamID64 or full URL of the user you want to get the customURL of. Example:"76561198260031749"or"https://steamcommunity.com/profiles/76561198260031749"callback- Optional: Called on error or successerr- A String detailing the reason of the failure ornullon successcustomURL- The customURL of the user ornullon failure. Example on success:"3urobeat"
customUrlToSteamID64(customURL, callback)
customURL- customURL or full URL of the user you want to get the steamID64 of. Example:"3urobeat"or"https://steamcommunity.com/id/3urobeat"callback- Optional: Called on error or successerr- A String detailing the reason of the failure ornullon successsteamID64- The steamID64 of the user ornullon failure. Example on success:"76561198260031749"
steamID64ToFullInfo(steamID64, callback)
steamID64- steamID64 or full URL of the user you want to get all information of.callback- Optional: Called on error or successerr- A String detailing the reason of the failure ornullon successinfo- The full information of the user as object ornullon failure. Example: Imagine this but as an object
customUrlToFullInfo(customURL, callback)
customURL- customURL or full URL of the user you want to get all information of.callback- Optional: Called on error or successerr- A String detailing the reason of the failure ornullon successinfo- The full information of the user as object ornullon failure. Example: Imagine this but as an object
groupUrlToGroupID64(groupURL, callback)
groupURL- groupURL or full URL of the group you want to get the groupID64 of. Example:"3urobeatGroup"or"https://steamcommunity.com/groups/3urobeatGroup"callback- Optional: Called on error or successerr- A String detailing the reason of the failure ornullon successgroupID64- The groupID64 of the group ornullon failure. Example on success:"103582791464712227"
groupUrlToFullInfo(groupURL, callback)
groupURL- groupURL or full URL of the group you want to get all information of.callback- Optional: Called on error or successerr- A String detailing the reason of the failure ornullon successinfo- The full information of the group as object ornullon failure. Example: Imagine this but as an object
isValidSharedfileID(sharedfileID, callback)
sharedfileID- Sharedfile ID or full sharedfile URL. Example:"2966606880"or"https://steamcommunity.com/sharedfiles/filedetails/?id=2966606880"callback- Optional: Called on error or successerr- A string detailing the reason of the failure ornullon successisValid-trueif a sharedfile with that ID exists orfalseif not