Skip to content

Latest commit

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

overwatch-api

Python Overwatch API

Install

Requires Python 3.5 or greater!

pip install overwatch-api

[0.5.0] - 2017-04-21

Changes

  • Now using Async, thanks @Drummersbrother!
  • Moving API provider to OWAPI, thanks @Drummersbrother!

Example Code - Supported calls

A segment from example_test.py, which can provide more info on how to use the API.

Call

get_profile(self, battletag: str, regions=(EUROPE, KOREA, AMERICAS, CHINA, JAPAN, ANY),
platform=None, _session=None, handle_ratelimit=None, max_tries=None, request_timeout=None)
#Platform defaults to PC if not specified. #Session can be passed through for a custom aiohttp.Client.client.get_profile("Danielfrogs#2552")

Code

importasyncio, aiohttpfromoverwatch_api.coreimportAsyncOWAPIfromoverwatch_api.constantsimport*client=AsyncOWAPI()
awaitclient.get_profile("Danielfrogs#2552", platform=PC)
awaitclient.get_stats("Danielfrogs#2552", platform=XBOX)
awaitclient.get_achievements("Danielfrogs#2552", platform=PLAYSTATION)
awaitclient.get_hero_stats("Danielfrogs#2552")

Testing (Not working in 0.5 yet!)

 python setup.py test

Deprecated Calls (0.4 and below)

fromoverwatch_apiimport*ow=OverwatchAPI()
ow.get_patch_notes()
ow.get_achievements(PC,AMERICAS,'elyK-1940')
ow.get_platforms(PC,AMERICAS,'elyK-1940')
ow.get_profile(PC,AMERICAS,'elyK-1940')
ow.get_stats_all_heroes(PC,AMERICAS,'elyK-1940',COMP)
ow.get_stats_selected_heroes(PC,AMERICAS,'elyK-1940',COMP,[heroes['MERCY'],heroes['LUCIO']])
ow.get_stats_heroes_used(PC,AMERICAS,'elyK-1940',COMP)

About

Python Overwatch API Wrapper

Topics

Resources

Stars

36 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages