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

steam-provider

v0.3.2

Published

Steam store info provider for searchs and details

Downloads

1,067

Readme

Steam Provider Library

Usage

Install the dependency

npm install steam-provider 

Import the library

TypeScript

import { SteamProvider } from 'steam-provider';

JavaScript

var steam = require('steam-provider')

Search for a game (Limited to 10 first results)

TypeScript

let provider = new SteamProvider();

provider.search("Portal 2", 10, "en", "us").then(result => {
    console.log(result);
})

JavaScript

var provider = new steam.SteamProvider();

provider.search("Portal 2", 10, "en", "us").then(result => {
    console.log(result)
})

Search Results

[ SteamSearchEntry {
    id: '620',
    name: 'Portal 2',
    url:
     'https://store.steampowered.com/app/620/Portal_2/?snr=1_7_7_151_150_1',
    price: '19.99',
    priceWithDiscount: '1.99',
    score:
     'Overwhelmingly Positive, 98% of the 89,727 user reviews for this game are positive.' },
  SteamSearchEntry {
    id: '104600',
    name: 'Portal 2 - The Final Hours',
    url:
     'https://store.steampowered.com/app/104600/Portal_2__The_Final_Hours/?snr=1_7_7_151_150_1',
    price: '1.99',
    priceWithDiscount: '0.49',
    score:
     'Very Positive, 81% of the 396 user reviews for this game are positive.' },
  SteamSearchEntry {
    id: '323180',
    name: 'Portal 2 Soundtrack',
    url:
     'https://store.steampowered.com/app/323180/Portal_2_Soundtrack/?snr=1_7_7_151_150_1',
    price: '',
    priceWithDiscount: '',
    score:
     'Positive, 92% of the 13 user reviews for this game are positive.' },
  SteamSearchEntry {
    id: '660',
    name: 'Portal 2 Sixense MotionPack DLC',
    url:
     'https://store.steampowered.com/app/660/Portal_2_Sixense_MotionPack_DLC/?snr=1_7_7_151_150_1',
    price: '',
    priceWithDiscount: '',
    score: '' },
  SteamSearchEntry {
    id: '247120',
    name: 'Portal 2 Sixense Perceptual Pack',
    url:
     'https://store.steampowered.com/app/247120/Portal_2_Sixense_Perceptual_Pack/?snr=1_7_7_151_150_1',
    price: '',
    priceWithDiscount: '',
    score: '' },
  SteamSearchEntry {
    id: '400',
    name: 'Portal',
    url:
     'https://store.steampowered.com/app/400/Portal/?snr=1_7_7_151_150_1',
    price: '9.99',
    priceWithDiscount: '0.99',
    score:
     'Overwhelmingly Positive, 97% of the 35,114 user reviews for this game are positive.' },
  SteamSearchEntry {
    id: '317400',
    name: 'Portal Stories: Mel',
    url:
     'https://store.steampowered.com/app/317400/Portal_Stories_Mel/?snr=1_7_7_151_150_1',
    price: '',
    priceWithDiscount: '',
    score:
     'Overwhelmingly Positive, 95% of the 9,457 user reviews for this game are positive.' },
  SteamSearchEntry {
    id: '684410',
    name: 'Bridge Constructor Portal',
    url:
     'https://store.steampowered.com/app/684410/Bridge_Constructor_Portal/?snr=1_7_7_151_150_1',
    price: '9.99',
    priceWithDiscount: '7.99',
    score:
     'Very Positive, 89% of the 1,055 user reviews for this game are positive.' },
  SteamSearchEntry {
    id: '374040',
    name: 'Portal Knights',
    url:
     'https://store.steampowered.com/app/374040/Portal_Knights/?snr=1_7_7_151_150_1',
    price: '19.99',
    priceWithDiscount: '11.99',
    score:
     'Very Positive, 82% of the 9,437 user reviews for this game are positive.' },
  SteamSearchEntry {
    id: '446750',
    name: 'Portal Stories: VR',
    url:
     'https://store.steampowered.com/app/446750/Portal_Stories_VR/?snr=1_7_7_151_150_1',
    price: '',
    priceWithDiscount: '',
    score:
     'Very Positive, 93% of the 785 user reviews for this game are positive.' } ]

Get game details

TypeScript

let provider = new SteamProvider();

provider.detail("620").then(result => {
    console.log(result);
})

JavaScript

var provider = new steam.SteamProvider();

provider.detail("620").then(result => {
    console.log(result)
})

Detail Results

SteamDetailEntry {
  id: '620',
  name: 'Portal 2',
  genres: [ 'Action', 'Adventure' ],
  priceData:
   PriceInfo {
     initialPrice: '19.99',
     finalPrice: '19.99',
     discountPercent: 0 },
  otherData:
   OtherInfo {
     imageUrl: 'https://steamcdn-a.akamaihd.net/steam/apps/620/header.jpg?t=1512411524',
     platforms: [ 'Windows', 'MacOS', 'Linux' ],
     metacriticScore: 95,
     features:
      [ 'Single-player',
        'Co-op',
        'Steam Achievements',
        'Full controller support',
        'Steam Trading Cards',
        'Captions available',
        'Steam Workshop',
        'Steam Cloud',
        'Stats',
        'Includes level editor',
        'Commentary available' ],
     developer: [ 'Valve' ],
     publisher: [ 'Valve' ] } }

Notes

By default the library will recover data in US English and will get the prices in USD currency.

You can choose the language and the currency optionally.

provider.search("Portal 2", "spanish", "es").then(result => {
    console.log(result);
})

provider.detail("620", "spanish", "es").then(result => {
    console.log(result)
})

Known Issues

About & Credits

steam-provider provides basic functionality for parsing Steam games information.

Credits to: ckatzorke for providing me an excelent starting point for this project