A simple wrapper for HaloWaypoint's Halo 4 API, written in Python.
- Windows Live OAuth authentication.
- Spartan Token generation.
- HaloWaypoint API endpoint mapping.
See example.py for further usages.
importpyhalo.authenticationauth=pyhalo.authentication.HaloFour('user@exmaple.com', 'Passw0rd!')
auth_token=auth.get_new_token()
print(auth_token.__dict__)
# {# 'gamertag': 'Furiousn00b', # 'analytics_token': 'C97F9C24...', # 'spartan_token': 'v2=ede2N...', # 'live_username': 'user@exmaple.com',# 'live_password': 'Passw0rd!'# }importpyhalo.apiapi=pyhalo.api.HaloFour(auth_token)
api_version=api.get_api_version()
print(api_version)
# {# 'Current': '1.0.14056.1'# }pip install -r requirements.txt
Damon Pollard (@DamonLPollard)