#API2.0, The NP2 database
I’ve been collecting NP2 data of games I was in since 25.5.
14 games with more than 3 M items in a size of 170 MB.
If you use spread sheets reguralry for your games, have any programming skills or knowledge of plotting data to graphs, or if you are just bored or curious, contact me
“I am offering complete access to my API, if you make publicly available whatever you create.”
for example: The most desired functionality which started all this is to draw the stored data to a graph and then to switch between the ticks to provide a historical view without the need of making screenshots.
the database; sneak peak
recorded games
The data I record are
Once for every game
- games
- players
- stars
Every two hours
- stars_owners_rel
- players_data
These are the columns
I am storing pretty much everything except fleet moves.
So,… a script is run every two hours, which loads game numbers
from my database and then one by one queries the NP2 servers (using my API) and stores the data back in a database.
It stores the immutable info once and the mutable every two hours.
- Immutable: game info, player names, star coords, …
- mutable: star owners, player stats
URL
http://nptriton.cqproject.net/ticks/<range>/<game_number>/<type>
Usage
If you understand regular expressions, this might be the best way to describe the possibilities:
“^ticks?(?:/([-,0-9]+))?/([0-9]+)(?:/(stars|players|full)\b)?/?$
”
range:
/x/ number of tick to show
/x-/ from x
/-x/ to x
/x-y/ from x to y
// empty for all
/x,y,z-a/ It will also soon accept commas. (not yet ready)
type:
stars, players
full (not yet working)
Examples:
/ticks/1/1234567890123456/players # displays players data at tick 1
/ticks/72-/1234567890123456/stars
# displays the star data from tick 72 to the end for the game 1234..
Example: http://nptriton.cqproject.net/ticks/42/4610412414763008/stars
*You can see game numbers of stored games in a picture above.