steampy icon indicating copy to clipboard operation
steampy copied to clipboard

Accept friend requests

Open deemonrider opened this issue 7 years ago • 11 comments

Cheers! It would be very nice, if your lib allows to accept friend requests :=)

deemonrider avatar Jan 13 '18 14:01 deemonrider

I will look into this.

timwoocker avatar Jan 13 '18 14:01 timwoocker

Sure, nice feature

bukson avatar Jan 13 '18 15:01 bukson

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.

timwoocker avatar Jan 13 '18 18:01 timwoocker

Yeah that sounds great! 👍

deemonrider avatar Jan 13 '18 18:01 deemonrider

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?

timwoocker avatar Jan 13 '18 18:01 timwoocker

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.

mactep avatar Jan 13 '18 23:01 mactep

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.

timwoocker avatar Jan 13 '18 23:01 timwoocker

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?

Zwork101 avatar Jan 14 '18 03:01 Zwork101

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?

timwoocker avatar Jan 14 '18 09:01 timwoocker

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.

timwoocker avatar Jan 14 '18 14:01 timwoocker

@crey4fun lets keep the dict returns for now

bukson avatar Jan 14 '18 16:01 bukson