index.js
function addInterfaceMethod(interfaceName, funcName, fN) {

    // Store a reference to every interface/method
    if (Steam.INTERFACES[interfaceName] === undefined) {
        Steam.INTERFACES[interfaceName] = {};
    }
    Steam.INTERFACES[interfaceName][funcName] = fN;

    // Camel case the method name
    var name = funcName.substr(0,1).toLowerCase() + funcName.substr(1);

    // Add method to Steam's prototype
    if (!isMultiGameInterface(interfaceName)) {
        steam[name] = fN;
    }
    // If multiple interfaces use the same method name
    // Create a new method that requires a gameid property to find the correct method
    //  and call the steam method automatically
    else {
        // We only need to do this once
        if (steam[name] !== undefined) return;

        // e.g. Turns 'IEconItems_440' into 'IEconItems'
        var multi_interface_name = interfaceName.split('_')[0];

        // Add method to Steam's prototype
        steam[name] = function(steamObj, callback) {
            var gameid = get(this, steamObj, 'gameid');

            var interface_name = multi_interface_name + '_' + gameid;

            Steam.INTERFACES[interface_name][funcName].call(this, steamObj, callback);
        };
    }

}
function addInterfaceMethod(interfaceName, funcName, fN) {

    // Store a reference to every interface/method
    if (Steam.INTERFACES[interfaceName] === undefined) {
        Steam.INTERFACES[interfaceName] = {};
    }
    Steam.INTERFACES[interfaceName][funcName] = fN;

    // Camel case the method name
    var name = funcName.substr(0,1).toLowerCase() + funcName.substr(1);

    // Add method to Steam's prototype
    if (!isMultiGameInterface(interfaceName)) {
        steam[name] = fN;
    }
    // If multiple interfaces use the same method name
    // Create a new method that requires a gameid property to find the correct method
    //  and call the steam method automatically
    else {
        // We only need to do this once
        if (steam[name] !== undefined) return;

        // e.g. Turns 'IEconItems_440' into 'IEconItems'
        var multi_interface_name = interfaceName.split('_')[0];

        // Add method to Steam's prototype
        steam[name] = function(steamObj, callback) {
            var gameid = get(this, steamObj, 'gameid');

            var interface_name = multi_interface_name + '_' + gameid;

            Steam.INTERFACES[interface_name][funcName].call(this, steamObj, callback);
        };
    }

}
function addInterfaceMethod ( interfaceName , funcName , fN ) { // Store a reference to every interface/method if ( Steam . INTERFACES [ interfaceName ] === undefined ) { Steam . INTERFACES [ interfaceName ] = { } ; } Steam . INTERFACES [ interfaceName ] [ funcName ] = fN ; // Camel case the method name var name = funcName . substr ( 0 , 1 ) . toLowerCase ( ) + funcName . substr ( 1 ) ; // Add method to Steam's prototype if ( ! isMultiGameInterface ( interfaceName ) ) { steam [ name ] = fN ; } // If multiple interfaces use the same method name // Create a new method that requires a gameid property to find the correct method //  and call the steam method automatically else { // We only need to do this once if ( steam [ name ] !== undefined ) return ; // e.g. Turns 'IEconItems_440' into 'IEconItems' var multi_interface_name = interfaceName . split ( '_' ) [ 0 ] ; // Add method to Steam's prototype steam [ name ] = function ( steamObj , callback ) { var gameid = get ( this , steamObj , 'gameid' ) ; var interface_name = multi_interface_name + '_' + gameid ; Steam . INTERFACES [ interface_name ] [ funcName ] . call ( this , steamObj , callback ) ; } ; } }
Add some easy references to the new method
Add some easy references to the new method