Deploy bombs
This commit is contained in:
parent
dbeb6e9ba5
commit
4eccb339bb
@ -759,6 +759,10 @@ class Citizen(classes.CitizenAPI):
|
||||
|
||||
return hits, err, damage
|
||||
|
||||
def deploy_bomb(self, battle_id: int, bomb_id: int):
|
||||
r = self._post_military_deploy_bomb(battle_id, bomb_id).json()
|
||||
return not r.get('error')
|
||||
|
||||
def work_ot(self):
|
||||
# I"m not checking for 1h cooldown. Beware of nightshift work, if calling more than once every 60min
|
||||
self.update_job_info()
|
||||
|
@ -752,6 +752,10 @@ Class for unifying eRepublik known endpoints and their required/optional paramet
|
||||
type="damage", leftPage=1, rightPage=1, _token=self.token)
|
||||
return self.post("{}/military/battle-console".format(self.url, battle_id), data=data)
|
||||
|
||||
def _post_military_deploy_bomb(self, battle_id: int, bomb_id: int) -> Response:
|
||||
data = dict(battleId=battle_id, bombId=bomb_id, _token=self.token)
|
||||
return self.post("{}/military/deploy-bomb".format(self.url), data=data)
|
||||
|
||||
def _post_military_fight_air(self, battle_id: int, side_id: int) -> Response:
|
||||
data = dict(sideId=side_id, battleId=battle_id, _token=self.token)
|
||||
return self.post("{}/military/fight-shoooot/{}".format(self.url, battle_id), data=data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user