Api: lastOnlineStatusChange vs. dateLastPlayed

Created on 18 Sep 2019  Â·  3Comments  Â·  Source: Bungie-net/api

Would anyone be able to clarify the difference between the values lastOnlineStatusChange and dateLastPlayed? There doesn't appear to be anything in the documentation as to when these values are updated, what they reflect, or which should be relied on to determine when a player last played Destiny. (Aside from the fact that they aren't set to the same date/time values across the board, one is in ISO format, the other is in epoch format…)

Also, while on this subject — I've noticed that once some of these values go beyond a certain point, they simply degrade to null, the epoch, or an error. Are there any hard and fast guidelines at what point this happens? (90 days before now? 120 days? Or is it not consistent?)

question

Most helpful comment

Ah, lastOnlineStatusChange as in the one in the Groups endpoint?

If so, I would recommend using dateLastPlayed as your source of truth. lastOnlineStatusChange is updated by the Clan backend when it detects that you're online, which is not a guaranteed process: it's neither guaranteed to be timely, nor guaranteed to necessarily succeed at all. I also don't know the processes whereby lastOnlineStatusChange could be invalidated, but I know that it - unlike dateLastPlayed - is treated as transient data by our backend, and is potentially subject to being invalidated. We use it in some places in our UI where it is more convenient to show this data without having to fetch Destiny Profile data (bulk Clan operations are more efficient in our backend than fetching Destiny Profile data), but if you want something more reliable stick with dateLastPlayed.

All 3 comments

Ah, lastOnlineStatusChange as in the one in the Groups endpoint?

If so, I would recommend using dateLastPlayed as your source of truth. lastOnlineStatusChange is updated by the Clan backend when it detects that you're online, which is not a guaranteed process: it's neither guaranteed to be timely, nor guaranteed to necessarily succeed at all. I also don't know the processes whereby lastOnlineStatusChange could be invalidated, but I know that it - unlike dateLastPlayed - is treated as transient data by our backend, and is potentially subject to being invalidated. We use it in some places in our UI where it is more convenient to show this data without having to fetch Destiny Profile data (bulk Clan operations are more efficient in our backend than fetching Destiny Profile data), but if you want something more reliable stick with dateLastPlayed.

Thank you — that's exactly what I was referencing.

(And, interestingly, I have the same issue… if I could rely on lastOnlineStatusChange, I wouldn't have to call every clan member's individual profile data — which would dramatically improve performance. But, I'll pull my usual routine and fix it with caching.)

Aye, I wish it was more reliable!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nathabba picture nathabba  Â·  3Comments

andyschott picture andyschott  Â·  3Comments

justrealmilk picture justrealmilk  Â·  3Comments

theoperatore picture theoperatore  Â·  4Comments

ghost picture ghost  Â·  3Comments