Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp #83

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ellisonpatterson
Copy link

@ellisonpatterson ellisonpatterson commented Oct 25, 2017

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.

@CyanoFresh
Copy link
Contributor

CyanoFresh commented Oct 25, 2017

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

@ellisonpatterson
Copy link
Author

ellisonpatterson commented Oct 25, 2017

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()
));

@waylaidwanderer
Copy link
Owner

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.

@ghostika
Copy link

ghostika commented Dec 3, 2017

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

@ghostika
Copy link

ghostika commented Dec 7, 2017

@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?

@ellisonpatterson
Copy link
Author

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants