PHP-SteamCommunity icon indicating copy to clipboard operation
PHP-SteamCommunity copied to clipboard

Revamp

Open ellisonpatterson opened this issue 7 years ago • 6 comments

I gotta document all the changes, but just something that is available for anyone to sink their teeth into.

Things Incorporated: Full Inventory Parser Network Class that can use proxies and multiple IPs/interfaces Market Parsing Chat Integration on both web and mobile Profile Updating and commenting Friend List management / invitations Group management / invitations Notification fetching Trade Offer itemhover parsing Retries for Trade Offers / Confirmations

Some stuff isn't complete, like the whole thing with captchas or something, but that's related to account creation so not a huge thing and should be easy to fix.

ellisonpatterson avatar Oct 25 '17 08:10 ellisonpatterson

Have you done any benchmarks? If it is faster than current code , it is very good

CyanoFresh avatar Oct 25 '17 11:10 CyanoFresh

The only thing that has really changed is the structure of the code, but the underlying methods that are performed are pretty much the same.

All class instances are stored now throughout the app so that may help with some performance.

You can also capture the SteamCommunity instance now and cache it to a file or whatever and load it up next execution so you don't have to constantly re-login.

Also it made the code much more simplified, so no more passing around an instance of the steamcommunity class.

Creating an instance is pretty much the same:

SteamCommunity::initialize(array(
    'profileName' => 'profileName',
    'username' => 'username',
    'password' => 'password',
    'sharedSecret' => 'sfsd9087safd8790fds8a790sfd',
    'identitySecret' => 'dsfafdsafdsafdsaf',
    'deviceId' => 'sdfafasdfdsfadsfdsa',
    'apiKey' => '8907FADFS700789DFSA088079DFAS',
    'profileId' => 'this is just the bots steam profile custom url',
    'appIds' => array(
        753 => array(
            'title' => 'Steam',
            'contextId' => array(6, 7)
        ),
        730 => array(
            'title' => 'Counter-Strike: Global Offensive',
            'contextId' => array(2)
        ),
        440 => array(
            'title' => 'Team Fortress 2',
            'contextId' => array(2)
        ),
        578080 => array(
            'title' => 'PLAYERUNKNOWN\'S BATTLEGROUNDS',
            'contextId' => array(2)
        )
    ),
    'mobile' => false,
    'rootDir' => '/a/directory,
    'proxies' => array(),
    'interfaces' => array()
));

ellisonpatterson avatar Oct 25 '17 13:10 ellisonpatterson

Looks good! I'll go through your changes, but in the meantime if anybody else would like to help test it, please leave your feedback below.

waylaidwanderer avatar Oct 25 '17 21:10 waylaidwanderer

Is there any update here? I can first test it next week.

ghostika avatar Dec 03 '17 15:12 ghostika

@ellisonpatterson You wrote that it's possible now to capture the steam instance and cache it. Which part would be cached? Or I should simply serialise and deserialise it at caching? And with this static setup how would you handle multiple bots? Should I just call initialize?

ghostika avatar Dec 07 '17 16:12 ghostika

@ghostika just serialize SteamCommunity::getInstance() and you cannot handle multiple bots currently but since everything is based off that instance, it would be pretty easy to adjust it for handling many at once :)

ellisonpatterson avatar Dec 19 '17 21:12 ellisonpatterson