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

ss-steamrep-api

v0.10.2

Published

SS-SteamRep-API is a basic wrapper for the SteamRep API used and maintained by SteamSecurity.org.

Downloads

2

Readme

About

SS-SteamRep-API is a basic wrapper for the SteamRep API used and maintained by SteamSecurity.org. Please see Limitations for further details.

Installation

npm i SS-SteamRep-API

Basic usage

// There are two ways to include this module in your project
// The first way is on a single line
const SteamRep = new (require('ss-steamrep-api'))();

// Alternatively you can do it like this.
const _steamrep = require('ss-steamrep-api');
const SteamRep = new _steamrep();

// If you would like to change the default options, you can supply them in an Object like this:
// const SteamRep = new (require('ss-steamrep-api'))({ timeout: 2500, cache: false });

// Get the SteamRep reputation of any steam user by SteamID64
await steamrep.getReputation('STEAMID64').then(console.log);

See test.js or test_min.js for more examples.

Options

  • timeout

    Time to wait in milliseconds before canceling the request and returning with an error.

  • cache_results

    A Boolean dictating whether or not automatic caching happens. Typically you do not want to change from the default value 'true', however if you are using your own cache solution, you may want to disable this.

  • cache_time

    Time to save a cached response in milliseconds. This is set to the lowest recommended value at 30 minutes. This is ignored if caching is disabled.

  • cache

    This is an object containing the entire cache. This can be retrieved, changed, and then reapplied as needed.

Methods

  • getReputation(steamid64)

    • steamid64: A valid steamid64 for any account.

      This returns a promise formatted as such:

      {
          banned: Boolean,  // Whether or not the user is banned from SteamRep or it's affiliates
          warning: Boolean, // Whether or not the user has warnings from SteamRep or it's affiliates
          trusted: Boolean, // Whether or not the user is trusted by SteamRep or it's affiliates
          reports: Number,  // A number representing unconfirmed reports on SteamRep
          tags: Array       // Tags returned to use from SteamRep, formatted in a more sane way.
      }

Error Handling

Any errors with the SteamRep api or this wrapper should reject a request with both an 'error' and 'error_message' value.

{
	error: 'Status code. Often a direct HTTP status code, otherwise most likely "1"',
	error_message: 'A more specific error message',
}

Limitations

SS-SteamRep-API does not return bans relating to Steam. This means that a user with a VAC ban or a Steam Trading ban will appear as if they are completely clean. Valve specific bans are outside of the scope of this package. You may visit our SteamAPI wrapper to get this information.

Disclaimer

This repository is not affiliated with SteamRep. This repository is provided as is. See the included LICENSE file for more information. In accordance with the requests from SteamRep staff, it is advised that you cache your results.This package will automatically cache your requests and responses for the recommended 30 minutes. For more information view the SteamRep forum.