Get Spin the Wheel result through API-log limited? | API Devel…
Get Spin the Wheel result through API-log limited?
  • FLAT TDup [2660552]TDup [2660552]
    • TDup [2660552]
    • Role: Civilian
    • Level: 52
    • Posts: 1759
    • Karma: 329
    • Last Action: Now
    • Quote
    • Report
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Thread created on 17:51:39 - 27/06/21 (3 months ago)
    |
    Last replied 20:36:45 - 08/10/21 (14 days ago)
    Hello there, 

    I'm playing around with Torn's data atm, my goal is to have a better visibility on Leslie wheels probability
    For that, I've created a google sheet, that players can fill by copy pasting their activity logs (10 categories related to spin the wheel)
    It's a bit "complicated" : show all log, select category, grid mode, go down, let it load dynamically if there are lot of data, copy, paste etc etc etc

    I've noticed (thanks Ahab) that the API is exposing the activity for 2 months now. (it requires users to reset their API Key, which is already a small issue) but the main issue is: it doesn't fetch a lot of data (only my last 17 days of spinning, as opposed to >100 days expected) when requesting:
    https://api.torn.com/user/?selections=log&cat=192&key=[myKey]

    Is there anything I can do to get all the data I can see within the Torn activity panel, in grid mod, when scrolling down?

    Thanks a lot of any information.

    ps: if you're interested in helping me gathering data for this purpose, please DM me
    I'm currently sitting on 600~ spins / wheel - from 4 different users - (which is super small, and quite far from my target)
    The results so far looks like this:

  • FLAT TDup [2660552]TDup [2660552]
    • TDup [2660552]
    • Role: Civilian
    • Level: 52
    • Posts: 1759
    • Karma: 329
    • Last Action: Now
    • Quote
    • Report
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:01:09 - 27/06/21 (3 months ago)
    Post link copied to clipboard Copy post link
    I checked (using Chrome debug) what Torn website does to fetch the older data, and it seems to rely on this call:
    https://www.torn.com/page.php?sid=activityLogUserData&startFrom=1616945776412846236&log=8370

    Modifying the startFrom param to fetch older data.
    I'm wondering if there's a way to do the same with the API..
    Last edited by TDup on 18:03:34 - 27/06/21
  • DAM DeKleineKobini [2114440]DeKleineKobini [2114440]
    • DeKleineKobini [2114440]
    • Role: Committee
    • Level: 93
    • Posts: 2655
    • Karma: 3598
    • Last Action: 4 hours
    • Quote
    • Report
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:15:32 - 27/06/21 (3 months ago)
    Post link copied to clipboard Copy post link
    The result is limited to 100 rows. You can define the period with from and to params with unix time.

    Trading | Spreadsheets | Free Scripts | Paid Scripts

    Creating personalized trading spreadsheets and spreadsheets for other purposes, check my forum thread for more information.

    Buying many items, check my spreadsheet for the items I buy with up-to-date prices.

    competition.php?c=EasterEggs&step=eggImage&access_token=nothanks

  • FLAT TDup [2660552]TDup [2660552]
    • TDup [2660552]
    • Role: Civilian
    • Level: 52
    • Posts: 1759
    • Karma: 329
    • Last Action: Now
    • Quote
    • Report
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 00:37:44 - 28/06/21 (3 months ago)
    Post link copied to clipboard Copy post link

    DeKleineKobini [2114440]

    The result is limited to 100 rows. You can define the period with from and to params with unix time.
    This answers perfectly my question, thanks!

    I'll make a script then, I wanted to avoid that, since people might be scared if a tool asks for their API Key (especially if I need to ask them to reset their API because, you know, activity API requires it etc etc), but it's either that or the bug-prone/complicated copy paste from the website.

    All thing considered, it would be better, in order to have proper data, to have that executed on a lot of users not really asking for it (here, I might have more people interested in helping me because they're either lucky or not at all, which would bias the results)
    I'm wondering if we could do something with a well respected tool, such as torntools or yata, to have a broad, non biased, data source.

    It won't be able to rest quietly without knowing PI probabilities on Leslie's wheel.

    I'll do the script on my own, test it properly, and I'll ask authors of the tools above if they are interested.

    Thanks a lot for the answer DeKleineKobini !
    Last edited by TDup on 00:38:16 - 28/06/21
  • IP MrRightSA [2652679]MrRightSA [2652679]
    • MrRightSA [2652679]
    • Role: Civilian
    • Level: 32
    • Posts: 157
    • Karma: 150
    • Last Action: 2 hours
    • Quote
    • Report
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:36:54 - 28/06/21 (3 months ago)
    Post link copied to clipboard Copy post link

    DeKleineKobini [2114440]

    The result is limited to 100 rows. You can define the period with from and to params with unix time.
    What way should the API call be formatted though?
    I've tried;
    https://api.torn.com/user/?selections=log&from=1622212328&key=*
    https://api.torn.com/user/?selections=log&startFrom=1622212328&key=*
    https://api.torn.com/user/?selections=log&key=*&from=1622212328
    https://api.torn.com/user/?selections=log&key=*&startFrom=1622212328
  • DAM DeKleineKobini [2114440]DeKleineKobini [2114440]
    • DeKleineKobini [2114440]
    • Role: Committee
    • Level: 93
    • Posts: 2655
    • Karma: 3598
    • Last Action: 4 hours
    • Quote
    • Report
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:49:39 - 28/06/21 (3 months ago)
    Post link copied to clipboard Copy post link

    DeKleineKobini [2114440]

    The result is limited to 100 rows. You can define the period with from and to params with unix time.

    MrRightSA [2652679]

    What way should the API call be formatted though?
    I've tried;
    https://api.torn.com/user/?selections=log&from=1622212328&key=*
    https://api.torn.com/user/?selections=log&startFrom=1622212328&key=*
    https://api.torn.com/user/?selections=log&key=*&from=1622212328
    https://api.torn.com/user/?selections=log&key=*&startFrom=1622212328
    Parameter position doesn't matter. It's from, but in the case of the activity log, I think to is more important.

    When to is absent, I'd think it takes now as default. Unlike other calls, the activity log takes the 100 most recent logs within the period, so you have to work from new to old instead of the other way.

    Trading | Spreadsheets | Free Scripts | Paid Scripts

    Creating personalized trading spreadsheets and spreadsheets for other purposes, check my forum thread for more information.

    Buying many items, check my spreadsheet for the items I buy with up-to-date prices.

    competition.php?c=EasterEggs&step=eggImage&access_token=nothanks

  • FLAT TDup [2660552]TDup [2660552]
    • TDup [2660552]
    • Role: Civilian
    • Level: 52
    • Posts: 1759
    • Karma: 329
    • Last Action: Now
    • Quote
    • Report
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:36:45 - 08/10/21 (14 days ago)
    Post link copied to clipboard Copy post link
    I've ended up building a website for this, check this Torn forum post
Reply
Thread Title: