PS2-Parser: Java-based client for the API - PlanetSide Universe
PSU Social Facebook Twitter Twitter YouTube Steam TwitchTV
PlanetSide Universe
PSU: Elmos, Smurfs and Barneys. All others can go F*!@ themselves.
Home Forum Chat Wiki Social AGN PS2 Stats
Notices
Go Back   PlanetSide Universe > PlanetSide Discussions > PlanetSide 2 API Discussion

 
 
Thread Tools Search this Thread Display Modes
Old 2013-04-13, 11:59 PM   [Ignore Me] #1
Casey
Private
 
PS2-Parser: Java-based client for the API


I'm finally confident enough to release the first stable (beta-) version of my POJO mapper for the API. The goal is to simplyfy working with the API and taking care of most of the annoyances it currently has, like random errors. It includes (nearly) all collections the API offers plus the server status, which is somewhat hidden.

Example:
Code:
// basic setup to retrieve character information
ApiConnection apiConnection = new ApiConnection();
CharacterApiDAO characterDao = apiConnection.getCharacterDao();

// get the character by name (don't need
CharacterResponse characterResponse =
        characterDao.getCharacter("ICaseyI");

// no need to check if the character exists.
// I know the character exists because its mine.
ApiCharacter character = characterResponse.getCharacters().get(0);

// getting additional character information
CharactersFriendsResponse friends = characterDao.getFriends(character);
CharacterOnlineStatusResponse onlineStatus =
        characterDao.getOnlineStatus(character);
CharactersEventsResponse dearthEvents =
        characterDao.getEvents(character, CharactersEventType.DEATH);
CharactersWorldResponse world = characterDao.getWorld(character);

System.out.println(characterResponse);
That's 5 API Request with just 8 lines of code and you can continue working with it, like you would with any normal data structure. You don't need to thing about json/xml.

You can find more information on the projects website. I'm also at Planetside universe's API irc channel (irc.planetside-universe.com #api).

Last edited by Casey; 2013-04-14 at 11:11 AM.
Casey is offline  
 
  PlanetSide Universe > PlanetSide Discussions > PlanetSide 2 API Discussion

Bookmarks

Discord


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:49 PM.

Content © 2002-2013, PlanetSide-Universe.com, All rights reserved.
PlanetSide and the SOE logo are registered trademarks of Sony Online Entertainment Inc. © 2004 Sony Online Entertainment Inc. All rights reserved.
All other trademarks or tradenames are properties of their respective owners.
Powered by vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.