Dash.3179 Posted September 27, 2018 Share Posted September 27, 2018 I'm working on developing a drop rate tracker, however I'm bumping into an issue with lag from the api.When I retrieve data from api.guildwars2.com/v2/characters/Character_Name/inventory, the data is out of date... historically by anywhere between 30-50s (estimate).So far I've been getting around this by setting a 60s countdown timer, however recently this lag has been getting worse, and is now almost always over a minute out of sync.I realise this is simply the nature of managing a server such as this, and want you to know I'm not complaining about it... but when you have to wait 5 minutes for the cache to clear, actually testing to make sure this timer is right in-program is basically impossible.Is there any way to find out the current lag for endpoint requests in the api?Would it be possible to include a timestamp on requests? That way It'd be possible to automate the countdown timer to sync with the server on first request. Link to comment Share on other sites More sharing options...
darthmaim.6017 Posted September 27, 2018 Share Posted September 27, 2018 All character endpoints are cached in the API for 5 minutes. In addition, the instance server of the map you are playing on only writes your inventory to the backend servers the API is reading in batches and not real time. Link to comment Share on other sites More sharing options...
Dash.3179 Posted September 27, 2018 Author Share Posted September 27, 2018 I realise that, but is there a way to work out when the next batch will be sent to the api and sync accordingly?Without knowing the batch delay/ calculation times, there's no way to guarantee that the data you receive is the data you want when you're working with a time sensitive dataset which can be affected by in game drops/inventory management. Link to comment Share on other sites More sharing options...
darthmaim.6017 Posted September 27, 2018 Share Posted September 27, 2018 No, there is no way. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.