timestamp/from/to selections confusion | API Development | TORN

timestamp/from/to selections confusion

    • xedx [2100735]
    • Role: Civilian
    • Level: 100
    • Posts: 1,131
    • Karma: 831
    • Last Action: 9 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 18:36:54 - 16/02/22 (2 years ago)
    |
    Last replied 11:10:23 - 15/03/22 (2 years ago)
    Does anyone know what selections support the 'to', 'from', and 'timestamp' query modifiers in the API?

    I know personalstats does, crimes does, the log selection does (now citystats as well) - I assume all 3 options (to/from/timestamp)?

    The fact that human readable timestamps are now accepted is nice, does that apply to all 3 as well, not just timestamp? Edit: answered myself :-) It's in the announcement.

    I wish this was documented, as well as pointing out that timestamps are not in ms since epoch, but seconds, and that if using the 'to' and 'from' options, you must wait 30 seconds between calls.....are there any other caveats I'm not aware of? I'm not sure, I used to know - but the 'to' and 'from', I think are inclusive? Or exclusive?

    Other than my uncertainty half the time if they should work or not, these are nice features.
    • METALzsolt [2413874]
    • Role: Civilian
    • Level: 90
    • Posts: 1,118
    • Karma: 1,152
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 09:20:52 - 15/03/22 (2 years ago)
    Post link copied to clipboard Copy post link
    What I know is that user/log supports "to", but not "from". And it's exclusive.
    EDIT: it supports "from"

    That 30 second thing is new for me though. I'm developing this new NPC loot stat tool which crawls the log, and it works well with 400ms delays. Occasionally I get "Too many requests" error, but after a single 30s delay, I can go on with 400ms delays.

    I'm also curious for other undocumented details, limits and such.
    Last edited by METALzsolt on 09:50:00 - 15/03/22
    • DeKleineKobini [2114440]
    • Role: Committee
    • Level: 100
    • Posts: 3,745
    • Karma: 5,371
    • Last Action: 9 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 11:10:23 - 15/03/22 (2 years ago)
    Post link copied to clipboard Copy post link

    METALzsolt [2413874]

    What I know is that user/log supports "to", but not "from". And it's exclusive.
    EDIT: it supports "from"

    That 30 second thing is new for me though. I'm developing this new NPC loot stat tool which crawls the log, and it works well with 400ms delays. Occasionally I get "Too many requests" error, but after a single 30s delay, I can go on with 400ms delays.

    I'm also curious for other undocumented details, limits and such.
    User/logs is the only selection without the cache (=30s delay).

    There is also a 100k daily limit for 'cloud-storage' parts (=logs, faction news and personalstats (unknown how this one works)), which is shared between the api and in-game. Every part has its own counter tho, which should reset at new day, but that's not known for sure either is a 24h rolling limit.
    EDIT: It's a 24h rolling limit.
    Last edited by DeKleineKobini on 14:41:23 - 15/03/22
Reply
Thread Title: