Upcoming API changes - Page 8 | API Development | TORN

Upcoming API changes

    • Wolverine [1971836]
    • Role: Civilian
    • Level: 100
    • Posts: 5,252
    • Karma: 6,056
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:15:36 - 07/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Blainyckz_ [606698]

    Idk if this has been asked or worked on but could we get 'uniques' on subcrimes? Would be an easy way to monitor and track what ones I'm missing? Unless there is a way that I'm unaware of and someone could enlighten me haha.

    Omanpx [1906686]

    Try torn.report, it has that feature.

    torn.report scans all crime logs

    • Blainyckz_ [606698]
    • Role: Civilian
    • Level: 81
    • Posts: 239
    • Karma: 211
    • Last Action: 33 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 22:26:06 - 07/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Blainyckz_ [606698]

    Idk if this has been asked or worked on but could we get 'uniques' on subcrimes? Would be an easy way to monitor and track what ones I'm missing? Unless there is a way that I'm unaware of and someone could enlighten me haha.

    Omanpx [1906686]

    Try torn.report, it has that feature.

    Shall check tomorrow thanks!

    • JKyte [2417425]
    • Role: Civilian
    • Level: 100
    • Posts: 825
    • Karma: 1,120
    • Last Action: 3 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 10:56:05 - 08/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Blainyckz_ [606698]

    Idk if this has been asked or worked on but could we get 'uniques' on subcrimes? Would be an easy way to monitor and track what ones I'm missing? Unless there is a way that I'm unaware of and someone could enlighten me haha.

    Omanpx [1906686]

    Try torn.report, it has that feature.

    Wolverine [1971836]

    torn.report scans all crime logs

    I would love to see the unique outcomes in the API. 

     

    Honestly, it's worth looking at how many calls TornReport make and building some endpoints to reduce that workload.

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 770
    • Karma: 2,099
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 10:59:42 - 08/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Blainyckz_ [606698]

    Idk if this has been asked or worked on but could we get 'uniques' on subcrimes? Would be an easy way to monitor and track what ones I'm missing? Unless there is a way that I'm unaware of and someone could enlighten me haha.

    Omanpx [1906686]

    Try torn.report, it has that feature.

    Wolverine [1971836]

    torn.report scans all crime logs

    JKyte [2417425]

    I would love to see the unique outcomes in the API. 

     

    Honestly, it's worth looking at how many calls TornReport make and building some endpoints to reduce that workload.

    I know. :/ 

    Unfortunately, some rewards can vary and it's really not straightforward to get these rewards (I'd also have to go through the logs, which would make requests considerably slower).

    Regardless, I'll put a bit more time into this and see if I can provide this information as well.

    Thanks for feedback!

    • Skeletron [318855]
    • Role: Civilian
    • Level: 100
    • Posts: 702
    • Karma: 1,970
    • Last Action: 4 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 12:05:29 - 08/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Blainyckz_ [606698]

    Idk if this has been asked or worked on but could we get 'uniques' on subcrimes? Would be an easy way to monitor and track what ones I'm missing? Unless there is a way that I'm unaware of and someone could enlighten me haha.

    Omanpx [1906686]

    Try torn.report, it has that feature.

    Wolverine [1971836]

    torn.report scans all crime logs

    JKyte [2417425]

    I would love to see the unique outcomes in the API. 

     

    Honestly, it's worth looking at how many calls TornReport make and building some endpoints to reduce that workload.

    The new page at https://torn.report/uniques doesn't use logs. It uses the v2 endpoints to track uniques.

    • Wolverine [1971836]
    • Role: Civilian
    • Level: 100
    • Posts: 5,252
    • Karma: 6,056
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:57:46 - 08/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Blainyckz_ [606698]

    Idk if this has been asked or worked on but could we get 'uniques' on subcrimes? Would be an easy way to monitor and track what ones I'm missing? Unless there is a way that I'm unaware of and someone could enlighten me haha.

    Omanpx [1906686]

    Try torn.report, it has that feature.

    Wolverine [1971836]

    torn.report scans all crime logs

    JKyte [2417425]

    I would love to see the unique outcomes in the API. 

     

    Honestly, it's worth looking at how many calls TornReport make and building some endpoints to reduce that workload.

    Skeletron [318855]

    The new page at https://torn.report/uniques doesn't use logs. It uses the v2 endpoints to track uniques.

    you are right, it's in the achieved_uniques coming from https://api.torn.com/v2/user/?selections=crimes$id=1 
    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 770
    • Karma: 2,099
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 12:02:30 - 15/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    Hi again!

    Second part of forum related selections is now available (focusing on players). New selections are now available under API v2:

    • 'user' -> 'forumposts' returning specific player's posts (20 per response)
    • 'user' -> 'forumthreads' returning specific player's created threads (100 per page). This endpoint also returns the amount of "new_posts" if you're requesting this information for yourself with API key which has access "Minimal" or higher 
    • 'user' -> 'forumsubscribedthreads' returning updates on threads you're subscribed to
    • 'user' -> 'forumfeed' returning updates on your created posts and threads
    • 'user' -> 'forumfriends' returning forum activity of your friends

     

    Due to system limitations it's possible to only return a maximum of 100 rows (without using filters to get older records) for 'user' -> 'forumfeed' and 'user' -> 'forumfriends' selections. 

    Additionally, private forum information (factions, companies, committee, etc.) is excluded from all of forum selections.

    The last forum selection which remains to do is 'forum' -> 'search'. This one requires some system search functionality rebuild, but I'm hoping to get that one out until end of this year (no hard promises though!). 

     

    I'm also still experimenting with automated "_links" generation to get previous and next results, so if you notice these behaving strange please do shout!

    --

    As always with the new API v2, these selections can be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).

    Thanks!

     

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 770
    • Karma: 2,099
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 11:24:39 - 27/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    Hey!

    Advanced Hall of Fame API is now available under API v2. These sections are now here:

    • 'torn' -> 'hof' returning up to 100 player records per category per page
    • 'torn' -> 'factionhof' returning up to 100 faction records per category per page
    • 'user' -> 'hof' is now visible for other players in API v2 as well (except for battle stats and exact travel time, requires Limited key or higher to view for yourself)
    • 'faction' -> 'hof' is now available to see how faction ranks under each category


    I also added racing ranks to 'user' -> 'hof' in API v1. 


    Probably not very important, but the offset is not working if it's smaller than the initial limit. This is due to how Hall of Fame page logic works (the same logic is used by the API).
    E.g. this will return the top 20 records even if the offset is 15, so same thing for the API. https://www.torn.com/page.php?sid=hof#type=offences&page=15
    Otherwise offset works normally.
    Hopefully this selection will bring out more faction/community competitions!

    --

    As always with the new API v2, these selections can be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).

    Thanks!

    Last edited by splent on 14:49:08 - 28/08/24 (4 months ago)
    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 770
    • Karma: 2,099
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 11:31:49 - 27/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    Also, for those who missed these bug reports: 
    https://www.torn.com/forums.php#/p=threads&f=19&t=16378480&b=0&a=0
    and
    https://www.torn.com/forums.php#/p=threads&f=19&t=16355485&b=0&a=0 

    There is now custom key builder available in the API docs page to help create custom keys faster:

    https://www.torn.com/api.html

    • Wolverine [1971836]
    • Role: Civilian
    • Level: 100
    • Posts: 5,252
    • Karma: 6,056
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 13:16:11 - 27/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hey!

    Advanced Hall of Fame API is now available under API v2. These sections are now here:

    • 'torn' -> 'hof' returning up to 100 player records per category per page
    • 'torn' -> 'factionhof' returning up to 100 faction records per category per page
    • 'user' -> 'hof' is now visible for other players in API v2 as well (except for battle stats and exact travel time, requires Limited key or higher to view for yourself)
    • 'faction' -> 'hof' is now available to see how faction ranks under each category


    I also added racing ranks to 'user' -> 'hof' in API v1. 


    Probably not very important, but the offset is not working if it's smaller than the initial limit. This is due to how Hall of Fame page logic works (the same logic is used by the API).
    E.g. this will return the top 20 records even if the offset is 15, so same thing for the API. https://www.torn.com/page.php?sid=hof#type=offences&page=15
    Otherwise offset works normally.
    Hopefully this selection will bring out more faction/community competitions!

    --

    As always with the new API v2, these selections can be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).

    Thanks!

    Any chance to add battle stats HoF with a response containing only "position" and "value" fields, while all other fields are empty?

     

    Request:
    https://api.torn.com/v2/torn/?selections=hof&limit=100&offset=0&cat=battlestats

     

    Response:
    {

      "position": 1,
      "value": 1517019979390614
    }

     

    We are able to see something like that in Torn Stats at this link https://tornstats.com/halloffame , but data is read from Torn Stats private database.

    Last edited by Wolverine on 13:16:56 - 27/08/24 (4 months ago)
    • MightyGoober [812478]
    • Role: Civilian
    • Level: 100
    • Posts: 6,378
    • Karma: 19,237
    • Last Action: 31 minutes
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:32:46 - 27/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Also, for those who missed these bug reports: 
    https://www.torn.com/forums.php#/p=threads&f=19&t=16378480&b=0&a=0
    and
    https://www.torn.com/forums.php#/p=threads&f=19&t=16355485&b=0&a=0 

    There is now custom key builder available in the API docs page to help create custom keys faster:

    https://www.torn.com/api.html

    You are exactly what everyone wanted Chedburn to be with the API.

     

    I absolutely blast the staff for doing bad jobs, but it needs to be recognized when someone is doing great. Thanks splent.

     

     

     

    - - - - Doesn't like good hired staffers: - - - -

     

    Upcoming API changes
    Last edited by MightyGoober on 19:24:14 - 27/08/24 (4 months ago)

    • Hawk [2080065]
    • Role: Civilian
    • Level: 100
    • Posts: 5,288
    • Karma: 11,743
    • Last Action: 3 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:44:44 - 27/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Also, for those who missed these bug reports: 
    https://www.torn.com/forums.php#/p=threads&f=19&t=16378480&b=0&a=0
    and
    https://www.torn.com/forums.php#/p=threads&f=19&t=16355485&b=0&a=0 

    There is now custom key builder available in the API docs page to help create custom keys faster:

    https://www.torn.com/api.html

    MightyGoober [812478]

    You are exactly what everyone wanted Chedburn to be with the API.

     

    I absolutely blast the staff for doing bad jobs, but it needs to be recognized when someone is doing great. Thanks splent.

     

     

     

    - - - - Doesn't like good hired staffers: - - - -

     

    Upcoming API changes

    I second that.

     

    Thank you splent!

     

     

     

    z0rnzBI.png 

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 770
    • Karma: 2,099
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:01:16 - 28/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hey!

    Advanced Hall of Fame API is now available under API v2. These sections are now here:

    • 'torn' -> 'hof' returning up to 100 player records per category per page
    • 'torn' -> 'factionhof' returning up to 100 faction records per category per page
    • 'user' -> 'hof' is now visible for other players in API v2 as well (except for battle stats and exact travel time, requires Limited key or higher to view for yourself)
    • 'faction' -> 'hof' is now available to see how faction ranks under each category


    I also added racing ranks to 'user' -> 'hof' in API v1. 


    Probably not very important, but the offset is not working if it's smaller than the initial limit. This is due to how Hall of Fame page logic works (the same logic is used by the API).
    E.g. this will return the top 20 records even if the offset is 15, so same thing for the API. https://www.torn.com/page.php?sid=hof#type=offences&page=15
    Otherwise offset works normally.
    Hopefully this selection will bring out more faction/community competitions!

    --

    As always with the new API v2, these selections can be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).

    Thanks!

    Wolverine [1971836]

    Any chance to add battle stats HoF with a response containing only "position" and "value" fields, while all other fields are empty?

     

    Request:
    https://api.torn.com/v2/torn/?selections=hof&limit=100&offset=0&cat=battlestats

     

    Response:
    {

      "position": 1,
      "value": 1517019979390614
    }

     

    We are able to see something like that in Torn Stats at this link https://tornstats.com/halloffame , but data is read from Torn Stats private database.

    Nope, I don’t think so. :P

     

    It would be easy to track certain players that way. 

    • Wolverine [1971836]
    • Role: Civilian
    • Level: 100
    • Posts: 5,252
    • Karma: 6,056
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:03:51 - 28/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hey!

    Advanced Hall of Fame API is now available under API v2. These sections are now here:

    • 'torn' -> 'hof' returning up to 100 player records per category per page
    • 'torn' -> 'factionhof' returning up to 100 faction records per category per page
    • 'user' -> 'hof' is now visible for other players in API v2 as well (except for battle stats and exact travel time, requires Limited key or higher to view for yourself)
    • 'faction' -> 'hof' is now available to see how faction ranks under each category


    I also added racing ranks to 'user' -> 'hof' in API v1. 


    Probably not very important, but the offset is not working if it's smaller than the initial limit. This is due to how Hall of Fame page logic works (the same logic is used by the API).
    E.g. this will return the top 20 records even if the offset is 15, so same thing for the API. https://www.torn.com/page.php?sid=hof#type=offences&page=15
    Otherwise offset works normally.
    Hopefully this selection will bring out more faction/community competitions!

    --

    As always with the new API v2, these selections can be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).

    Thanks!

    Wolverine [1971836]

    Any chance to add battle stats HoF with a response containing only "position" and "value" fields, while all other fields are empty?

     

    Request:
    https://api.torn.com/v2/torn/?selections=hof&limit=100&offset=0&cat=battlestats

     

    Response:
    {

      "position": 1,
      "value": 1517019979390614
    }

     

    We are able to see something like that in Torn Stats at this link https://tornstats.com/halloffame , but data is read from Torn Stats private database.

    splent [2088243]

    Nope, I don’t think so. :P

     

    It would be easy to track certain players that way. 

    thank you for your response my friend :)

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 770
    • Karma: 2,099
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:47:49 - 28/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    Hi,


    I've created now 'user' -> 'calendar' selection to complement 'torn' -> 'calendar' selection (should've done it right away).

    It just returns the event start time string, just like on the calendar page (e.g. "12:15 TCT")

    --

    As always with the new API v2, these selections can be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).

    Thanks!

    Last edited by splent on 14:54:00 - 28/08/24 (4 months ago)
    • Kwack [2190604]
    • Role: Civilian
    • Level: 15
    • Posts: 2,147
    • Karma: 3,456
    • Last Action: 10 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:51:45 - 28/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    dsadsaHHey/user/?selections=calendar

    • splent [2088243]
    • Role: Admin
    • Level: 95
    • Posts: 770
    • Karma: 2,099
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:54:13 - 28/08/24 (4 months ago)
    Post link copied to clipboard Copy post link

    Kwack [2190604]

    dsadsaHHey/user/?selections=calendar

    I thought I had removed that. :D 

    Thanks! 

    Last edited by splent on 14:54:23 - 28/08/24 (4 months ago)
    • byrod [1132772]
    • Role: Civilian
    • Level: 100
    • Posts: 2,537
    • Karma: 4,043
    • Last Action: 6 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:10:23 - 02/09/24 (4 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hey!

    Advanced Hall of Fame API is now available under API v2. These sections are now here:

    • 'torn' -> 'hof' returning up to 100 player records per category per page
    • 'torn' -> 'factionhof' returning up to 100 faction records per category per page
    • 'user' -> 'hof' is now visible for other players in API v2 as well (except for battle stats and exact travel time, requires Limited key or higher to view for yourself)
    • 'faction' -> 'hof' is now available to see how faction ranks under each category


    I also added racing ranks to 'user' -> 'hof' in API v1. 


    Probably not very important, but the offset is not working if it's smaller than the initial limit. This is due to how Hall of Fame page logic works (the same logic is used by the API).
    E.g. this will return the top 20 records even if the offset is 15, so same thing for the API. https://www.torn.com/page.php?sid=hof#type=offences&page=15
    Otherwise offset works normally.
    Hopefully this selection will bring out more faction/community competitions!

    --

    As always with the new API v2, these selections can be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).

    Thanks!

    I played around with the user hof:

    https://api.torn.com/v2/user/?selections=hof&id=1132772&key=

     

     

    It returns this rank value for me:

    "rank":{"value":27,"rank":277}

     

    However, the HoF says 26:

    97a1181e-9f79-4509-9c52-d33ca75f5c0f-1132772.png

    Ranks below that seem to be fine, just at the highest rank it seems to strangely add +1...

     

     

    Edit:

    https://api.torn.com/v2/torn/?selections=hof&key=MYKEY&limit=100&offset=200&cat=rank

    returns the correct value.

     

    Last edited by byrod on 14:24:11 - 02/09/24 (4 months ago)

    TornEngine

    • Emforus [2535044]
    • Role: Wiki Contributor
    • Level: 100
    • Posts: 1,800
    • Karma: 17,444
    • Last Action: 38 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 03:20:24 - 03/09/24 (4 months ago)
    Post link copied to clipboard Copy post link

    I just wanna drop a quick thank you for the subcrime selection, was about to check what data I had and the API lets me map which ID belongs to which scam category instantly.

    -------------------------------------------------

    Contribute to Crimes 2.0 research!

    -------------------------------------------------

    Let us burglarize the places we want!

    • Damien [3030216]
    • Role: Civilian
    • Level: 80
    • Posts: 97
    • Karma: 193
    • Last Action: 2 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 06:31:02 - 03/09/24 (4 months ago)
    Post link copied to clipboard Copy post link

    love your work man

    hWbHmhO.gif

Reply
Thread Title: