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.
Upcoming API changes
-
Posted on 14:18:41 - 03/09/24 (9 months ago)Post link copied to clipboard Copy post link
Hey!
There's a new faction selection with user revive settings available in the API v2:- 'faction' -> 'members' is now available which returns similar information as 'faction' -> 'public' selection with some improvements
This selection will return 'revive_setting' as "Unknown" when requesting details for other factions or with insufficient privileges, so essentially only faction leaders, co-leaders or those with faction API access are able to access this data with a key of access type "Custom", "Limited" or "Full".
It is now also possible to pass a query parameter "stripTags" with value "true" in this selection to strip user status details of HTML tags.
So e.g. "Hospitalized by user" becomes just "Hospitalized by user".If you'd like me to add something to this selection please 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! -
-
Posted on 14:22:26 - 03/09/24 (9 months ago)Post link copied to clipboard Copy post link
Thanks! Really glad to hear! :)
Also, that reminds me - I should probably add more information for this crime, such as zones you landed: -
-
Posted on 14:50:20 - 03/09/24 (9 months ago)Post link copied to clipboard Copy post link
What are the chances that we can add revivable:boolean to this, cross faction?
This data is currently available in user -> profile and checks if the key owner can revive said user.
This field enables revivers to check if they can revive somebody without going to every profile.
With the field in the faction endpoint, one could do 1 request instead of up to 100 to check that field.
-
-
Posted on 18:16:00 - 03/09/24 (9 months ago)Post link copied to clipboard Copy post link
Sounds good to me!
You sold me on 1 request instead of 100 :P
I guess I will need to check if key owner’s on specific player’s friend list to see if the key owner can revive those who have “Friends & Faction” setting, but regardless I think I should be able to add that.
Thanks! :)
Last edited by splent on 09:16:38 - 04/09/24 (9 months ago) -
-
Posted on 07:39:58 - 04/09/24 (9 months ago)Post link copied to clipboard Copy post link
The logic should already be in place for user -> profile since you have revivable there and that already checks for friend list to check if the key owner can revive in that case. Shouldn’t be too difficult I suppose to then just add that functionality to a faction call as well!
-
-
Posted on 11:56:38 - 04/09/24 (9 months ago)Post link copied to clipboard Copy post link
Hey, this change has now been added. There's now "is_revivable" field in 'faction' -> 'members' selection.
Swagger docs have also been updated.
Thank you! -
-
Posted on 12:16:28 - 09/09/24 (9 months ago)Post link copied to clipboard Copy post link
Hey all!
This change is now complete. There are now 'miscellaneous' statistics for the new 'Scamming' crime.
I also added a new field "uniques" which will replace "achieved_uniques". Except for the achieved unique id's, this new field will also provide details about the rewards.
Of course, this will only work for those who have actually achieved these uniques in order to not spoil the mistery when the new uniques come out. :P
--
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! -
-
Posted on 04:54:20 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
Do we have some sort of timeline for api v2 becoming stable and production-ready?
Wondering if it's worth building some features on v1, or waiting for v2 to be stable (such as faction revives, hitting the fac endpoints on v2 would be MUCH smoother)
-
-
Posted on 05:11:51 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
try {
apiv2()} catch (e) {
console.log(e, “fix ya shit splent”)
apiv1()}
-
-
Posted on 05:45:49 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
I would use v2 because Splent releases working stuff and he is fast to fix stuff that doesn't work
-
-
Posted on 06:23:31 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
You're right, he's been great at fixing bugs very rapidly, but v2 isn't stable and will receive breaking changes.
Please note that once v2 is released, it will be still be unstable and there will be breaking changes from time to time. I will try to communicate such changes upfront, but I can’t promise anything at this moment.
There's nothing wrong with this, it's the way all development works of course, but when we're dealing with formal releases and external storefronts (apple's app store and google play) we can't handle breaking changes like a script or bot can.
-
-
Posted on 14:50:13 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
That's an excellent question.
I'm honestly not sure what to say right now, but looking retrospectively, it looks like I didn't do many changes (other than some immediate fixes) to new endpoints that I created.
For example, forum & racing selections are basically the same since they were created.
I'm not getting a lot of (negative) feedback on the API, so I'm guessing everyone is more or less happy with how things are going!
That said, the initial plan was to complete larger chunks of the API v2 before making everything stable, but maybe I could/should mark some selections as stable sooner.
I'm actually in favour of doing that because with Swagger, it is easy to mark something as deprecated and give developers enough time to change their code. The only tricky thing is if I want to update a type of some field.
Here's a deprecation example:
I will take some time next week to revisit each endpoint older than 3 weeks, and see if something should be added/changed on each one of them.
If not, I guess I can start marking things as stable and rely on "deprecated" flag for any future changes.
How does that sound? -
-
Posted on 15:57:12 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
Could you let us know of deprecation notices in this thread? I (and many of the others I imagine) don't regularly check the v2 Swagger so I wouldn't notice an endpoint/selection/key being deprecated.
-
-
Posted on 16:38:55 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
How long will "enough time" be (just an approximate idea)? I've seen "enough time to make fixes" mean both an hour and six months in the past xD
Proper deprecation before removal would be absolutely lovely, yes. We could probably automate notifications for this from the swagger json file itself which would be nice...
As always, thanks for everything you do.
-
-
Posted on 16:57:14 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
Oh, I'm thinking a minimum of 3 months at least, but that could be increased up to 6-12 months if necessary?
It's usually not a problem to remove some fields :P
And no problem! I'm glad to have the opportunity to work on the API and make (almost) everyone happy!
Thank you as well for your suggestions and comments, I really appreciate it! :) -
-
Posted on 16:58:20 - 13/09/24 (9 months ago)Post link copied to clipboard Copy post link
Definitely, I'll post in this thread.
They will usually probably come in bundled together with some other changes though.
Thanks!Last edited by splent on 17:24:42 - 13/09/24 (9 months ago) -
-
Posted on 13:47:01 - 16/09/24 (9 months ago)Post link copied to clipboard Copy post link
Hey everyone,
Couple of small changes today in the API v2:- 'torn' -> 'logtypes' now accept log category id as input to only return a list of log types related to that category. The response have been modified to provide a list of objects
- 'torn' -> 'logcategories' now has the response modified to provide a list of objects
These selections can now also be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).
Thanks! -
-
Posted on 12:08:19 - 24/09/24 (8 months ago)Post link copied to clipboard Copy post link
Hi everyone,
Few new selections are now available in the API v2:- 'user' -> 'bounties' returning the details about user's bounties
- 'torn' -> 'bounties' returning details about all bounties
- 'user' -> 'jobranks' returning user's job positions (Minimal API key required, available only to yourself)
These selections can also be tried through Swagger (if you're not seeing them, make sure to clear cache on both Swagger page and openapi.json file).
Thanks! -
-
Posted on 13:18:36 - 24/09/24 (8 months ago)Post link copied to clipboard Copy post link
Hi, do you know if there is a chance in the future to get the number of FHC used with API v2?
-
-
Posted on 18:13:17 - 24/09/24 (8 months ago)Post link copied to clipboard Copy post link
Hey, if that gets added to player statistics then sure, it shouldn't be a problem.
I can't help you with adding that to the profile statistics page though. You know the drill with the suggestions! :D -