dotapatch.data
¶
Module for the heropediadata api.
-
class
dotapatch.data.
HeropediaData
[source]¶ Uses dota2’s heropediadata api to find the correct hero/item name.
-
classmethod
download_file
(name)[source]¶ Parses dota2’s heropediadata file into dict.
Parameters: name (str) – heropediadata feed to be downloaded Returns: dictionary – heropediadata Return type: dict
-
get_hero_name
(line)[source]¶ Searches the line for a hero name and returns its proper name.
Note
Juggernaut: base damage reduced by 2
returnsjuggernaut
Parameters: line (str) – The phrase to be checked Returns: name – Proper hero name Return type: str or None
-
get_item_name
(line)[source]¶ Searches the line for an item name and returns its proper name.
Note
Dragon Lance: strength reduced from 14 to 13
returnsdragon_lance
Parameters: line (str) – The phrase to be checked Returns: name – Proper item name Return type: str or None
-
classmethod