steampy
steampy copied to clipboard
Accept friend requests
Cheers! It would be very nice, if your lib allows to accept friend requests :=)
I will look into this.
Sure, nice feature
After some research I found out that getting friend requests is not possible if you only want to access the web API. If we want this feature, we have to connect to steam's CM servers. It will be much work but creating a CM client will also allow us to add events that can improve performance in many ways: Automatic detection of new trade offers, automatically receiving new chat messages, etc.
Should this be part of this library? I could create the CM client framework and add some basic features like parsing friend requests and some events. I don't know how much time it will take since this is a really big feature. That's why I'm going to create the basic functionality of the CM client first and submit a pull request. Then everybody else can help adding the many features that come with it.
Yeah that sounds great! 👍
In the meantime, I'm going to add the method get_friend_list
which will return the current friend list (without requests).
@bukson we planned to deprecate dict returns. Should I return the friends as instances of a new class, as a dict or as a class that can be accessed exactly like a dict?
I'm pretty sure that this could be achieved by doing http requests. I suggest you to use node-steamcommunity as a guideline. I implemented some features from there, but I haven't implemented friend requests yet. I can try to work on it when I get home.
Already looked into the node library. Http requests will only show your current friendlist, not your open requests. The only way is to get the data from the CM server.
I don't really know why this is needed. The python steam module does this, and is very good at it. Why reinvent the wheel?
Wouldn't it be better to have one library with all features instead of two libraries with some features? We already have many features from the "steam" module so why shouldn't we add more?
I think I just found chat http events for friend requests. But haven't found a way yet to get all open requests - only new ones while the bot is running.
@crey4fun lets keep the dict returns for now