Jump to content

API Discussion


Alex
 Share

Recommended Posts

I am trying to find a list of API endpoints we can call on.

I searched the forums, looked at wiki and didn't get too far.

So far I have

http://politicsandwar.com/api/{endpoint}

/tradeprice/?resource=steel&key={API key}

/all-cities/key={API key}

/nation/id={nation id}&key={API key}

/city/id={city id}&key={API key}

/alliance/id={alliance id}&key={API key}

Can someone help with a link, thanks.

Link to comment
Share on other sites

Guest Zephyr
4 hours ago, Korben said:

I am trying to find a list of API endpoints we can call on.

I searched the forums, looked at wiki and didn't get too far.

So far I have

http://politicsandwar.com/api/{endpoint}

/tradeprice/?resource=steel&key={API key}

/all-cities/key={API key}

/nation/id={nation id}&key={API key}

/city/id={city id}&key={API key}

/alliance/id={alliance id}&key={API key}

Can someone help with a link, thanks.

Here's the wiki page for all of them: https://politicsandwar.fandom.com/wiki/Category:API

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

Some things that I would love to see added to the Nation API: the nations GNI would be very useful, and I think that seems reasonable to add. It would also be cool to see a nations total improvements in the nation API, such as total number of iron mines in all cities, so if I wanted that information I don't have to access the API for each city and add them. I don't know if that would be easily implementable, but I'd love to see it. 

Link to comment
Share on other sites

So, currently, I'm really struggling with the Wars API, and figured I'd post here to see if anyone smarter than me could help me resolve this issue. The wiki says the Wars API can be filtered by nation, but I can't make this work. For example,

baseurl/wars/?key={api key}&nation_id={my nation id}

I think should generate a list of my countries most recent wars. However all I get is the default Wars API, showing the 100 most recent wars, as if the &nation_id filter isn't there at all. Is the API just not functioning correctly right now, or am I doing something wrong? If anyone can help me out here I would be super grateful.

 

Edited by Ragnar-Danneskjold
Link to comment
Share on other sites

  • 4 weeks later...

A national safekeeping api that you can put a percentage of your income in without continuously putting it in.

For example

You mak 100k/turn %50 of that goes into the national safekeeping.

A timer untill you can withdraw from the national safekeeping would be great too.

PS: the national safekeeping can be looted at all times of war.

I thought of this because I spend too much of my income.

  • Downvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and the Guidelines of the game and community.