Skip to content
This repository has been archived by the owner on Nov 12, 2018. It is now read-only.

Commit

Permalink
Avoid confusing of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Aug 20, 2016
1 parent 88c8bc8 commit 1d12add
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions epicbot/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def collect_resource(self, building_id: int) -> Tuple[Counter, Counter]:
"""
Collects resource from the building.
"""
result, state = self.post("collectResource", call_state=True, buildingId=building_id)
result, state = self.post("collectResource", True, buildingId=building_id)
return self.parse_resource_field(result["reward"]), self.parse_resource_field(state)

def farm_cemetery(self) -> Tuple[Counter, Counter]:
Expand All @@ -164,7 +164,7 @@ def upgrade_building(self, building_id: int) -> Tuple[Error, Optional[Counter],
"""
Upgrades building to the next level.
"""
result, state = self.post("upgradeBuilding", call_state=True, buildingId=building_id)
result, state = self.post("upgradeBuilding", True, buildingId=building_id)
return (
self.parse_error(result),
(self.parse_resource_field(state) if state else None),
Expand All @@ -175,7 +175,7 @@ def destruct_building(self, building_id: int, instant: bool) -> Tuple[Error, Opt
"""
Destructs building. Used to clean extended areas.
"""
result, state = self.post("destructBuilding", call_state=True, buildingId=building_id, instant=instant)
result, state = self.post("destructBuilding", True, buildingId=building_id, instant=instant)
return (
self.parse_error(result),
(self.parse_resource_field(state) if state else None),
Expand All @@ -186,7 +186,7 @@ def start_research(self, unit_id: int, level: int, forge_building_id: int) -> Tu
"""
Start unit research.
"""
result, state = self.post("startResearch", call_state=True, level=level, unitId=unit_id, buildingId=forge_building_id)
result, state = self.post("startResearch", True, level=level, unitId=unit_id, buildingId=forge_building_id)
return self.parse_error(result), (self.parse_resource_field(state) if state else None)

def click_alliance_daily_gift(self):
Expand Down Expand Up @@ -279,7 +279,7 @@ def finish_battle(self, battle_id: str, commands: str) -> Tuple[str, Optional[Co
"""
Finishes battle and returns serialized battle result.
"""
result, state = self.post("battle_finish", call_state=True, battleId=battle_id, commands=commands)
result, state = self.post("battle_finish", True, battleId=battle_id, commands=commands)
return result["battleResult"], (self.parse_resource_field(state) if state else None)

def open_fair_citadel_gate(self):
Expand Down

0 comments on commit 1d12add

Please sign in to comment.