npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

steampe

v2.1.7

Published

This is just a simple steam API wrapper built in JS/Node.js.

Downloads

12

Readme

SteamPE

This is just a simple steam API wrapper built in JS/Node.js. This will also require a steam API key, if you dont have one go here to get one.

Installation

// NPM Installation
$ npm install steampe --save
// Yarn Installation 
$ yarn add steampe

Setting It Up!

const SteamPE = require('steampe');
const steamAPI = new SteamPE({
    // This also come with options.
    // The Steam API key which is required...
    key: 'STEAM_API_KEY'
    // If set this will default any steamID64 parameter with the option like the example below.
    defaultUser: 'STEAM_ID64', 
    // If set this will default any appID parameter with this option like the example below.
    defaultApp: 'APP_ID'
    // Remember the IDs' must be in a string, or else it shall error.
})

Methods

resolve

Resolves steam user's vanityURL/name to a steamID64

steamAPI.resolve('https://steamcommunity.com/id/IMSTONIC/')
    .then(res => console.log(res)) // Expecting output: The user steamID64.
    .catch(err => console.error(err)) // Handling your errors...

getPlayerSummaries

Grabs the steam user / users summary.

// Can either use an array or a string of userIDs

steamAPI.getPlayerSummaries('76561198197461128')
    .then(res => console.log(res)) // Expecting output: The user summaries...
    .catch(err => console.error(err))

steamAPI.getPlayerSummaries(['76561198197461128', '76561198242531902'])
    .then(res => console.log(res)) // Expecting output: The users summaries...
    .catch(err => console.error(err))

getNewsForApp

Grabs any recent news on the app.

steamAPI.getNewsForApp('504230')
    .then(res => console.log(res)) // Expecting output: The news for the app...
    .catch(err => console.error(err))

getGlobalAchievementPercentagesForApp

Grabs the global achievement percentages for the app.

steamAPI.getGlobalAchievementPercentagesForApp('504230')
    .then(res => console.log(res)) // Expecting output: The Global achievement percentages for the app.
    .catch(err => console.error(err))

getAppList

Grabs a list of apps from steam.

steamAPI.getAppList()
    .then(res => console.log(res)) // Expecting output: The steam app list...
    .catch(err => console.error(err));

getFriendList

Grabs the user's friend list.

steamAPI.getFriendList('76561198197461128')
    .then(res => console.log(res)) // Expecting output: The user's friend list...
    .catch(err => console.error(err))

getPlayerAchievements

Grabs the user's achievements.

steamAPI.getPlayerAchievements('504230', '76561198197461128')
    .then(res => console.log(res))
    .catch(err => console.error(err))

getUserStatsForGame

Grabs the user's stats for the game / app.

steamAPI.getUserStatsForGame('504230', '76561198197461128')
    .then(res => console.log(res)) // Expecting output: The user stats for the app...
    .catch(err => console.error(err))

getOwnedGames

Grab's the user's owned games/apps.

steamAPI.getOwnedGames('76561198197461128')
    .then(res => console.log(res)) // Expecting output: The user owned games in appids...
    .catch(err => console.error(err))

getRecentlyPlayedGames

Returns potential user's recently played games.

steamAPI.getRecentlyPlayedGames('76561198197461128')
    .then(res => console.log(res)) // Expecting output: The most recent appids that the user played.
    .catch(err => console.error(err))

isPlayingSharedGame

If that potential user is playing a shared game... this shall return the user who bought the game id.

steamAPI.isPlayingSharedGame('76561198197461128', '504230')
    .then(res => console.log(res))
    .catch(err => console.error(err))

getSchemaForGame

Returns the schema for the app.

steamAPI.getSchemaForGame('504230')
    .then(res => console.log(res)) // Expecting output: the app schema
    .catch(err => console.error(err))

getPlayerBans

Returns Community, VAC, and Economy ban statuses for given users'.

// Can either use an array or a string of userIDs

steamAPI.getPlayerBans('76561198197461128')
    .then(res => console.log(res)) // Expecting output: The user ban info
    .catch(err => console.error(err))

steamAPI.getPlayerBans(['76561198197461128', '76561198242531902'])
    .then(res => console.log(res)) // Expecting output: The users ban info
    .catch(err => console.error(err))

getPlayerLevel

Grabs the user's level

steamAPI.getPlayerLevel('76561198197461128')
    .then(res => console.log(res)) // Expecting output: 
    .catch(err => console.error(err))

getPlayerBadges

Returns user's badges.

steamAPI.getPlayerBadges('76561198197461128')
    .then(res => console.log(res)) // Expecting output: Returns user's badges.
    .catch(err => console.error(err))

getCommunityBadgeProgress

Grabs the global / community badge progess fror the directed steam user and app.

steamAPI.getCommunityBadgeProgress('76561198197461128', '504230')
    .then(res => console.log(res)) // Expecting output: the badge communtity progress
    .catch(err => console.error(err))

Contributing

To contribute follow these simple steps

This is totally optional... If you don't want to do it you do not have to, You will still have the package and everything...