Printer635 Posted February 28, 2017 Share Posted February 28, 2017 Hi Alex, At around this time in the morning (11 am GMT), alliances that have recently deleted are still visible in the API but their score value disappears resulting in a key value error. EG 1: {"id":"3936","founddate":"2016-12-19 19:04:37","name":"Mono","acronym":"","color":"aqua","continent":"Europe","rank":115,"avgscore":0,"flagurl":"https:\/\/politicsandwar.com\/img\/flags\/americansomoa.jpg","forumurl":"","ircchan":""} EG 2: {"id":"3911","founddate":"2016-12-15 03:16:01","name":"Loner","acronym":"","color":"black","continent":"Europe","rank":112,"avgscore":0,"flagurl":"https:\/\/i.imgur.com\/ntCnXWy.png","forumurl":"","ircchan":""} Given "avgscore" is still there it should be easy enough to include "score":0 until the API updates and removes the alliance entry. Also as I'm here, you could annoy everyone by changing the "ircchan" key name to something discord related now *runs away* Ta, Printer Quote Link to comment Share on other sites More sharing options...
Shakyr Posted March 2, 2017 Share Posted March 2, 2017 You should be checking for the existence of the key first anyways, before referencing it. Keys have been renamed in the past. Hopefully the issue with deleted alliances showing up in the API will get resolved soon, though. Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted March 3, 2017 Administrators Share Posted March 3, 2017 Deleted alliances can't show up in the API. If you're seeing them in the API, they haven't been deleted yet. 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...
Printer635 Posted March 5, 2017 Author Share Posted March 5, 2017 Deleted alliances can't show up in the API. If you're seeing them in the API, they haven't been deleted yet. Managed to nab some evidence, it says in game the alliances have been deleted when I follow the id given by the API(See Below) {"id":"3922","founddate":"2016-12-16 16:13:11","name":"The Alliance of the Tri-force","acronym":"","color":"red","continent":"Europe","rank":154,"avgscore":0,"flagurl":"https:\/\/politicsandwar.com\/img\/flags\/canada.jpg","forumurl":"","ircchan":""} Quote Link to comment Share on other sites More sharing options...
Shakyr Posted March 5, 2017 Share Posted March 5, 2017 (edited) Is there a delay between having no members (and generating that warning ingame), before it gets cleaned up? That would explain the issue. Edited March 5, 2017 by Shakyr Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted March 6, 2017 Administrators Share Posted March 6, 2017 When you view an alliance page with no members, it deletes the alliance. If you try to look at the API after you've looked at the alliance, it won't be there. 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...
Shakyr Posted March 6, 2017 Share Posted March 6, 2017 When you view an alliance page with no members, it deletes the alliance. If you try to look at the API after you've looked at the alliance, it won't be there.Is it possible to add a check then, if you request an alliance via the API, with no members, it deletes the alliance and serves back an error? 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.