Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: membership_types dict. for more intuitive platform selection #24

Open
glass-ships opened this issue Jul 14, 2022 · 1 comment

Comments

@glass-ships
Copy link

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

@jgayfer
Copy link
Owner

jgayfer commented Nov 16, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants