ValvePython / steam

☁️ Python package for interacting with Steam
http://steam.readthedocs.io
MIT License
1.1k stars 137 forks source link

Add optional "binary" argument to a2s_rules function #359

Closed tjensen closed 3 years ago

tjensen commented 3 years ago

For your consideration, this PR resolves #358 by adding an optional binary argument to the a2s_rules function. Please let me know if you would prefer a different solution.

I have added a unit test for the new behavior, plus a basic "happy path" test covering a2s_rules when all optional arguments use their defaults, since the steam.game_servers module did not have any existing test coverage.

It looks like this project has not yet dropped legacy Python support, so I have added an upper version limit to protobuf in requirements.txt and setup.py because version 3.18 dropped support for Python 2.7.

Finally, the docs were erroneously reporting that the a2s_rules return type is a list, so I have corrected this to report the type as a dict.

tjensen commented 3 years ago

@rossengeorgiev Back to you! Thanks!