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.
import pyhalo.authentication
auth = pyhalo.authentication.HaloFour('[email protected]', 'Passw0rd!')
auth_token = auth.get_new_token()
print(auth_token.__dict__)
# {
# 'gamertag': 'Furiousn00b',
# 'analytics_token': 'C97F9C24...',
# 'spartan_token': 'v2=ede2N...',
# 'live_username': '[email protected]',
# 'live_password': 'Passw0rd!'
# }
import pyhalo.api
api = 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)