https://github.com/anthok/overwatch-api
Python Overwatch API Wrapper
https://github.com/anthok/overwatch-api
api overwatch overwatch-api python
Last synced: 3 months ago
JSON representation
Python Overwatch API Wrapper
- Host: GitHub
- URL: https://github.com/anthok/overwatch-api
- Owner: anthok
- License: mit
- Created: 2016-06-18T00:45:11.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-22T17:08:14.000Z (about 9 years ago)
- Last Synced: 2025-09-28T23:23:42.404Z (9 months ago)
- Topics: api, overwatch, overwatch-api, python
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 36
- Watchers: 7
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# overwatch-api
Python Overwatch API
## Install
Requires Python 3.5 or greater!
``` bash
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
``` python
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
``` python
import asyncio, aiohttp
from overwatch_api.core import AsyncOWAPI
from overwatch_api.constants import *
client = AsyncOWAPI()
await client.get_profile("Danielfrogs#2552", platform=PC)
await client.get_stats("Danielfrogs#2552", platform=XBOX)
await client.get_achievements("Danielfrogs#2552", platform=PLAYSTATION)
await client.get_hero_stats("Danielfrogs#2552")
```
## Testing (Not working in 0.5 yet!)
``` bash
python setup.py test
```
## Deprecated Calls (0.4 and below)
``` python
from overwatch_api import *
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)
```