pydest
pydest copied to clipboard
Suggestion: membership_types dict. for more intuitive platform selection
The integer system works, and is common enough that it doesn't necessarily need to be changed.
But I think a case could be made for matching and working more directly with Bungie's membership type enum.
For example, something like:
membership_types = {
'none': 0,
'xbox': 1,
'psn': 2,
'steam': 3,
'blizzard': 4,
'stadia': 5,
'demon': 10,
'bungienext': 254,
'all': -1
}
Then in a pydest method, you could for example do destiny.api.search_destiny_player('steam', 'glass ships#9821')
and parse the result as membership_types ['steam']
in the search_destiny_player()
method
This is an amazing project by the way, a Python wrapper for the bungie API has long been needed. If there are any areas for contribution, please let me know, I'd be happy to help out however I can to keep this project healthy
I'm open to the idea of an enum for this.
Of course we wouldn't want to make any breaking changes, but passing in an enum value could be handy.