Skip to content
TORNLIFE More

Using my API key efficiently

Started by Hurric3an [2052246] on in API Development.

5 replies · 271 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 6 / 6 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
6
Discussion span
→
People posting
5
Likes on archived posts
2
Posts by staff, officers and moderators
1
Authority score
71 / 100
Historical score
26 / 100
Story score
31 / 100
Engagement score
52 / 100
Hurric3an [2052246]

I'm writing a script for Java, which uses my API key to grab information. However, I need to grab a lot of information, right now I use my API key twice for every item in the game in fact, once to search all bazaars and once to search the item market. If you have experience with this and know how to cut this down to once or twice each run of the program, I would greatly appreciate your help.

Btw, I'm writing in Eclipse with Maven
Bug [1455582] Committee Committee

Why are you making 2 calls per item? The above query searches item market and bazaar simultaneously? Also, just have it slow load, so it takes total items / 100 minutes to fully load the program?



A little more info would be helpful, what is your goal?
Hurric3an [2052246]

I realized I could use the bazaar and item market at the same time already, thank you. I'm taking a computer science course and just playing with some ways to apply what I'm learning. I also set it to only search one item per second so it doesn't request too many per minute. It's unfortunate that searching bazaars and the market is the only way to send fewer requests, calling every item at once would be useful
Helcostr [1934501] Wiki Editor

store your requests as you go thoughout the day, and reference the storage as needed, updating it when the info gets too old

speed isnt your friend here
paulwratt [2027970]

I think what ur looking for is, after an initial pull of bulk data, a subset of change. thats what this post asks for:

API server load & bandwidth reduction query option
https://www.torn.com/forums.php?p=threads&f=63&t=16044866&b=0&a=0

however, unlike its examples, you are looking for "removed" (or sold) items, which is not what the server current allows access to. They do however use that info to recalculate the "current value", so it must be retrievable. In the meantime u are stuck "doing it manually"

btw pulling 1x sec may not be so accurate, due to network latency, request processing, then data processing and not to mention the speed of ur network connection

Mentions: API server load & bandwidth reduction query option