dmjohnston Posted January 24, 2016 Share Posted January 24, 2016 I would like to suggest that the following items be added to the nation API: Defensive Slots open Vacation mode status (yes/no and possibly turns left) Quote ☾☆ Priest of Dio º¤ø„¤¤º°¨ ø„¸¸„¨ ø„¸¸„ø¤º°¨¨°º¤ø„¸¸„ø¤º°¨¨°º¤ø„¸ ¨°º¤ø„¸ GOD EMPEROR DIO BRANDO¨°º¤ø„¸ ¨°º¤ø„¸ DIO BRANDO GOD EMPEROR¨°º¤ø„¸ ¨°º¤ø„¤¤º°¨ ø„¸¸„¨ ø„¸¸„ø¤º°¨¨°º¤ø„¸¸„ø¤º°¨¨°º¤ø„¸ Link to comment Share on other sites More sharing options...
Silent Spectre Posted January 25, 2016 Share Posted January 25, 2016 that would be cool Quote Link to comment Share on other sites More sharing options...
Shakyr Posted January 25, 2016 Share Posted January 25, 2016 (edited) /api/nations/ already has vacation mode, it is the number of turns left of vacation. You can find out that information there. Though yes, it is missing from /api/nation/id=<nationid> and I agree that it should be available there. As for including defensive slot count, too narrow. A better solution would be to include all wars for a nation in the individual nation api (see below for mock layout). Means you might have to do a bit of work to get aggressive/defensive counts. But at least you then also know other things like who is at war with whom (useful for tracking whether someone has attacked the proper target, for example). nationdata{ ..., wars: { { id: <warid>, attacker: <nationid>, defender: <nationid> }, { id: <warid>, attacker: <nationid>, defender: <nationid> }, ... } }EDIT: Also, linking similar request https://politicsandwar.com/forums/index.php?/topic/10522-nation-api-enhancement/ Edited January 25, 2016 by Shakyr Quote Link to comment Share on other sites More sharing options...
Yosodog Posted January 25, 2016 Share Posted January 25, 2016 Or just have a war API like I've been begging for since forever. You can already get war information by scraping but the code that I have to write for it is so nasty I want to cringe. Quote [22:37:51] <&Yosodog> Problem is, everyone is too busy deciding which top gun character they are that no decision has been made BK in a nutshell Link to comment Share on other sites More sharing options...
Shakyr Posted January 25, 2016 Share Posted January 25, 2016 Or just have a war API like I've been begging for since forever. That was why I only had the bare minimum listed, for inclusion in the nation API. The actual war API could contain more details (referenced by <warid>). Quote Link to comment Share on other sites More sharing options...
dmjohnston Posted January 25, 2016 Author Share Posted January 25, 2016 I asked specifically for the slots open simply because it's already being shown on the nations listing, so it should be an easy addition. Quote ☾☆ Priest of Dio º¤ø„¤¤º°¨ ø„¸¸„¨ ø„¸¸„ø¤º°¨¨°º¤ø„¸¸„ø¤º°¨¨°º¤ø„¸ ¨°º¤ø„¸ GOD EMPEROR DIO BRANDO¨°º¤ø„¸ ¨°º¤ø„¸ DIO BRANDO GOD EMPEROR¨°º¤ø„¸ ¨°º¤ø„¤¤º°¨ ø„¸¸„¨ ø„¸¸„ø¤º°¨¨°º¤ø„¸¸„ø¤º°¨¨°º¤ø„¸ Link to comment Share on other sites More sharing options...
Shakyr Posted January 25, 2016 Share Posted January 25, 2016 I asked specifically for the slots open simply because it's already being shown on the nations listing, so it should be an easy addition.I'd be surprised if the number of open slots is being stored directly. More than likely, it's an SQL count of the war data (well that is how I'd do it) and there is little difference (in difficulty) between counting SQL rows to print out a count and printing out those rows instead. That, combined with the fact that an API should not be too narrow (otherwise Sheepy will be forever adding in bits and pieces), meant I decided to extend your request 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.