Jump to content
McKay Development

Froxz

Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Froxz

  1. Hi,

    Currently I'm using v3 version:
     

    const Steam = require('steam-client');
    const SteamUser = require('steam-user');
    const SteamCommunity = require('steamcommunity');
    const TradeOfferManager = require('steam-tradeoffer-manager');
    
    let client = new Steam.CMClient();
    
    client.setHttpProxy(proxyUrl);
    
    let user = new SteamUser(client, {
    	debug: true,
    	singleSentryfile: false,
    	autoRelogin: true,
    	dataDirectory: '/files/clients'
    });
    
    let community = new SteamCommunity();
    
    let manager = new TradeOfferManager({
    	steam: user,
    	community: community
    });
    

    And in v4 I should change to:

     

    const SteamUser = require('steam-user');
    const SteamCommunity = require('steamcommunity');
    const TradeOfferManager = require('steam-tradeoffer-manager');
    
    let user = new SteamUser({
    	debug: true,
    	singleSentryfile: false,
    	autoRelogin: true,
    	dataDirectory: '/files/clients'
    });
    
    user.setHttpProxy(proxyUrl);
    
    let community = new SteamCommunity();
    
    let manager = new TradeOfferManager({
    	steam: user,
    	community: community
    });
    

    Can you advice please?

    NOTE: so v4 node-user replaces steam-client?

  2. Yes, because ignorant coders will almost definitely start passing API keys that don't belong to the account they're signed into, and start posting GitHub issues asking what's going on.

     

    If you know what you're doing, you can set the apiKey property directly with the correct key, but please make sure you actually know what you're doing.

     

    Hi, thanks for reply, yes I ended up doing it directly:

     

    user.on('webSession', function(sessionID, cookies) {
    
    	console.log(data.login+': Got webSession');
    
    	manager.apiKey = data.api_key;
    
    	manager.setCookies(cookies, function(err) {});
    
    	community.setCookies(cookies);
    });
    

    Yes, I manually generate the API KEY (Because I use same KEY for LOGIN) just less request and hassle because I know the API KEY.

     

    Thank you.

  3. Hi,

    it is possible to set API?

    Trade-offers:
     

    this.apiKey = null;
    this._community.getWebApiKey(this._domain, (err, key) => {
        if (err) {
            callback(err);
            return;
        }
    
        this.apiKey = key;
        callback();
    });
    
    
    

    I can make a pull request to change 

    this.apiKey = (options.apiKey || null);
    

    Or there is a reason for not giving option to pass api key?

×
×
  • Create New...