Is it possible to use the API to look at the list of all Factions in Torn?
Faction API
Started by MiamiVice [352574] on in API Development.
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
- IceBlueFire [776] Officer
· 1 likes ·
Nope. That call doesn't exist =/
Is it possible to use the API to look at the list of all Factions in Torn?
Nope. That call doesn't exist =/
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.
Thanks McNeo, I was hoping that I didn't have to run something like that but it looks like I'm going to have to.
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.
There is no faction search if you're traveling. If you're back in torn, you get every search option.