Skip to content
TORNLIFE More

Faction API

Started by MiamiVice [352574] on in API Development.

6 replies · 126 views · thread synced · 6 days ago · View on torn.com
About this thread

Posts archived: 7 / 7 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
7
Discussion span
→
People posting
5
Likes on archived posts
5
Posts by staff, officers and moderators
1
Authority score
71 / 100
Historical score
19 / 100
Story score
29 / 100
Engagement score
50 / 100

Most-liked replies

McNeo [864688]

You could make it dirty...

Obviously not working code, but something to give you an idea... Also, not sure how high you'd loop, not sure what the biggest faction ID is

for x = 1 to 32000
sReturn = "http://api.torn.com/faction/" & x & "?selections=&key=" & YourAPIKey
if name <> "" then call addFactionToList
sleep 600 'make 1 request every 600 milliseconds, so 100 per minute, so you don't get blocked
next

Note, as written, this would take over 5 hours to complete... You could add in some logging so names that return null don't get queried again in the future, reducing subsequent run time.
McNeo [864688]

Yeah, it's dirty but it will work.

This has actually piqued my curiosity so I might do this tonight for the fun of it haha.