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-marketplacetf-api

v0.2.0

Published

A Marketplace.TF api wrapper used and maintained by SteamSecurity.org

Downloads

4

Readme

About

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

Installation

npm i SS-MarketplaceTF-API

Basic usage

// There are two ways to include this module in your project
// The first way is on a single line
const MarketplaceTF = new (require('ss-marketplacetf-api'))({ key: MARKETPLACETF_API_KEY });

// Alternatively you can do it like this.
const _marketplacetf = require('ss-marketplacetf-api');
const MarketplaceTF = new _marketplacetf({ key: MARKETPLACETF_API_KEY });

See test.js for more examples.

Options

  • key (Required)

    Set this value to your MarketplaceTF API Key. If left unset, this module will throw an error.

  • 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 ignored if caching is disabled.

  • debug

    A Boolean controlling whether or not this module will run in debug mode. This is not recommended for production environments as it outputs a lot of text to the console window.

Methods

  • getProfile(steamid64)

    • steamid64: A valid steamid64 for any account.

      This returns a promise formatted as such:

      {
        seller: Boolean,
        banned: Boolean
      }

      Please note that Marketplace.TF does not have records on every Steam profile. It is likely they only have profiles on users that have ever signed into the website using their account. When this happens, Marketplace.TF will not supply their status of either their reputation, nor seller. As a result, critical information is not returned to us. This library assumes all profiles that do not have a "profile" on Marketplace.TF to be both not banned, and not a seller.

Error Handling

Any errors with the MarketplaceTF API or this module should resolve the promise with both an 'error' and 'error_message' value.

{
	error: 'Status code. Typically "1"',
	error_message: 'A more specific error message'
}

Limitations

This module does not handle the 'GetBots/v2' endpoint due to Marketplace.TF's strict policy of only allowing sellers access to that endpoint. We can not maintain that endpoint if we do not have access to it.

Disclaimer

This module is still a work-in-progress. There may be breaking changes with every update. This will remain true until our v1.0.0 release. Subsequent releases will be much more mature. This module is not endorsed or affiliated with Steam or Valve in any way. This module is not endorsed or affiliated with Marketplace.TF in any way. Please ensure your use of Marketplace.TF API is in line with the Marketplace.TF Terms.