Java API Wrapper: Yet Another GW2 API

Java API Wrapper: Yet Another GW2 API

in API Development

Posted by: Lulan.8497

Lulan.8497

Hello Guys,

the last few days i wrote a highly sophisticated wvw api wrapper.

To put it in a nutshell, i transform the snapshots provided by arenanets json based api into a well defined object graph and provide an event driven interface. I call this functionality the “core”-module.
Therefore i used
- apache Jersey as the client for the json api
- guice for injections
- guava Framework for utils, caching and eventbus

In addition to this core features i’m actually writing some kind of history tracking and analyzing module using eclipseLink and apache derby database. It connects to the “core”-module and tracks changes, provides statistics etc.

The “core”- and “analyzing”-module will than become used for implementing a sample application.

The whole framework is built using maven.

I’d like to share this whole framework with you guys. But i’d rather share the source than the built artifacts, because i’d like to keep control for future development.
Therefore i need some kind of maven repository.

- Is there anybody out there that already hosts such a repository for gw related artifacts?
- If not, would’t it be nice if arenanet provides those?

Greez

Java API Wrapper: Yet Another GW2 API

in API Development

Posted by: Lulan.8497

Lulan.8497

I’ll give you some example how my api works:


			final IWVWWrapper apiWrapper = YAGW2APICore.getWVWWrapper();
			apiWrapper.registerWVWMapListener(new IWVWMapListener() {				
				@Override
				public void notifyAboutObjectiveEndOfBuffEvent(IWVWObjectiveEndOfBuffEvent event) {
					// TODO Auto-generated method stub					
				}
				
				@Override
				public void notifyAboutObjectiveCapturedEvent(IWVWObjectiveCaptureEvent event) {
					// TODO Auto-generated method stub					
				}				
				@Override
				public void notifyAboutChangedMapScoreEvent(IWVWMapScoresChangedEvent event) {
					// TODO Auto-generated method stub					
				}
			});

			apiWrapper.registerWVWMatchListener(new IWVWMatchListener() {				
				@Override
				public void notifyAboutMatchScoreChangedEvent(IWVWMatchScoresChangedEvent event) {
					// TODO Auto-generated method stub					
				}
			});
			apiWrapper.start();

This is all you got to do do gain information about any wvw change
You can also register for events of only a subset of matches or maps…

And btw. i’d like to have some sourcecode-bbcode for this forum !!!