Ched's API changes that could break our tools
-
Thread created on 21:24:51 - 27/02/20 (4 years ago)|Last replied 17:54:41 - 09/02/24 (6 months ago)Ched is a very busy guy, and it has been brought up a few times that his Bugs & Issues API changes don't always get communicated to the scripting community.
For those of us that follow the fixes, I think it would be valuable for people to post links to the threads where Ched is changing the API.
So, for the first record of API changes... I'll start:
empty attack logs to be in object format when empty, for users and faction selections.
https://www.torn.com/forums.php#/p=threads&f=19&t=16146289&b=0&a=0&start=0&to=20068652 -
-
Posted on 14:07:38 - 15/03/20 (4 years ago)Post link copied to clipboard Copy post link[API] Added war information to 'torn' -> 'territory' & 'rackets' selections
-
-
Posted on 13:26:41 - 24/05/20 (4 years ago)Post link copied to clipboard Copy post linkPlease note, upcoming change for Tuesday 26th.
[API] Changed daily_profit to daily_income, and weekly_profit to weekly_income on 'company' -> 'profile' selection -
-
Posted on 12:23:44 - 07/06/20 (4 years ago)Post link copied to clipboard Copy post linkAdded neighbors array for 'torn' -> 'territory' selection when including territory names in ID field
Changed 'torn' -> 'territory' selection to only show simplified details when viewing all territories -
-
Posted on 10:22:35 - 28/09/20 (3 years ago)Post link copied to clipboard Copy post link[API] Changed 'networth' to 'daily_networth' on the 'money' selection to avoid conflictsLast edited by Chedburn on 10:22:46 - 28/09/20
-
-
Posted on 09:57:57 - 29/09/20 (3 years ago)Post link copied to clipboard Copy post link[API] Changed effectiveness to detailed array including total score in 'company' -> 'employees' selection
-
-
Posted on 15:33:12 - 22/02/21 (3 years ago)Post link copied to clipboard Copy post linkWe're planning on releasing the change to faction news storage method tomorrow. This means that the "ID" format will change from a number to a key. This means rows will appear like this...
[Vhuj91P0dwnYNlsafjWY] => Array ( [news] => Leadership was transferred to romankr. [timestamp] => 1595970358 )
Hopefully this doesn't cause too much upset. This will also allow us to add to/from timestamp ranges very soon. -
-
Posted on 16:56:18 - 13/03/21 (3 years ago)Post link copied to clipboard Copy post linkPlease note, after a request to change from Camel Case to Snake Case, the chain details within the attacks selection for 'users' and 'factions'.
Here's the report: www.torn.com/forums.php#/p=threads&f=19&t=16216051&b=0&a=0&start=0
fairFight -> fair_fight
groupAttack -> group_attack
chainBonus -> chain_bonus
This will be live on Tuesday 14:00 TCT.
Thanks.Last edited by Chedburn on 16:56:31 - 13/03/21 -
-
Posted on 15:14:06 - 18/07/21 (3 years ago)Post link copied to clipboard Copy post linkRenamed "company_bank" selection in company detailed info to "company_funds" for consistency (I'll remove company_bank in the future). Added company_funds also for director's 'user' > 'money' selections. If this causes any serious issues (i can't imagine it would) it's easy to reverse.
-
-
Posted on 15:15:22 - 30/10/21 (2 years ago)Post link copied to clipboard Copy post linkI've removed 'treats_in_basket' from the 'user' -> 'profile' competition section due to inconsistency as it's not otherwise public, but also many deem this to be sensitive / private information.
-
-
Posted on 17:09:26 - 09/02/22 (2 years ago)Post link copied to clipboard Copy post linkThese changes shouldn't break anything, but noting them here anyway.
[API] Added ability to use 'timestamp' with 'torn' -> 'citystats' selection to see daily snapshots since 18th April 2008
[API] Added ability to use plaintext dates and times within to/from/timestamp parameters (I.e. "01.06.2021" or "2018-12-06 08:04:55" or "-7 days" -
-
Posted on 10:54:02 - 11/05/22 (2 years ago)Post link copied to clipboard Copy post linkuser -> perks has changed:
Old key order: job_perks, property_perks, stock_perks, merit_perks, education_perks, enhancer_perks, company_perks, faction_perks, book_perks
New key order: faction_perks, job_perks, property_perks, education_perks, enhancer_perks, book_perks, stock_perks, merit_perks (company_perks has been removed)
The "company_perks" have been merged into the "job_perks", to mirror the updated UI.
Bug report: https://torn.com/forums.php#/p=threads&f=19&t=16276258&b=0&a=0Last edited by CrymeLord on 08:53:49 - 02/06/22 -
-
Posted on 16:41:21 - 11/03/23 (1 year ago)Post link copied to clipboard Copy post link'torn' -> 'territories' selection is no longer available without including territory names.Unfortunately, returning the data of all 4,109 territories at once in a single request is far too heavy in terms of server power and bandwidth. We believe a script has been running this for potentailly hundreds of players, causing additional latency for everyone on-site at around midnight, so we've been forced to close it. You can however still make this request by passing territory names in the ID field, I.e. AAB,AAC,AAD,AAE,AAF. This method can currently provide information on up to *50 territories at a time.Last edited by Chedburn on 11:01:16 - 12/03/23
-
-
Posted on 12:41:18 - 11/04/23 (1 year ago)Post link copied to clipboard Copy post linkPlease note, the 'user' -> 'events' selection will soon be changing.
- The ID of each event will change to an object ID instead of a cumulative integer.
- The 'seen' field will no longer be available, although this information could be attained from the 'notification' selection instead.
This change is planned for April 25th.
Here's before and after examples...Last edited by Chedburn on 14:00:13 - 11/04/23 -
-
Posted on 15:10:52 - 24/04/23 (1 year ago)Post link copied to clipboard Copy post linkA brief note, the above change will occur at 13:00 (Torn time) tomorrow.
-
-
Posted on 15:37:21 - 06/05/23 (1 year ago)Post link copied to clipboard Copy post linkAs per this bug report, in the near future, on the 'user' -> 'profile' selection I plan to move the player's current job from the 'position' field to a new 'job' field, and change 'position' field to show their actual position within their job, I.e. Master Sergeant / Bagboy / Sales Executive / Bartender e.t.c.
For now, I've just duplicated 'position' to 'job', so anyone utilizing this functionality can now switch them over at their leisure. 'position' will be changed to show the user's position within that job, rather than the job, at some point in the future.
Thanks.Last edited by Chedburn on 15:38:20 - 06/05/23 -
-
Posted on 18:52:12 - 11/06/23 (1 year ago)Post link copied to clipboard Copy post linkPlease note, the data format of the items stored in these logs has now changed.
Instead of simply saving itemIDs as the keys, with quantities set as the values I.e. [123] => 2, we now save the item data as an object, containing the itemID (id), quantity involved (qty), and in most cases if the quantity is only 1, we also include the unique id of the item (uid). The uid is particularly useful, as that allows a unique weapon's or armor's details to be gathered - which is how we're now highlighting advanced weapons on the log on-site.
Thanks.
Parcel create - 4000
Parcel open - 4001
Item send - 4102
Item receive - 4103
Trade items outgoing - 4445
Trade items incoming - 4446
Trade items add - 4447
Trade items remove - 4448
Trade items add other user - 4482
Trade items remove other user - 4483
Faction deposit item - 6728
Faction give item send - 6732
Faction give item receive - 6733
Faction loan item receive - 6746
Faction loan item retrieve receive - 6749
Faction loan item retrieve send - 6748
Faction loan item return - 6747
Faction loan item send - 6745
Item use cache - 2615
Item use box of medical supplies - 2360
Item use six pack of alcohol - 2510
Item use box of grenades - 2350
Item use six pack of energy drink - 2520
Item use goodie bag - 2400
Item market add - 1100
Item market buy - 1103
Item market edit - 1102
Item market remove - 1101
Item market sell - 1104
Items equip - 4700
Items unequip - 4710
Auction House Item Add - 4300
Auction house item bid - 4310
Auction house item bid fail - 4305
Auction house item outbid - 4312
Auction house item sold - 4322
Auction house item timeout - 4330
Auction house item win - 4320 -
-
Posted on 14:45:59 - 04/08/23 (1 year ago)Post link copied to clipboard Copy post linkJust to let you know, we'll soon be adding a new 'torn' -> 'territorywarreport' selection for historical territory war reports. Along with this we are planning to adjust the 'torn' -> 'rankedwarreport' selection by moving 'members' inside each of the faction arrays rather than having all members from both factions appear in a single array.
-
-
Posted on 13:09:01 - 09/09/23 (1 year ago)Post link copied to clipboard Copy post linkThe `company` -> `newsfull` selection was removed a week ago or so. You can however now use the standard `news` selection for this with `from` and `to` timestamps to get the exact range required. Thanks.
-
-
Posted on 19:29:13 - 25/10/23 (10 months ago)Post link copied to clipboard Copy post linkI've disabled 'users' -> 'inventory' potentially permanently until the inventory system is rebuilt in early 2024. There are some tools requesting this very frequently and it's using too much of the replica's resources, I don't want to risk it crashing.
-