Hi.
"From" doesn't work when I try to call API logs. I always get the last entries instead, just as without the "from".
"To" works just fine, as far as I could tell.
What's going on?
Examples:
https://api.torn.com/user/?selections=log&log=1210,1211,1212,12210&to=1620000000&key=
This works fine. I get a few logs up to the specified time
https://api.torn.com/user/?selections=log&log=1210,1211,1212,12210&from=1620000000&key=
Doesn't work. I get the last log entries no matter what stamp I use. Only difference is "to" and "from".
Can't make sense of this.
Simple problem with logs API-call with "from="
-
- Jubsu [2674033]
- Role: Civilian
- Level: 15
- Posts: 4,980
- Karma: 530
- Last Action: 2 years
Thread created on 01:44:10 - 18/10/21 (2 years ago)|Last replied 08:22:50 - 05/01/22 (2 years ago)Hi.
"From" doesn't work when I try to call API logs. I always get the last entries instead, just as without the "from".
"To" works just fine, as far as I could tell.
What's going on?
Examples:
https://api.torn.com/user/?selections=log&log=1210,1211,1212,12210&to=1620000000&key=
This works fine. I get a few logs up to the specified time
https://api.torn.com/user/?selections=log&log=1210,1211,1212,12210&from=1620000000&key=
Doesn't work. I get the last log entries no matter what stamp I use. Only difference is "to" and "from".
Can't make sense of this. -
Posted on 08:26:45 - 18/10/21 (2 years ago)Post link copied to clipboard Copy post link"from" gets the last 100 calls between that timestamp and to (=now when absent). So if you got more than 100 logs since then, it will show the last 100 and you'll have to work your way back.
-
-
- Jubsu [2674033]
- Role: Civilian
- Level: 15
- Posts: 4,980
- Karma: 530
- Last Action: 2 years
Posted on 13:08:02 - 18/10/21 (2 years ago)Post link copied to clipboard Copy post linkAh, I thought it works totally differently. Thank you for your reply. -
- Jubsu [2674033]
- Role: Civilian
- Level: 15
- Posts: 4,980
- Karma: 530
- Last Action: 2 years
Posted on 18:17:34 - 18/10/21 (2 years ago)Post link copied to clipboard Copy post linkHere is my suggestion for the "From"-function, also it's how I thought it already works:
API: Better "From"-function for logs | Suggestions |… (torn.com) -
Posted on 08:16:44 - 05/01/22 (2 years ago)Post link copied to clipboard Copy post linkNot really. I set From start of last year and it only shows latest data, ignoring "from" completely. A bit of a bummer.
-
-
Posted on 08:22:50 - 05/01/22 (2 years ago)Post link copied to clipboard Copy post linkThat's exactly what I said? It gets the 100 last (=newest) rows between to (=now when absent) and from (=ignored when absent). You need to work from newest to oldest, not the other way around. There is a valid reason for it, but you'll have to take my word for it as I can't find the source and me being committee means I have to be careful with giving information.Last edited by DeKleineKobini on 08:23:09 - 05/01/22
-