Skip to content
TORNLIFE More

api.torn.com - example outputs

Started by Mephiles [2087524] on in API Development.

1 replies · 235 views · thread synced · 3 days ago · View on torn.com
About this thread

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

Counted by TornLife from the archived posts.

Archived posts
2
Discussion span
→
People posting
2
Likes on archived posts
5
Authority score
51 / 100
Historical score
26 / 100
Story score
31 / 100
Engagement score
46 / 100
Mephiles [2087524]

Hey!

I like the idea that the possible "selections" were added to api.torn.com so we know what we can search for. Could the next step be example outputs?

I mean that for example when I search for my own "personalstats" and I don't have any revives then it won't even show it. So could there be added an example output that shows all possible outputs or something similar.

Another example would be that if I am in a faction and search for "basic" information about myself then it shows "faction: { id: 123456, name: "Example"....}" but what would the field look like when I get info about a player who is not in a faction? I don't see any other way of finding out than to find someone who is not in a faction and ask for their output which takes time (and most (im guessing) people are not familiar with the api system). It would make it easier to develop systems if you can take into count all the possible outcomes.

 

Your fellow developer,

Mephiles
Anu6is [2292479]
I've recently been taking a look at the API myself as I was considering make a wrapper for it. When trying to figure out the structure of some responses, I've definitely come across some of the issues mentioned above. The current output from the API Site isn't very helpful for data points that my profile lacks. Some objects are simply null and there's no way to tell what properties they contain, while other properties are simply not present (no default value).