pydest icon indicating copy to clipboard operation
pydest copied to clipboard

Suggestion: membership_types dict. for more intuitive platform selection

Open glass-ships opened this issue 2 years ago • 1 comments

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

glass-ships avatar Jul 14 '22 19:07 glass-ships

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.

jgayfer avatar Nov 16 '22 01:11 jgayfer