Skip to content
TORNLIFE More

Struggling with Torn API Wrapper

Started by Per5eus [2675693] on in API Development.

2 replies · 44 views · thread synced · 3 days ago · View on torn.com
About this thread

Posts archived: 3 / 3 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
3
Discussion span
→
People posting
2
Likes on archived posts
2
Authority score
50 / 100
Historical score
16 / 100
Story score
24 / 100
Engagement score
40 / 100
Per5eus [2675693]

Newbie to Python and Torn API Wrapper. I'm just testing out different things. Some work, some don't. For example, I tried to print my TORN name and level. That works. Then, I try to print my active streak. Doesn't work. See the images below.

 

I have from TornAPIWrapper import TornApiWrapper at the top of my code, just not shown in this screenshot.

Output:

 

I am using a Limited Access API Key (not custom).

 

I have already given the TORN API documentation a read but there are a lot of things I don't understand. I've tried the Try It feature, and on the website, it outputs a JSON object that correctly shows my active streak, but I don't know what to actually put into my code.

Omanpx [1906686]

Never used the wrapper and i'd suggest you use the good old manual method instead, since the project is outdated and no longer maintained. But from what i'm seeing, i'm pretty sure it is fetching user/profile, and you are trying to get stuff from user/personalstats (activestreak and attackdamage). Here's a simplified guide and even some Python example code, hope it helps: https://www.torn.com/forums.php#/p=threads&f=61&t=16301927&b=0&a=0&start=0&to=22913150 

Mentions: [Guide] Learn to code API (with examples)