diff --git a/erepublik/__init__.py b/erepublik/__init__.py index 01a9b3d..9fe98a8 100644 --- a/erepublik/__init__.py +++ b/erepublik/__init__.py @@ -5,7 +5,7 @@ __author__ = """Eriks Karls""" __email__ = 'eriks@72.lv' __version__ = '0.20.0' -__commit_id__ = "6642839" +__commit_id__ = "7aa353b" from erepublik import classes, utils from erepublik.citizen import Citizen diff --git a/erepublik/access_points.py b/erepublik/access_points.py index d22649d..b4c0d13 100644 --- a/erepublik/access_points.py +++ b/erepublik/access_points.py @@ -177,8 +177,8 @@ class ErepublikArticleAPI(CitizenBaseAPI): data = dict(_token=self.token, articleId=article_id, amount=amount) return self.post("{}/main/donate-article".format(self.url), data=data) - def _post_main_write_article(self, title: str, content: str, location: int, kind: int) -> Response: - data = dict(_token=self.token, article_name=title, article_body=content, article_location=location, + def _post_main_write_article(self, title: str, content: str, country: int, kind: int) -> Response: + data = dict(_token=self.token, article_name=title, article_body=content, article_location=country, article_category=kind) return self.post("{}/main/write-article".format(self.url), data=data) diff --git a/erepublik/citizen.py b/erepublik/citizen.py index 544d8d5..490d7ed 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -1443,7 +1443,8 @@ class CitizenMilitary(CitizenTravel): else: battle_list = sorted(self.all_battles.values(), key=lambda b: b.id) - contributions: List[Dict[str, int]] = self._get_military_campaigns_json_citizen().json().get('contributions', []) + contribution_json: Response = self._get_military_campaigns_json_citizen() + contributions: List[Dict[str, int]] = contribution_json.json().get('contributions', []) contributions.sort(key=lambda b: -b.get('damage')) ret_battles += [int(b.get('battle_id', 0)) for b in contributions if b.get('battle_id')]