svartalf / python-wargaming

Pure-pythonic client library for Wargaming API
https://wargaming.net/developers/
MIT License
27 stars 14 forks source link

add parameter to select wargaming cluster for API requests #5

Closed Geno1 closed 8 years ago

Geno1 commented 8 years ago

Hi,

just made a little patch to make your package usable with the other wargaming clusters.

svartalf commented 8 years ago

Probably, something like this will be better and more flexible:

api = wargaming.WoT('app_id', base_url='https://api.worldoftanks.eu/wot/')

Also, support for that functionality almost done. What do you think about that?

Geno1 commented 8 years ago

Well, it's certainly more flexible, but means users will have to manage the URLs themselves. Not a big deal, and personally I don't really care one way or the other. Thinking about it I guess that approach would allow you to merge the different games into a single API handler with functionality defined by the passed URL.

svartalf commented 8 years ago

@Geno1, yeah, probably you're right. I had found that beautiful fork yesterday, probably something similar should be done: https://github.com/monester/python-wargaming

monester commented 8 years ago

This functionality was added, please checks docs for region support. http://python-wargaming.readthedocs.io/en/latest/