1.1.1 • Published 6 years ago
steamapi.js v1.1.1
Steam API XML Wrapper for JavaScript
Example
const steamAPI = require("steamapi.js")
steamAPI.getSteamPlayer("76561198040068404").then(data => { //SteamID64
console.log(data)
}).catch(err => {
if(err.message === "No Profile") return console.log("No Steam profile Matching this url.")
if(err.message === "Not Public") return console.log("Found a Profile but it wasn't public.")
console.error(err)
});
steamAPI.getSteamPlayer("mrlar").then(profileData => { //Vanity URL
console.log(profileData)
}).catch(err => {
if(err.message === "No Profile") return console.log("No Steam profile Matching this url.")
if(err.message === "Not Public") return console.log("Found a Profile but it wasn't public.")
console.error(err)
});
steamAPI.getSteamPlayerGames("76561198040068404").then(gamesData => { //SteamID64
console.log(gamesData)
}).catch(err => {
if(err.message === "No Profile") return console.log("No Steam profile Matching this url or profile is not public.")
console.error(err)
});
steamAPI.getSteamPlayerGames("mrlar").then(gamesData => { //Vanity URL
console.log(gamesData)
}).catch(err => {
if(err.message === "No Profile") return console.log("No Steam profile Matching this url or profile is not public.")
console.error(err)
});