quoting some other text
- italics * ** bold **
- list 1
- list 2
- list 3
function test() {
console.log("notice the blank line before this function?");
}
###Introduction
tf2inv is a module used purposefully for the handling of the valve webAPI methods with relation to Team Fortress 2. Information regarding items and prices are available through the use of specific functions in this module.
This module is not intended to be generic in such a way that other games can be used, but that is a consideration for a future project
###Usage advice
When using this module, a few pre-requisities are to be employed:
- The
start
function must be called (and provide relevant API keys) prior to any other function within this module - The
loadSchema
, orloadPrices
functions must be called prior to utilising any other function that directly consults these objects. The callbacks for loadSchema and loadPrices indicate when these operations have been completed.
###Available functions
####Set-up
#####Start
start(inputSteam, inputBPTF, prefix, inv, friend, summ, play) {
Arguments
- 'inputSteam' - Your steam API key in string formet
- 'inputBPTF' - Your backpack.tf API key in string format
- 'prefix' - A console log message prefix for categorising [OPTIONAL]
- 'inv' - the folder name where cached inventories are stored [OPTIONAL]
- 'friend' - the folder name where cached friendslists are stored [OPTIONAL]
- 'summ' - the folder name where cached player summaries are stored [OPTIONAL]
- 'play' - the folder name where cached playtimes are stored
This function configures and sets up the
#####loadSchema
loadSchema(force, cache, callback) {
Arguments
- 'force' - Bool to force schema refreshing or not
- 'cache' - File location of the schema
- 'callback' - Callback of the function
#####loadPrices
loadPrices(force, cache, callback) {
Arguments
- 'force' - Bool to force schema refreshing or not
- 'cache' - File location of the price schema
- 'callback' - Callback of the function
#####loadFriends
loadFriends(force, sid, callback) {
Arguments
- 'force' - Bool to force profile infos refreshing or not
- 'sid' - SteamID64 of the profile to load
- 'callback' - Callback of the function
#####loadPlayerSummary
loadPlayerSummary(force, sid, callback) {
Arguments
- 'force' - Bool to force profile infos refreshing or not
- 'sid' - SteamID64 of the profile to load
- 'callback' - Callback of the function
#####loadGamePlaytime
loadGamePlaytime(force, sid, callback) {
Arguments
- 'force' - Bool to force profile infos refreshing or not
- 'sid' - SteamID64 of the profile to load
- 'callback' - Callback of the function
#####loadInventory
loadInventory(force, sid, callback) {
Arguments
- 'force' - Bool to force inventory refreshing or not
- 'sid' - SteamID64 of the profile to load
- 'callback' - Callback of the function
#####getSchemaItem
getSchemaItem(invItem) {
Arguments
- example
- example
- example
#####getSchemaItemDefindex
getSchemaItemDefindex(defindex) {
Arguments
- example
- example
- example
#####getAllDefs
getAllDefs() {
Arguments
- example
- example
- example
#####findItem
findItem(text) {
Arguments
- example
- example
- example
#####getQuality
getQuality(invItem) {
Arguments
- example
- example
- example
#####qualityName
qualityName(quality) {
Arguments
- example
- example
- example
#####originName
originName(origin) {
Arguments
- example
- example
- example
#####isP2P
isP2P(inventory, callback) {
Arguments
- example
- example
- example
#####getItemLocation
getItemLocation(item) {
Arguments
- example
- example
- example
#####getItemLocationLong
getItemLocationLong(item) {
Arguments
- example
- example
- example
#####getEquippedClasses
getEquippedClasses(item) {
Arguments
- example
- example
- example
#####attributeName
attributeName(attribute) {
Arguments
- example
- example
- example
#####getUnusualEffectItem
getUnusualEffectItem(invItem) {
Arguments
- example
- example
- example
#####getUnusualEffectIndex
getUnusualEffectIndex(id) {
Arguments
- example
- example
- example
#####findUnusualEffect
findUnusualEffect(text) {
Arguments
- example
- example
- example
#####getItemPrice
getItemPrice(invItem) {
Arguments
- example
- example
- example
#####getSpecificPrice
getSpecificPrice (defindex, quality, priceindex) {
Arguments
- example
- example
- example
#####convertCurrency
convertCurrency(price, newCurr) {
Arguments
- example
- example
- example
#####craftWeps
craftWeps (inv, tf2Bot, itemIWant, callback) {
Arguments
- example
- example
- example
#####craftScrap
craftScrap (inv, tf2Bot, callback) {
Arguments
- example
- example
- example
#####craftRec
craftRec (inv, tf2Bot, callback) {
Arguments
- example
- example
- example
#####deleteShit
deleteShit (inv, tf2Bot, itemDelete, callback) {
Arguments
- example
- example
- example