PDA

View Full Version : [C# CLI] Example - PublicApi sample



Zoltan
20-08-15, 23:11
Hello!

Here you can find an example how to use our Neocron Public Api.

The best way to work with the api is to create a api key at first. You can do this here:
http://neocron-game.com/AccountManagement/AuthorizationKeys

You'll need this key to get a special session token from our SessionManagement Service. The validity of the token is limited by time - 15 min per default. You can refresh this token anytime you want by relogging for example.

The Neocron API is based on WCF.

Session Management:
http://api.neocron-game.com:8100/SessionManagement
http://api.neocron-game.com:8100/SessionManagement?wsdl

Public Interface:
http://api.neocron-game.com:8100/PublicInterface
http://api.neocron-game.com:8100/PublicInterface?wsdl

Example:

Download: 12545

Notice: There is also a prevention system - Don't try to misuse the public api this could lead into a ban.

Sidhardha
04-12-16, 17:21
Played a bit with API and got to say i dont see much point in current state other than making some basic Neocron info for some website - but most of it is reduntant.

As far i understand only data available now are:
- Outpost statistics
- Server statistic
- OWN character data
- Kill list

Nice for illustration purposes, but pretty useless otherwise, except maybe Outpost data, because:
- Server statistics are easily available and you dont really need a separate tool to display them. Someone might need the data to integrate server status to their fansites - but generally you just launch the game to see same..
- Outpost data might actually come handy making a population map to see current active spread of players, but also underwhelming since it doesnt include dungeon/city districts data.
- Kill List is ok, but we already have the site with kill list and at best might just integrate functionalty to existing discord bot too.
- Character data is useless because its YOUR character data. Since you already have access to it ingame, its kinda pointless.

What i actually would have expected from API:
- access to list of players online and their extensive data - rank, soul light, equipment, location, money etc. Similarly to personal data available now for own characters.
- access to location data with player statistics in them (not really needed though, since you should be able to check character location in character data and thus parse it)


Why would such data be useful? Since then could make a tools like:
- Clan Invite Tool: gives you list of online players of your faction without Clan and their ranks and LE status, so you could whisper them/send ingame male to invite to your clan.
- Trade Assist App: You got Paw of Bear to sell? Tool gives you list of players with required melee skill and Stength that dont already have it, so you could contact them and offer the services.
- PK Alert tool: Add players to your KOS list, and tool will alert you each time they are in same zone as you. (well, that probably could be bit broken)
- Activity map: Map of Neocron, showing how many people are in each zone currently
- List of top 10 richest persons on Server, list of top 10 people with highest Xp, kills etc. rankings
etc. possibilities are many

Though some of them limited by the fact that as it is now, API response is pretty slow, so cant really make realtime applications.

For me though, i am mostlly interesting from statistical standpoint/making reports of various kind of Neocron, so its lacking since it doesnt have access to historical data: only current. So cant say make graph of player activity, time spent ingame, seeing how statistic/behavior/activities change overtime and stuff. So i would have preffered just a direct SQL access to database rather than API.

Either read only access to database, or to not load with queries - snapshot of database without technical tables being done ever day and loaded to separate server, and accessible for queries. Not sure if its worth the effort though, unless you want to get effective statistical tool to monitor game and players parameters.

Zoltan
04-12-16, 17:48
Nice for illustration purposes, but pretty useless otherwise, except maybe Outpost data, because:
- Server statistics are easily available and you dont really need a separate tool to display them. Someone might need the data to integrate server status to their fansites - but generally you just launch the game to see same..
- Outpost data might actually come handy making a population map to see current active spread of players, but also underwhelming since it doesnt include dungeon/city districts data.
- Kill List is ok, but we already have the site with kill list and at best might just integrate functionalty to existing discord bot too.
- Character data is useless because its YOUR character data. Since you already have access to it ingame, its kinda pointless.


We do have a site for kill list? If you meant this one (http://neocronkillstats.azurewebsites.net/kills.aspx?server=titan) I have to say its just the "online" version of the sample above. The personal character data isn't useless as long you can save or export skill setups for example... its up to you what you are going to make with. It's also possible that you can pass you character details to a thirdparty site.



What i actually would have expected from API:
- access to list of players online and their extensive data - rank, soul light, equipment, location, money etc. Similarly to personal data available now for own characters.
- access to location data with player statistics in them (not really needed though, since you should be able to check character location in character data and thus parse it)


Sorry, I am pretty sure that ppl aren't that amused if any of their character data is available througt public API without their knowledge or permission. If they want to share their details with you they would allow you to call "The useless GetCharacters" method (you mentioned above) with their api key.

Sidhardha
04-12-16, 18:05
Plenty of MMOs have open access to character info - GW2, Aion, WoW for example. I dont see much harm in info about skills and equipment being public. Location is other thing - personal location might be overkill, but at least statistics of how many players in specific sector would allow creation of convinient tools for people to know where activity is concentrated now, if dungeons are crowded etc.

That said, it all comes to what you actually want to achieve with the API being accessible. For me as i mentioned, its useless since i am more interested in historical data.

Rather than making options available best to make clear what exactly the goals that need to be achieved are. If making an Outposts map and ability to synchronize with nskill (though inconvinient way, since user has to get apiKey manually) are the only goals then ok. Otherwise though would be best to ask community what functionality it actually does want, and see if the data can be made available.

Zoltan
04-12-16, 18:13
I suggest you to visit https://stats.techhaven.org/en for historical data. THN is consuming exactly the same api.

Aside from that some ppl don't want their character setups to be shared and Neocron isn't sharing anything but the type of game "MMO" with the games you've listed.

Sidhardha
04-12-16, 19:31
https://stats.techhaven.org/en
This is actually pretty nice. Not quite what i meant, but very well done.

hudsonbeck
04-12-16, 19:51
...some ppl don't want their character setups to be shared...
+1


If every setup was as bad as some of mine, Balancing weapon damage would be extremely difficult! :)