Upcoming API changes - Page 7 | API Development | TORN

Upcoming API changes

    • tiksan [2383326]
    • Role: Civilian
    • Level: 100
    • Posts: 949
    • Karma: 1,258
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:36:04 - 19/07/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Beerson [1576144]

    This shows you don't understand the mechanic at all

    30 second delay on a per-minute API call does nothing most of the time.

     

    This isn't a solution, it's an excuse to pretend you "solved" the issue.

     

    Turn off public bazaar API or set the delay to 30 minutes at the very least.

    _SCOFIELD_ [1441750]

    If people are lazy to be online when they sell shit, then they better sell in hosp.

     

    If people cant come online to safekeep their cash before their hospital time ends, they better not sell through bazaar and should instead go to traders or auction (for rw stuff).

     

     

    You want to completely destroy a method of mugging because the seller is lazy? Wtf seriously? The delay itself should've never been implemented in the first place.

    splent [2088243]

    This change isn't about traders being "lazy".

    If someone is not careful enough about how they handle money while they're doing bazaar sales, they should definitely be punished for that, there's plenty of ways to store money safely.

    But the punishment needs to come from players actually playing the game, those checking the markets or a few selected targets actively, and not from someone driving a car and clicking a link on a Discord bot seconds after a sale.

    Personally, I'm hoping with this change traders will become more relaxed and as a result will make more mistakes that actual muggers will be able to benefit from.  

    _SCOFIELD_ [1441750]

    I completely agree with your viewpoint. What I do disagree with is the fact that this delay has only been placed on bazaars. why?

     

    Isn't your exact argument true for people putting players on stakeouts and getting notified through said pings to come online and hosp them/ mug them or whatever? or even in wars people using bots to be alerted soon as a player meds out? Shouldn't people actually stalking the war page be rewarded then?

     

    I don't mind the 30 second delay being put into place if this 30 second delay was for every single datapoint on API and not just bazaars.

    Allenone [2033011]

    This is a good point- I wouldn't be opposed to a 30 second activity/status delay to prevent API stakeouts.

    _SCOFIELD_ [1441750]

    don't get me wrong. I am not a fan of this 30 second delay. I wouldn't want the delay anywhere tbf. but it is not fair to put the delay in one place and not others.

     

    This is yet another "lazy" fix by the dev team and we have seen a lot of those recently.

    Technically, there is already a 30 second cache on almost all selections and endpoints. However Ched has given and endorsed a method of bypassing that cache so it’s useless

    LnNwLrL.gif

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

    Hello everyone,

    There's now a new selection available in API v2: 'torn' -> 'calendar'.

    It's been already available in Swagger for a few days, but now it's finally ready.

    Let me know if you notice anything strange or odd! 

    Thanks!


    • 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:42:02 - 23/07/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Hi Splent,

    I opened a ticket in bugs and issue forum: https://www.torn.com/forums.php#/p=threads&f=19&t=16411671&b=0&a=0

     

    the 30 seconds delay on the "first" api call is extremely annoying: it's ok if you want to delay the items and prices of the other bazaars, but if I want the information of my own bazaar they should be available without delays.

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

    Hello everyone, 

    There are now several new selections available in the new API v2 category 'Racing'.
    They can all be accessed with "Public Access" keys:

    • 'racing' -> 'cars' which returns information about cars available for racing
    • 'racing' -> 'carupgrades' which returns all possible car upgrades for a car
    • 'racing' -> 'tracks' which returns details for each race track
    • 'racing' -> 'races' which returns the list of "open", "in_progress" and "finished" custom races
    • 'racing' -> 'race' which returns details about a specifc "in_progress" or "finished" race

    There will be more 'racing' selections added in the near future:

    • 'racing' -> 'records' which will return a list of records for each track & class
    • 'racing' -> 'hof' which will return a list of racing fall of fame rankings
    • 'user' -> 'races' which will return a list of a user completed races (you can only see yours)
    • 'user' -> 'enlistedcars' which will return a list of an enlisted user cars and upgrades (you can only see yours)

    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).

    Additionally, there was a small change on API v1 'user' -> 'bazaar' selection.
    Following on this bug report, It is now possible to bypass cache when requesting data for yourself with your own API key.
    This works only if you're using an API key with "Custom", "Limited" or "Full" access type (also make sure to utilize "timestamp" or any other query parameter to bypass request cache).

    I hope these new selections will help with various racing competitions and statistics!

    In case you notice any irregularities or bugs, please don't hesitate to let me know!


    Thanks!

     

    • 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 15:40:42 - 24/07/24 (5 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello everyone, 

    There are now several new selections available in the new API v2 category 'Racing'.
    They can all be accessed with "Public Access" keys:

    • 'racing' -> 'cars' which returns information about cars available for racing
    • 'racing' -> 'carupgrades' which returns all possible car upgrades for a car
    • 'racing' -> 'tracks' which returns details for each race track
    • 'racing' -> 'races' which returns the list of "open", "in_progress" and "finished" custom races
    • 'racing' -> 'race' which returns details about a specifc "in_progress" or "finished" race

    There will be more 'racing' selections added in the near future:

    • 'racing' -> 'records' which will return a list of records for each track & class
    • 'racing' -> 'hof' which will return a list of racing fall of fame rankings
    • 'user' -> 'races' which will return a list of a user completed races (you can only see yours)
    • 'user' -> 'enlistedcars' which will return a list of an enlisted user cars and upgrades (you can only see yours)

    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).

    Additionally, there was a small change on API v1 'user' -> 'bazaar' selection.
    Following on this bug report, It is now possible to bypass cache when requesting data for yourself with your own API key.
    This works only if you're using an API key with "Custom", "Limited" or "Full" access type (also make sure to utilize "timestamp" or any other query parameter to bypass request cache).

    I hope these new selections will help with various racing competitions and statistics!

    In case you notice any irregularities or bugs, please don't hesitate to let me know!


    Thanks!

     

    thank you very much, I just tested it and works well: I change the price of the lsd in my bazaar, then I call the api and I see the lsd price changed in the first api call response.

    • 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 15:42:52 - 24/07/24 (5 months ago)
    Post link copied to clipboard Copy post link

    edit: sorry I responded to the wrong forum thread :-P

    • GreenNipple [2563870]
    • Role: Civilian
    • Level: 100
    • Posts: 228
    • Karma: 60
    • Last Action: 9 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 09:12:20 - 25/07/24 (5 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello everyone, 

    There are now several new selections available in the new API v2 category 'Racing'.
    They can all be accessed with "Public Access" keys:

    • 'racing' -> 'cars' which returns information about cars available for racing
    • 'racing' -> 'carupgrades' which returns all possible car upgrades for a car
    • 'racing' -> 'tracks' which returns details for each race track
    • 'racing' -> 'races' which returns the list of "open", "in_progress" and "finished" custom races
    • 'racing' -> 'race' which returns details about a specifc "in_progress" or "finished" race

    There will be more 'racing' selections added in the near future:

    • 'racing' -> 'records' which will return a list of records for each track & class
    • 'racing' -> 'hof' which will return a list of racing fall of fame rankings
    • 'user' -> 'races' which will return a list of a user completed races (you can only see yours)
    • 'user' -> 'enlistedcars' which will return a list of an enlisted user cars and upgrades (you can only see yours)

    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).

    Additionally, there was a small change on API v1 'user' -> 'bazaar' selection.
    Following on this bug report, It is now possible to bypass cache when requesting data for yourself with your own API key.
    This works only if you're using an API key with "Custom", "Limited" or "Full" access type (also make sure to utilize "timestamp" or any other query parameter to bypass request cache).

    I hope these new selections will help with various racing competitions and statistics!

    In case you notice any irregularities or bugs, please don't hesitate to let me know!


    Thanks!

     

    Is racing -> records and racing -> hof working? 
    It is not in Swagger, and I can't seem to get it to work.

    Thanks for all the updates btw

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

    splent [2088243]

    Hello everyone, 

    There are now several new selections available in the new API v2 category 'Racing'.
    They can all be accessed with "Public Access" keys:

    • 'racing' -> 'cars' which returns information about cars available for racing
    • 'racing' -> 'carupgrades' which returns all possible car upgrades for a car
    • 'racing' -> 'tracks' which returns details for each race track
    • 'racing' -> 'races' which returns the list of "open", "in_progress" and "finished" custom races
    • 'racing' -> 'race' which returns details about a specifc "in_progress" or "finished" race

    There will be more 'racing' selections added in the near future:

    • 'racing' -> 'records' which will return a list of records for each track & class
    • 'racing' -> 'hof' which will return a list of racing fall of fame rankings
    • 'user' -> 'races' which will return a list of a user completed races (you can only see yours)
    • 'user' -> 'enlistedcars' which will return a list of an enlisted user cars and upgrades (you can only see yours)

    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).

    Additionally, there was a small change on API v1 'user' -> 'bazaar' selection.
    Following on this bug report, It is now possible to bypass cache when requesting data for yourself with your own API key.
    This works only if you're using an API key with "Custom", "Limited" or "Full" access type (also make sure to utilize "timestamp" or any other query parameter to bypass request cache).

    I hope these new selections will help with various racing competitions and statistics!

    In case you notice any irregularities or bugs, please don't hesitate to let me know!


    Thanks!

     

    GreenNipple [2563870]

    Is racing -> records and racing -> hof working? 
    It is not in Swagger, and I can't seem to get it to work.

    Thanks for all the updates btw

    Hey it isn't yet!

    All new selections will be added to Swagger and I'll announce them here once they're ready.

    So as a rule of thumb; if it's not in Swagger - it's not ready.

    Thanks!

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

    Hey everyone, 

    Three more Racing related API sections are now available:

    • 'racing' -> 'records' which returns a list of records for a requested track & car class
    • 'user' -> 'races' which will return a list users races (you can only see yours, requires "Minimal" access key)
    • 'user' -> 'enlistedcars' which will return a list of all user enlisted cars and their upgrades (you can only see yours, requires "Minimal" access key)


    Additionally, Swagger schema for Racing related API was updated and all new requests are visible there now.
    Also, "car_id" and "car_item_id" fields are now consistent across all responses.
    In the same fashion, all "ids" fields now belong to a certain type (RaceId, RaceTrackId, RaceCarId, RaceCarUpgradeId, ItemId & UserId). 

    Please note that responses for 'racing' -> 'records' are globally cached for the duration of 1 hour. They might also occasionally take longer to load.

    As always, any feedback is welcome! 

    Thanks

    • SirJux [2695126]
    • Role: Civilian
    • Level: 99
    • Posts: 986
    • Karma: 1,440
    • Last Action: 40 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 08:46:44 - 06/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello,

    Due to concerns of unfair advantages being gained through mug scripts as well as complaints from players worried about their API keys being linked (please note that this is an unfounded complaint, but was worth addressing), we have added a global 30-second cache to the 'user' -> 'bazaar' section in API v1.
    This change applies to all requests, regardless of which query parameters are sent or which API keys are used.

    We hope this change will provide better experience and enhanced gameplay for everyone.

    For those who might attempt to bypass this change by scraping data, please ensure you do not violate the rules, especially those regarding page scraping: 
    https://www.torn.com/rules.php

    Thanks.

    08:10:59 - 06/08/24 You opened your bazaar

     

    08:11:08 - 06/08/24 You sold a Small Arms Cache on your bazaar to Guimz13 at $12,120,000 each for a total of $12,120,000

    08:11:18 - 06/08/24 You sold a Small Arms Cache on your bazaar to Guimz13 at $12,120,000 each for a total of $12,120,000

     

    my question is... where the f**k is 30 sec API delay because Guimz confirmed that he bought the items via bot ping.

    • Omanpx [1906686]
    • Role: Civilian
    • Level: 100
    • Posts: 2,589
    • Karma: 16,861
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 09:05:58 - 06/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    Hello,

    Due to concerns of unfair advantages being gained through mug scripts as well as complaints from players worried about their API keys being linked (please note that this is an unfounded complaint, but was worth addressing), we have added a global 30-second cache to the 'user' -> 'bazaar' section in API v1.
    This change applies to all requests, regardless of which query parameters are sent or which API keys are used.

    We hope this change will provide better experience and enhanced gameplay for everyone.

    For those who might attempt to bypass this change by scraping data, please ensure you do not violate the rules, especially those regarding page scraping: 
    https://www.torn.com/rules.php

    Thanks.

    SirJux [2695126]

    08:10:59 - 06/08/24 You opened your bazaar

     

    08:11:08 - 06/08/24 You sold a Small Arms Cache on your bazaar to Guimz13 at $12,120,000 each for a total of $12,120,000

    08:11:18 - 06/08/24 You sold a Small Arms Cache on your bazaar to Guimz13 at $12,120,000 each for a total of $12,120,000

     

    my question is... where the f**k is 30 sec API delay because Guimz confirmed that he bought the items via bot ping.

    Again, you are confusing endpoints. The 30 sec delay is for personal bazaars, not the market endpoint. Even if it had a 30 sec delay though, you could have just had bad luck and placed them right before the global 30 sec refresh. It's not a 30 sec delay, but a 30 sec global update interval anyway.

    Toolbox - a collection of my tools and spreadsheets made for Torn.

    Guidebook - a collection of guides i made for Torn.

    • SirJux [2695126]
    • Role: Civilian
    • Level: 99
    • Posts: 986
    • Karma: 1,440
    • Last Action: 40 minutes
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 09:30:47 - 06/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Omanpx [1906686]

    Again, you are confusing endpoints. The 30 sec delay is for personal bazaars, not the market endpoint. Even if it had a 30 sec delay though, you could have just had bad luck and placed them right before the global 30 sec refresh. It's not a 30 sec delay, but a 30 sec global update interval anyway.

    then whats the f**king point of that delay :D CHANGES NOTHING.

    • Omanpx [1906686]
    • Role: Civilian
    • Level: 100
    • Posts: 2,589
    • Karma: 16,861
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 09:45:20 - 06/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Omanpx [1906686]

    Again, you are confusing endpoints. The 30 sec delay is for personal bazaars, not the market endpoint. Even if it had a 30 sec delay though, you could have just had bad luck and placed them right before the global 30 sec refresh. It's not a 30 sec delay, but a 30 sec global update interval anyway.

    SirJux [2695126]

    then whats the f**king point of that delay :D CHANGES NOTHING.

    It does change a lot - namely makes buymugs a lot easier to pull off and most bazaars actively watched by players will be faster than bots. I.e. bot only catches what's left unmugged by manual players. This has been discussed extensively, the change was targeted at removing the speed advantage of mug bots specifically and that's what it does.

     

    It does not affect the cheap item watcher bots and was not intended to do so.

    Toolbox - a collection of my tools and spreadsheets made for Torn.

    Guidebook - a collection of guides i made for Torn.

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

    Hey everyone,

    Brand new selections for forum API are now available (in API v2): 
    - 'forum' -> 'categories' which returns a list of categories from which threads can be selected. You will notice that private forums are not available.

    - 'forum' -> 'threads' which returns a list of threads in the chosen category (or categories). There are advanced filtering options available on this selection (from, to, sort, limit).
    - 'forum' -> 'thread' which returns details about a specific thread (including poll & content).
    - 'forum' -> 'posts' which returns 20 posts per page for a specific thread. This selection works a little bit differently and uses just 'offset' instead of other filtering options. It is possible to select either raw content (HTML) or plain (content stripped of HTML tags). You will also notice a new object called "_links" in this selection which provides links to fetch previous and next sets of records.

    Posts older than ~3 months will usually have 'is_legacy' field set to true. This fields indicates if a post uses HTML or old forum rendering syntax. Unfortunately it would take a lot of time to strip the old syntax of tags, but at some point these should be migrated to HTML as well.

    If "_links" prove to be a good idea and are liked by the community, I would be happy to add that to other endpoints (although, unlike 'forum' -> 'posts' selection it would most likely depend on "to" parameter).

    There are more 'forum' selections that are currently being worked on. Including search, user feeds, user subscribed threads, user friends posts, user posts history. 

    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).

    Let me know if you have any feedback at all!

    Thanks!

    • 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 15:01:28 - 06/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    can you add the "is_shit_post" field to filter the posts to skip?

     

    sorry, I could not resist, I'm joking :-P

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

    Wolverine [1971836]

    can you add the "is_shit_post" field to filter the posts to skip?

     

    sorry, I could not resist, I'm joking :-P

    I don't understand...why would you want all of your posts to be skipped? :P

     

     

    • 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 17:14:22 - 06/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    Wolverine [1971836]

    can you add the "is_shit_post" field to filter the posts to skip?

     

    sorry, I could not resist, I'm joking :-P

    splent [2088243]

    I don't understand...why would you want all of your posts to be skipped? :P

     

     

    ahahah fair, I deserved it :D

    • pobk [3171827]
    • Role: Civilian
    • Level: 53
    • Posts: 126
    • Karma: 160
    • Last Action: 3 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 23:04:41 - 06/08/24 (5 months ago)
    Post link copied to clipboard Copy post link

    splent [2088243]

    I don't understand...why would you want all of your posts to be skipped? :P

     

     

    bMPEOE5.jpeg

    ~ P

    Support my suggestions: Faction API Keys

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

    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]
    • Role: Civilian
    • Level: 100
    • Posts: 2,589
    • Karma: 16,861
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 19:52:46 - 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.

    Try torn.report, it has that feature.

    Toolbox - a collection of my tools and spreadsheets made for Torn.

    Guidebook - a collection of guides i made for Torn.

Reply
Thread Title: