Skip to content
This repository was archived by the owner on Oct 25, 2019. It is now read-only.

TF2 Items

Nicklas Marc Pedersen edited this page Aug 4, 2018 · 9 revisions

Properties

ready

Use this to check weather or not the module has been successfully initialized. true if it is, otherwise false.

schema

An instance of Schema, only available after a successful initialization.

Methods

Constructor([options])

  • options - Optional. All options can be set manually after initializing.
    • apiKey - Your Steam API key, can be found here.
    • updateTime - Time in milliseconds to automatically refresh the Schema (default = 24 hours).

Constructs a new instance of tf2-items.

init([callback])

  • callback - Optional. Only needed if checking for errors when calling this.
    • err - If an error occurred, this is an Error object, otherwise null. Will return an error if it did not finish successfully.

Required to call this (and finish successfully) in order to be able to use the other methods.

getInventory(steamid64, callback)

  • steamid64 - SteamID64 of the user you want to get the inventory of.
  • callback
    • err - If an error occurred, this is an Error object, otherwise null.

Returns an instance of Inventory.

Events

ready

Emitted after calling init and not getting any errors. Once this is emitted, you are ready to use the module.

schema

Emitted when the schema has been updated, the callback function contains the schema.

Clone this wiki locally