|
17 | 17 |
|
18 | 18 | # fetch token price for region
|
19 | 19 | api = WowApi(os.environ['WOW_CLIENT_ID'], os.environ['WOW_CLIENT_SECRET'])
|
20 |
| -data = api.get_token('eu', namespace='dynamic-eu', locale='de_DE') |
| 20 | +data = api.get_token_index('eu', namespace='dynamic-eu', locale='de_DE') |
21 | 21 | pprint(data)
|
22 | 22 |
|
23 | 23 | # get realm list and request detail href with the get_data_resource method
|
24 |
| -data = api.get_realms('us', namespace='dynamic-us') |
| 24 | +data = api.get_realm_index('eu', namespace='dynamic-eu', locale='de_DE') |
25 | 25 | detail_url = data['realms'][0]['key']['href']
|
26 |
| -detail_data = api.get_data_resource(detail_url, region='us') |
| 26 | +detail_data = api.get_data_resource(detail_url, region='eu', locale='de_DE') |
27 | 27 | pprint(detail_data)
|
28 | 28 |
|
29 | 29 | # get playable specializations list and fetch a single specialization with the api
|
30 |
| -data = api.get_playable_specializations('us', namespace='static-us') |
| 30 | +data = api.get_playable_specialization_index( |
| 31 | + 'eu', namespace='static-eu', locale='de_DE' |
| 32 | +) |
31 | 33 | spec_id = data['character_specializations'][0]['id']
|
32 |
| -specialization = api.get_playable_specialization('us', namespace='static-us', spec_id=spec_id) |
| 34 | +specialization = api.get_playable_specialization( |
| 35 | + 'eu', namespace='static-eu', spec_id=spec_id, locale='de_DE' |
| 36 | +) |
33 | 37 | pprint(specialization)
|
0 commit comments