I'm quite often not getting the results of OCs in faction crimes data after they are executed. I'm storing the data I do get so i know I haven't downloaded a new state of the OC having been executed.
H_1527029101_1:Storing new OC 5432540 H_1527336565_1:OC from api is 5432540 Political Assassination 0
...
H_1527405302_1:OC from api is 5432540 Political Assassination 0
I think I've figured it out - crime data queried from faction returns only 100 OC which is mostly the blackmails from the last 2 days (if most players are doing blackmail) and older crimes including today's planned robbery can be missing from data returned by the API.
Best thing to do is pull data once an hour and store it locally. Although keep in mind if an OC is cancelled, it simply stops being listed and you have yo manually remove it from your list or write a clean up tool to remove then. :)
Edit: New phone, still breaking in the auto correct :/
I do pull the crimes and store in a db but the API only gives me 100 at once and may not show some recently executed. I can't tell from that whether they are succeded, failed, cancelled or still waiting.
There's a initiated and success values for these, you can figure from time_left if it's still planning and it simply won't show if it's been cancelled.
I can do that - what I can't tell is what if the crime doesn't show at all (not because it's cancelled but because only 100 crimes are returned in a single api call).
I do keep the previous results. Imagine a faction (100 players) plans a PA (4 players, 192 hours) and 48 blackmails (2 players, 24 hours). . Next day they repat the blackmails while the PA is waiting. The 3rd day they repeat the blackmails. Now the PA is 48*3=144 crimes ago ans we will never see the outcome in the API. It does not appear in teh top 100 even when executed.
Are you sure? That sounds like a bug if so, I'm in a 100 man faction and I haven't missed any results other than cancelled crimes. We don't do PAs though but we have had a few very delayed crimes.
I agree its a bug - the 100 OCs returned seem to be the last 100 planned and not affected by the last change to the OC (being executed and getting a result is a change I would expect to see put them back at the top of the list. I have a bunch of data to demonstrate how this is happening.
OCs are sorted by id and that is practically order of creation. Because some OCs have lot less time to plan then others you can end up losing data. Ofbyou have lot of 1 and 2 day planing crime then you need to considter to update it often. Whenbyou store data make sure you are updating allbold data wit new one... they have same id...
That doesn't help. I'm collecting data every half hour when I'm expecting an OC to be due and it can still be out of teh top 100 and completely out of sight.