npm install npm-tf2inv> quoting some other text
italics
bold
- list 1
- list 2
- list 3
``javascript`
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 moduleloadSchema
- The , or loadPrices 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
`javascript`
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
`javascript`
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
`javascript`
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
`javascript`
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
`javascript`
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
`javascript`
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
`javascript`
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
`javascript`
getSchemaItem(invItem) {
Arguments
- example
- example
- example
---------------------------------------
#####getSchemaItemDefindex
`javascript`
getSchemaItemDefindex(defindex) {
Arguments
- example
- example
- example
---------------------------------------
#####getAllDefs
`javascript`
getAllDefs() {
Arguments
- example
- example
- example
---------------------------------------
#####findItem
`javascript`
findItem(text) {
Arguments
- example
- example
- example
---------------------------------------
#####getQuality
`javascript`
getQuality(invItem) {
Arguments
- example
- example
- example
---------------------------------------
#####qualityName
`javascript`
qualityName(quality) {
Arguments
- example
- example
- example
---------------------------------------
#####originName
`javascript`
originName(origin) {
Arguments
- example
- example
- example
---------------------------------------
#####isP2P
`javascript`
isP2P(inventory, callback) {
Arguments
- example
- example
- example
---------------------------------------
#####getItemLocation
`javascript`
getItemLocation(item) {
Arguments
- example
- example
- example
---------------------------------------
#####getItemLocationLong
`javascript`
getItemLocationLong(item) {
Arguments
- example
- example
- example
---------------------------------------
#####getEquippedClasses
`javascript`
getEquippedClasses(item) {
Arguments
- example
- example
- example
---------------------------------------
#####attributeName
`javascript`
attributeName(attribute) {
Arguments
- example
- example
- example
---------------------------------------
#####getUnusualEffectItem
`javascript`
getUnusualEffectItem(invItem) {
Arguments
- example
- example
- example
---------------------------------------
#####getUnusualEffectIndex
`javascript`
getUnusualEffectIndex(id) {
Arguments
- example
- example
- example
---------------------------------------
#####findUnusualEffect
`javascript`
findUnusualEffect(text) {
Arguments
- example
- example
- example
---------------------------------------
#####getItemPrice
`javascript`
getItemPrice(invItem) {
Arguments
- example
- example
- example
---------------------------------------
#####getSpecificPrice
`javascript`
getSpecificPrice (defindex, quality, priceindex) {
Arguments
- example
- example
- example
---------------------------------------
#####convertCurrency
`javascript`
convertCurrency(price, newCurr) {
Arguments
- example
- example
- example
---------------------------------------
#####craftWeps
`javascript`
craftWeps (inv, tf2Bot, itemIWant, callback) {
Arguments
- example
- example
- example
---------------------------------------
#####craftScrap
`javascript`
craftScrap (inv, tf2Bot, callback) {
Arguments
- example
- example
- example
---------------------------------------
#####craftRec
`javascript`
craftRec (inv, tf2Bot, callback) {
Arguments
- example
- example
- example
---------------------------------------
#####deleteShit
`javascript``
deleteShit (inv, tf2Bot, itemDelete, callback) {
Arguments
- example
- example
- example
---------------------------------------