Yang Posted March 13, 2017 Share Posted March 13, 2017 https://politicsandwar.com/api/applicants/790 If you look carefully, there's no comma after a nation. {"nationid":57724,"nation":"Atlantica","leader":"Loozianajay","continent":"North America","cities":5,"score":340}{"nationid":59099,"nation":"Naxiznevi","leader":"Silverfrost","continent":"Europe","cities":3,"score":184} should really be {"nationid":57724,"nation":"Atlantica","leader":"Loozianajay","continent":"North America","cities":5,"score":340},{"nationid":59099,"nation":"Naxiznevi","leader":"Silverfrost","continent":"Europe","cities":3,"score":184} Alternatively, you could also add the allianceposition from the /nation/ endpoint to the /nations/ endpoint, so we don't have to open up every single nations in a list to see whether they're an applicant. Thank you! Quote Link to comment Share on other sites More sharing options...
Shakyr Posted March 19, 2017 Share Posted March 19, 2017 Yeah we've been trying for months to get the API to be consistent. Good luck I've got notes around somewhere on each of the API endpoints, what they should be for consistency. Even posted a few of them. Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted March 20, 2017 Administrators Share Posted March 20, 2017 I've got this fixed locally, and I'll add the allianceposition field to the nations api. Should be pushed live soon. For the record, the alliance position field takes values 0-5, each corresponding to the following: 0 : No Position (should only happen for nations not in an alliance) 1: Applicant 2: Member 3: Officer 4: Heir 5: Leader Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link Link to comment Share on other sites More sharing options...
hadesflames Posted March 21, 2017 Share Posted March 21, 2017 How did this even happen? There are typically functions that take care of this for you... Quote Link to comment Share on other sites More sharing options...
Yang Posted March 22, 2017 Author Share Posted March 22, 2017 Thanks, much appreciated! Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted March 22, 2017 Administrators Share Posted March 22, 2017 How did this even happen? There are typically functions that take care of this for you... Forgot to increment the comma counter on this script. Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link 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.