Skip to content
This repository was archived by the owner on Feb 27, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions dota2api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,19 @@ def get_tournament_prize_pool(self, leagueid=None, **kwargs):
if not self.__check_http_err(req.status_code):
return response.build(req, url)

def get_schema_url(self):
url = self.__build_url(urls.GET_SCHEMA_URL)
req = self.executor(url)
if self.logger:
self.logger.info('URL: {0}'.format(url))
if not self.__check_http_err(req.status_code):
return response.build(req, url)

def get_item_icon_path(self, iconname=None, **kwargs):
if 'iconname' not in kwargs:
kwargs['iconname'] = iconname
url = self.__build_url(urls.GET_ITEM_ICON_PATH, **kwargs)

def get_top_live_games(self, partner='', **kwargs):
"""Returns a dictionary that includes top MMR live games

Expand Down
2 changes: 2 additions & 0 deletions dota2api/src/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
GET_HEROES = "IEconDOTA2_570/GetHeroes/v0001/"
GET_GAME_ITEMS = "IEconDOTA2_570/GetGameItems/v0001/"
GET_TOURNAMENT_PRIZE_POOL = "IEconDOTA2_570/GetTournamentPrizePool/v1/"
GET_SCHEMA_URL = "IEconItems_570/GetSchemaURL/v0001/"
GET_ITEM_ICON_PATH = "IEconDOTA2_570/GetItemIconPath/v1/"
GET_TOP_LIVE_GAME="IDOTA2Match_570/GetTopLiveGame/v1/"
BASE_ITEMS_IMAGES_URL = 'http://cdn.dota2.com/apps/dota2/images/items/'
BASE_HERO_IMAGES_URL = 'http://cdn.dota2.com/apps/dota2/images/heroes/'