|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
|
10 | | -Python-wowapi is a client library for interacting with the World of Warcraft |
11 | | -Community and Game Data API. |
| 10 | +Python-wowapi is a client library for interacting with the World of Warcraft endpoins of the [Blizzard API](https://develop.battle.net/documentation/guides/getting-started) |
12 | 11 |
|
13 | | -To interact with this library, you need to first get a client-id and client secret by registering [here](https://develop.battle.net/access) |
| 12 | +Python-wowapi includes support for the following WoW API's: |
| 13 | +* Community API |
| 14 | +* Game data API |
| 15 | +* Character Profile API |
| 16 | + |
| 17 | +To interact with this library, you need to first get a client-id and client secret by [registering](https://develop.battle.net/access) your application. |
14 | 18 |
|
15 | 19 | For more information about official World of Warcraft API's visit: |
16 | | -[Official API documentation](https://develop.battle.net/documentation) |
17 | | -[Official API Forum](https://us.battle.net/forums/en/bnet/15051532/) |
| 20 | +* [Official API documentation](https://develop.battle.net/documentation) |
| 21 | +* [Official API Forum](https://us.forums.blizzard.com/en/blizzard/c/api-discussion) |
| 22 | + |
| 23 | +## API Docs |
18 | 24 |
|
19 | | -API documentation can be found at [python-wowapi.readthedocs.org](https://python-wowapi.readthedocs.org). Examples and installation instructions are documented here. |
| 25 | +For examples and all available endpoints, visit the [API Documentation](docs/api.md) |
20 | 26 |
|
21 | 27 | ## Installing |
22 | 28 |
|
23 | 29 | ```bash |
24 | 30 | pip install python-wowapi |
25 | 31 | ``` |
26 | 32 |
|
27 | | -## API instance |
28 | | - |
29 | | -```python |
30 | | -import os |
31 | | - |
32 | | -from wowapi import WowApi |
33 | | - |
34 | | -api = WowApi(os.environ['WOW_CLIENT_ID'], os.environ['WOW_CLIENT_SECRET']) |
35 | | -``` |
36 | | - |
37 | | -## Community API example |
38 | | - |
39 | | -```python |
40 | | -api.get_auctions('eu', 'silvermoon', locale='de_DE') |
41 | | -``` |
42 | | - |
| 33 | +## WoW Classic API support |
43 | 34 |
|
44 | | -## Game Data API examples |
| 35 | +According to this [Forum post](https://us.forums.blizzard.com/en/blizzard/t/world-of-warcraft-classic-api-endpoints/346), Blizzard is adding support for some game data API's. |
45 | 36 |
|
| 37 | +In order to use these endpoints, you need to provide the classic namespace: |
46 | 38 |
|
47 | | -### Get token price |
48 | 39 | ```python |
49 | | -api.get_token('eu', namespace='dynamic-eu', locale='de_DE') |
| 40 | +api.get_item_class_index('us', 'static-classic-us') |
50 | 41 | ``` |
51 | 42 |
|
52 | | -### Get class specializations and detail specialization resource |
53 | | -```python |
54 | | -data = api.get_playable_specializations('us', namespace='static-us') |
| 43 | +## Development & Testing |
55 | 44 |
|
56 | | -spec_id = data['character_specializations'][0]['id'] |
57 | | -specialization = api.get_playable_specialization('us', namespace='static-us', spec_id=spec_id) |
| 45 | +```bash |
| 46 | +make devinstall |
| 47 | +pytest |
58 | 48 | ``` |
59 | 49 |
|
60 | | -### Get game data resource by url |
61 | | - |
62 | | -This example shows how to fetch a game data resource by url. |
63 | | -The `get_data_resource` method will take care of adding your access_token to the url. |
| 50 | +Alternatively you can also run the full [drone.io](https://drone.io) pipeline [locally](https://docs.drone.io/cli/install/) or [remote](https://cloud.drone.io/lockwooddev/python-wowapi/) |
64 | 51 |
|
65 | | -```python |
66 | | -api.get_data_resource('https://eu.api.blizzard.com/data/wow/connected-realm/509?namespace=dynamic-eu', region='eu') |
| 52 | +```bash |
| 53 | +drone exec |
67 | 54 | ``` |
68 | 55 |
|
69 | | - |
70 | | -## Development & Testing |
| 56 | +To build the docs: |
71 | 57 |
|
72 | 58 | ```bash |
73 | | -pip install -e . |
74 | | -pip install -e .[tests] |
75 | | -pytest |
| 59 | +make docs |
76 | 60 | ``` |
0 commit comments