These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

API Data Doesn't Update After Each Retrieval

Author
Ellon JTC
Quadralien
#1 - 2013-06-29 08:42:59 UTC
Hi
I've written a simple program that is supposed to retrieve my API and tell me how long my skill queue is. It works but the only problem is it doesn't update. When i used it the first time it said I have:

4 day 5 hours 12 mins 42 seconds left.

Its been 4 hours and its still showing the same thing every time i call it. Any idea what i might be doing wrong?

thanks in advance.
ItsmeHcK1
Immortalis Inc.
Shadow Cartel
#2 - 2013-06-29 15:18:24 UTC
You're really gonna have to give a lot more information here...
Right now I'm gonna guess you're doing it wrong.
Zaepho
Goosefleet
Gooseflock Featheration
#3 - 2013-06-29 19:08:30 UTC
ItsmeHcK1 wrote:
You're really gonna have to give a lot more information here...
Right now I'm gonna guess you're doing it wrong.

^ Probably not entirely wrong.

You must realize that the API is cached. That one is on an hourly timer if i recall correctly. no matter how many times you call it within that hour you will always get the same result back. You should avoid calling APIs repeatedly too many times during the cache time though. It makes the API server unhapppy which makes CCP PrismX Grumpy.
Ellon JTC
Quadralien
#4 - 2013-06-30 09:19:09 UTC
ItsmeHcK1 wrote:
You're really gonna have to give a lot more information here...
Right now I'm gonna guess you're doing it wrong.



Goes something like this:

'''''''''''''''''''''''''''''''''''
Dim objEve As EveAI.Live.EveApi
objEve = New EveAI.Live.EveApi(KeyID, vCode)

Dim objSkills As List(Of EveAI.Live.Character.SkillInTraining)
objSkills = objEve.GetCharacterSkillQueue()


For Each skill As EveAI.Live.Character.SkillInTraining In objSkills

' skill.TrainingDuration doesn't change very often (apparently everytime i log in or something)

Next
''''''''''''''''''''''''''''''''''''''

i've tried using "skill.traningend" but that doesn't update much either
Ellon JTC
Quadralien
#5 - 2013-06-30 09:23:30 UTC
Zaepho wrote:
ItsmeHcK1 wrote:
You're really gonna have to give a lot more information here...
Right now I'm gonna guess you're doing it wrong.

^ Probably not entirely wrong.

You must realize that the API is cached. That one is on an hourly timer if i recall correctly. no matter how many times you call it within that hour you will always get the same result back. You should avoid calling APIs repeatedly too many times during the cache time though. It makes the API server unhapppy which makes CCP PrismX Grumpy.



Actually it doesn't update for me in an hour
Ellon JTC
Quadralien
#6 - 2013-06-30 10:21:19 UTC
funny thing, evemon isn't up to date with the skill i'm training either
Miilla
Hulkageddon Orphanage
#7 - 2013-07-02 11:00:01 UTC  |  Edited by: Miilla
Each API has (or had) a lifeti me date in the returned REST data. Well behaved clients should repect this freshness of the data and not re-query within this date.

It is to prevent excess loading on the server read the REST output and you should find a date of freshness, it varies with each API as some are updated more than others.

If you are writing a client that does not respect this date, then most likely it will be blocked if excessive loading and thus cost for CCP.


What concerns me and should concern CCP is that you are writing automation yet have no clue to simple principles. Re-read the API documentation and check the REST output for such information on requerying date.

Sounds to me you are not respecting the date in the rest payload which is a big no no.

Also one reason as to why CCP want to tighten their grip on the API usage via licensing (amongst IP issues)