How often is the event data updated?

How often is the event data updated?

in API Development

Posted by: Killer Rhino.6794

Killer Rhino.6794

Q:

How often is the event data updated? I don’t want to pull the event data faster than necessary, or put any extra stain on you guys.

Thanks for the endpoints!

Creator of GW2Kit

How often is the event data updated?

in API Development

Posted by: Cliff Spradlin.3512

Cliff Spradlin.3512

Lead Programmer

A:

The event data is updated in real-time, and there is no perceptible delay between an event state changing on the game server and it being updated in the API view.

Feel free to update as often as you’d like, though you probably don’t need to update more often than every 30 seconds or so.

How often is the event data updated?

in API Development

Posted by: Sorrow.7384

Sorrow.7384

Are you limiting now? My server is unable to access any guildwars2.com IP addresses anymore.

Edit: Actually I think you may have a network configuration issue:


 ping api.guildwars2.com
PING api.guildwars2.com (64.25.40.16) 56(84) bytes of data.
64 bytes from 64.25.40.16: icmp_req=1 ttl=116 time=20.5 ms
64 bytes from 64.25.40.16: icmp_req=1 ttl=116 time=20.6 ms (DUP!)
64 bytes from 64.25.40.16: icmp_req=1 ttl=116 time=20.6 ms (DUP!)
64 bytes from 64.25.40.16: icmp_req=1 ttl=116 time=20.7 ms (DUP!)
64 bytes from 64.25.40.16: icmp_req=2 ttl=116 time=20.5 ms
64 bytes from 64.25.40.16: icmp_req=2 ttl=116 time=20.5 ms (DUP!)
64 bytes from 64.25.40.16: icmp_req=2 ttl=116 time=20.5 ms (DUP!)
64 bytes from 64.25.40.16: icmp_req=2 ttl=116 time=20.6 ms (DUP!)

This is from two different boxes in two different geographical locations.

Tracepath’s last item shows:


14:  64.25.32.82 (64.25.32.82)                            asymm 11  24.613ms !H

(edited by Sorrow.7384)

How often is the event data updated?

in API Development

Posted by: Killer Rhino.6794

Killer Rhino.6794

We’ve seen this same question asked every couple of weeks, for the last six months almost. Can we please sticky this?

Creator of GW2Kit

How often is the event data updated?

in API Development

Posted by: smiley.1438

smiley.1438

Yes, please! Or even better: create a stickied (non discussion) FAQ thread where we could qoute or link important information.

Along with these qoutes from Cliff:

caching:

Yes, please cache the results!

The names are guaranteed to be static between game patches/builds, but it’s possible for the list to grow between patches. The Events API, like the Item API, only shows events and maps that have been discovered by players.

So the ‘perfect’ logic would be to cache the results, and only do a lookup after a patch or if you don’t have a cached result for a particular event ID. And you probably don’t really need to do it between patches, as event names will rarely if ever change after being created.

item discovery:

If any player in the world participates in an event, then it is considered discovered.
If any player in the world acquires an item, then it is considered discovered.

How quickly an item or event is discovered depends on how well-hidden it is in the world. It’s possible that an event or item might never be discovered.

Edit: To clarify, once something is discovered on any world, it is considered discovered on all worlds.

(edited by smiley.1438)

How often is the event data updated?

in API Development

Posted by: Orthas.4937

Orthas.4937

Yes, please! Or even better: create a stickied (non discussion) FAQ thread where we could qoute or link important information.

Along with these qoutes from Cliff:

caching:

Yes, please cache the results!

The names are guaranteed to be static between game patches/builds, but it’s possible for the list to grow between patches. The Events API, like the Item API, only shows events and maps that have been discovered by players.

So the ‘perfect’ logic would be to cache the results, and only do a lookup after a patch or if you don’t have a cached result for a particular event ID. And you probably don’t really need to do it between patches, as event names will rarely if ever change after being created.

item discovery:

If any player in the world participates in an event, then it is considered discovered.
If any player in the world acquires an item, then it is considered discovered.

How quickly an item or event is discovered depends on how well-hidden it is in the world. It’s possible that an event or item might never be discovered.

Edit: To clarify, once something is discovered on any world, it is considered discovered on all worlds.

Pretty much everything would get discovered pretty fast…. there are a lot o worlds, and a lot of PVE players.

Newguy – GOM

I play when I can and help who I can

How often is the event data updated?

in API Development

Posted by: smiley.1438

smiley.1438

Well, there are still like 1500+ items which haven’t been discovered again since the last flush of items.json – and a lot of these are not items which have been removed or are seasonal (e.g. recipe items for a lot of ascenced weapons are missing).
To be exact: my local database lists 31216 items and 8233 recipes while items.json lists 29688 and recipes.json 8115.

(edited by smiley.1438)

How often is the event data updated?

in API Development

Posted by: Orthas.4937

Orthas.4937

well… you could always get someone.. or some people…. to find the differences and fix it manually. have a community .json

or due to the lack of people….. set up a script to find which items one list has and what items the other doesn’t.

“call the api for each item, compare the name text between them, move on if equal, store item code if false.”

Newguy – GOM

I play when I can and help who I can

(edited by Orthas.4937)

How often is the event data updated?

in API Development

Posted by: smiley.1438

smiley.1438

There you are, have fun

http://gw2.chillerlan.net/missing_items.html

For me it’s as easy as:


$q = sql_query('SELECT * FROM `gw2_items`');
$count = count($q);
if(is_array($q) && $count > 0){	
	$data = gw2_api_request('items.json');
	if(is_array($data) && isset($data['items'])){
		foreach($q as $item){
			if(!in_array($item['id'], $data['items'])){
				//yada yada yada
			}
		}
	}	
}

Sure, it could be quite more effective, but it serves the point.

(edited by smiley.1438)

How often is the event data updated?

in API Development

Posted by: Orthas.4937

Orthas.4937

is that the result? (what you linked?)

{btw that’s C(a variant) correct?}
ewwww nested if statements.

Newguy – GOM

I play when I can and help who I can

(edited by Orthas.4937)

How often is the event data updated?

in API Development

Posted by: smiley.1438

smiley.1438

Yep it’s the result. And yes, PHP is a C derivate

(so you might want to check out PHP and maybe JavaScript (also C derivate, not Java) examples for ideas, too)

How often is the event data updated?

in API Development

Posted by: Orthas.4937

Orthas.4937

Im a visual basic programmer… so i gathered it was one of the major relatives…

Well, as long as we have a list of items, that is accessible to the devs, it is now something that they have a direct knowledge to be able to fix, although it probably deserves its own thread.

Newguy – GOM

I play when I can and help who I can

How often is the event data updated?

in API Development

Posted by: smiley.1438

smiley.1438

I just mentioned it because you were asking for C++ and VB examples – and since they’re all kind of C derivates it’s sometimes helpful to look beyond the Tellerrand to gather ideas

Oh, a moderator may be so kind and split this topic if possible. Thanks.