npm

Need private packages and team management tools?Check out npm Orgs. »

steam-user-has-item

1.0.0 • Public • Published

steam-user-has-item Build Status

Check if user has item in his inventory.

Install

$ npm install --save steam-user-has-item

Usage

var hasItem = require('steam-user-has-item');
hasItem({user: 'awtt', item: '937246119_188530139'});
 
hasItem.then(item => {
    console.log(item);
});

Usage with timeout

var hasItem = require('steam-user-has-item');
hasItem({user: 'awtt', item: '937246119_188530139', timeout: 500}); // Will retry every 500 miliseconds if user have the item
 
// Sometime in the future
hasItem.then(item => {
    console.log(item);
});
 
hasItem.clear(); // Optionally you can clear the timeout if you dont want to wait any more

API

hasItem({user, item, game, timeout})

Return: Promise that resolve to item object if found or reject if item is not found

user

Type: String

Steam username or profile ID.

item

Type: String

Item ID from steam-user-inventory

game

Type: String

Default 730/2/ (csgo)

Steam game id.

timeout

Type: Number

Timeout in miliseconds to retry, promise will be resolved once user have the item. (if you know transaction will happen soon)

License

MIT © Daniel Husar

install

npm i steam-user-has-item

Downloadsweekly downloads

1

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability