Skip to content
TORNLIFE More

[API] standardise types in API responses

Started by pobk [3171827] on in Bugs & Issues.

90 replies · 1.36k views · thread synced · 3 days ago · View on torn.com

Posts archived: 91 / 91 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Chedburn [1] Admin Developer
The v2 versioning is now complete...
https://api.torn.com/v2/user/?selections=profile&key=X

Currently it's identical to /v1/. Before people start using it, I'd love for us to make a load of simple changes and fixes like you've mentioned on your list, but I don't know where to begin.

Is there any way your list can be built upon further, perhaps collaboratively with others in the community? That'd be a massive help.
I can then make further fixes that I have stacking up in Bugs & Issues assigned to me, and officially launch /v2/.
MCSH [2855875]
Would you be open to creating something like this as you go along?

https://tornapi.tornplayground.eu/api/v1/sections
https://tornapi.tornplayground.eu/api/v1/schema/user

These would allow us to ingest the API in our tooling automatically and explore what's available / what's changed without too much hassle.
KingLouisCLXXII [2070312]
Would you consider putting (the output of) every API call into a Github repo and let developers make pull requests for suggested changes? This would make every suggested change a different issue and let people comment and debate them.
tiksan [2383326]
Or alternatively, similar to Discord, would it be possible to have a GitHub repository for the documentation? This would allow the community to improve upon the documentation with PRs and suggest improvements/suggested changes through issues. And you'd be able to give us notice of changes ahead of time by creating a PR on the docs with the upcoming changes. Discord's docs repo
Bug [1455582] Committee Committee
My list is currently hosted on GitHub, it's all just stored as JSON in a JavaScript variable.
It's not the prettiest way to work behind the scenes, but I'm sure anyone that's working with the API can interpret this.

I'm happy to open to do Pull Requests, make changes via Issues or some other option that's easier for the community to collaborate on changes. We started a discussion on this topic a while ago in the Torn API Discord, although discussion died a while ago.

[image: i.imgur.com]
Chedburn [1] Admin Developer
I'm just looking for a big list of updates the API community would like us to make, so I can get that sorted, before moving on to processing the backlog of API issues for /v2/.

Without a dedicated developer for our API, I don't think we can expand our scope any more than that.

How do we move towards a completion of Bug's list?
MCSH [2855875]
Create a backlog of every issue/request.

Categorize them into one of the following:
- wontfix: You are not interested in doing them
- urgent bugs: They should be fixed as they are causing issues for users / your own server. Bring these to your current sprint
- type fixes: Community has work around for these, it would be nice to have them fixed but we can do without
- structure changes: Things that makes more sense if they are presented in another way (such as attacks for users) - you should treat them case-by-case, but I don't think anyone would be angry if you do them all in v2.
- additions: Things that are added as the game is evolved, for new crimes for example. Again, decide case-by-case but I would say majority would go to v2.

But please publicize this in advance. Have it somewhere we can refer to, Trello would do if you don't have a system in place already.
Chedburn [1] Admin Developer
I'm not going to do all that, the project will out-grow my availability. But we can begin the process of finding a developer who can.
pobk [3171827]
I'm happy to help curate the list and formulate proposals for discussion. I don't agree with all of Bug's proposals, but most make sense. I think the community, with input and guidance from yourself and the new developer, on proposals can put together a more prioritised list of things that should be addressed, as well as new features.

Github, gitlab, hell... I'll host this on my own gittea instance if it helps the process.