diff --git a/Makefile b/Makefile index 219f6e0..be369f5 100644 --- a/Makefile +++ b/Makefile @@ -88,9 +88,3 @@ dist: clean ## builds source and wheel package install: clean ## install the package to the active Python's site-packages python setup.py install - -setcommit: - bash set_commit_id.sh -# commit=`git log -1 --pretty=format:%h` -# sed -i.bak -E "s|COMMIT_ID = \".+\"|COMMIT_ID = \"$(commit)\"|g" erepublik/utils.py -# mv erepublik/utils.py.bak erepublik/utils.py diff --git a/erepublik/access_points.py b/erepublik/access_points.py index d75c055..324061c 100644 --- a/erepublik/access_points.py +++ b/erepublik/access_points.py @@ -433,7 +433,7 @@ class ErepublikMilitaryAPI(CitizenBaseAPI): class ErepublikPoliticsAPI(CitizenBaseAPI): def _get_candidate_party(self, party_slug: str) -> Response: - return self.post(f"{self.url}/candidate/{party_slug}") + return self.get(f"{self.url}/candidate/{party_slug}") def _get_main_party_members(self, party_id: int) -> Response: return self.get(f"{self.url}/main/party-members/{party_id}") @@ -448,6 +448,13 @@ class ErepublikPoliticsAPI(CitizenBaseAPI): def _get_presidential_elections(self, country_id: int, timestamp: int) -> Response: return self.get(f"{self.url}/main/presidential-elections/{country_id}/{timestamp}") + def _post_propose_president_candidate(self, party_slug: str, citizen_id: int) -> Response: + return self.post(f"{self.url}/propose-president-candidate/{party_slug}", + data=dict(_token=self.token, citizen=citizen_id)) + + def _get_auto_propose_president_candidate(self, party_slug: str) -> Response: + return self.get(f"{self.url}/auto-propose-president-candidate/{party_slug}") + class ErepublikPresidentAPI(CitizenBaseAPI): def _post_wars_attack_region(self, war_id: int, region_id: int, region_name: str) -> Response: