Entropia Tracker API for programmers

Starfinder

Elite
Joined
Jan 31, 2005
Posts
3,062
Location
Denmark
Society
Planet Express
Avatar Name
Ms. Kazzza 'Starfinder' Milla
Hello guys, as Im sitting here programming the API so you can have Entropia tracker stuff on your very own site, i wonder what kind of features you would like to have on your sites.... So.. Shoot... What do you want?


(Full db access is a no go ofcourse.. also : getAllLoots() is a no go)
 
Mostly, I would want the ability to get all my own individual loots out and filtered in various ways such as by mob/mob maturity (hunting), item (crafting), resource (mining).

The ability to get a list of all mobs, maturities, resources, crafted items, etc. that are tracked by ET so that I don't have to create the list myself.

Additionally, summary info would be good, such that I could easily get a count of all my globals and hofs by profession (mining, hunting crafting) or by mob, resource or item crafted, so that I'm not stuck using the forum signature templates.

Lastly, the ability to get top XXX single loots or total loot for a profession or mob/mob maturity as the top 5 list in ET is just way too limited as it is now. For example, what are the top 25 loots for an atrox young.
 
Mostly, I would want the ability to get all my own individual loots out and filtered in various ways such as by mob/mob maturity (hunting), item (crafting), resource (mining).

The ability to get a list of all mobs, maturities, resources, crafted items, etc. that are tracked by ET so that I don't have to create the list myself.

Additionally, summary info would be good, such that I could easily get a count of all my globals and hofs by profession (mining, hunting crafting) or by mob, resource or item crafted, so that I'm not stuck using the forum signature templates.

Lastly, the ability to get top XXX single loots or total loot for a profession or mob/mob maturity as the top 5 list in ET is just way too limited as it is now. For example, what are the top 25 loots for an atrox young.

Roger.... The "Get all my loots, finds, crafts" wont be there, as you could "getAllLoots("Deeveon")" ... and then just loop through all the players, to get the entire database... :) but the rest will be there :)
 
Roger.... The "Get all my loots, finds, crafts" wont be there, as you could "getAllLoots("Deeveon")" ... and then just loop through all the players, to get the entire database... :) but the rest will be there :)


wouldnt it be possible to just link it to ones own account only sort of in some way?

And also what i would like to get is to be able to get the lists that i'm subscribed to but to modify values it displays and for how long etc.

Also a genereal way to link the api to what you have paid for so you can get that info easily. now i just need to learn php also :p
 
I think you would need to be able to drag out your own data, or perhaps the data of everyone that your premium account has paid to drag out. e.g. you pay 1000 credits to be able to drag out your own data. Maybe that of your soc too...?

Forrest :)
 
Is it going to be a COM DLL or a .NET DLL ?
 
So far the following is possible:


getMyGlobals() -> Loots[]
getSocGlobals() -> Loots[]
getsocMemberGlobals("avatar name") -> Loots[] (Avatar has to be in the developers soc)
getSocScoreHunting("socName") - Int score
getSocScoreMining("socName") - Int score
getSocScoreCrafting("socName") - Int score
getCraftableItems() -> CraftItems[]
getAverageLootValue("MobName MaturityName") -> int PED
getHuntingUbers("MobName") -> Loots[] (maximum 100 - desc sort)
getCraftingUbers("ItemName") -> Crafts[] (maximum 100 - desc sort)
getMiningUbers("Mineral") -> Finds[] (maximum 100 - desc sort)


public LootInfo getHighestLootMobMaturity(EntropiaTracker et, int mobID, int maturityID)
public MobInfo getMobDetails(EntropiaTracker et, string mobName)
public PlayerInfo getPlayerInfo(EntropiaTracker et, string avatarname)


(EntropiaTacker et is your connection details)

MobInfo contains:
- Mobname (string).
- Mobmatority (string) (null if event mob such as loongtooth).
- MobID (int)
- MaturityID (int) (null is event mob such as longtooth)

LootInfo contains:
- LootValue (int)
- PlayerID (int) (who got the global)
- MobID (int)
- MaturityID (int)
- AvatarName (string)
- LootTime (datetime)

PlayerInfo contains:
- AvatarName (string)
- SocName (string) (null if user is not in a soc)
- SocID (int) (0 if user is not in a soc)
- HuntingRank (int) (0 if user hasent got a rank)
- CraftingRank (int) (0 if user hasent got a rank)
- MiningRank (int) (0 if user hasent got a rank)
- PlayerID (int)
 
Great thing!

I would love to have soc HoF on our own site
Don't even need full API for that ... XML for all on ET registered soc members would work well and would be easy to integrate ;)

Other than that i agree with Deeveon

Edit
Ohhhh too late all i need is there :D
GREAT!
 
Last edited:
Some simple info I'd like to see (all avatar specific):

- Latest global/hof in category X/all categories
- Personal best in category X/all categories for today/this week/this month/all time (bonus parameter: from specific mob/ore/item)
- Number of globals/hofs today/this week/this month/all time in category X/all categories

These could probably be extracted from the "so far" list, but direct queries for these would be handy.
 
Some simple info I'd like to see (all avatar specific):

- Latest global/hof in category X/all categories
- Personal best in category X/all categories for today/this week/this month/all time (bonus parameter: from specific mob/ore/item)
- Number of globals/hofs today/this week/this month/all time in category X/all categories

These could probably be extracted from the "so far" list, but direct queries for these would be handy.

Noted.. will be added... (Except for the "latest hot/global" - only HoF.. otherwise you could request the latest every milisecond to get every new entry in the db)
 
This is the DLL as it is now:


Class Hunting:

- public LootInfo getHighestLootMobMaturity(EntropiaTracker et, mobInfo mi)
- public MobInfo getMobDetails(EntropiaTracker et, string mobName)
- public LootInfo[] getUbers(EntropiaTracker et, mobInfo mi)
- public LootInfo[] getSocGlobals(EntropiaTracker et)
- public LootInfo[] getmyGlobals(EntropiaTracker et)
- public int getAverageLootValue(EntropiaTracker et, socInfo si)
- public int getSocScore(EntropiaTracker et, socInfo si)
- public LootInfo getLastHof(EntropiaTracker et)
- public LootInfo[] getCurrentHofList(EntropiaTracker et)
- public MobInfo[] getMobList(EntropiaTracker et)


Class Mining:

- public int getSocScore(string socName)
- public MiningFind[] getUbers(EntropiaTracker et)
- public MiningFind[] getSocGlobals(EntropiaTracker et)
- public MiningFind[] getMyGlobals(EntropiaTracker et)
- public MiningFind[] getCurrentHofList(EntropiaTracker et)
- public MiningFind[] getLastHof(EntropiaTracker et)
- public Mineral[] getMineralList(EntropiaTracker et)


Class Crafting:

- public int getSocScore(string socName)
- public CraftItem[] getCraftableItems(EntropiaTracker et)
- public CraftInfo[] getSocGlobals(EntropiaTracker et)
- public CraftInfo[] getUbers(EntropiaTracker et)
- public CraftInfo[] getMyGlobals(EntropiaTracker et)
- public CraftInfo[] getCurrentHofList(EntropiaTracker et)
- public CraftInfo[] getLastHof(EntropiaTracker et)


Class Soc:

- public PlayerInfo[] getSocRooster(EntropiaTracker et, string socName)
- public bool joinSoc(EntropiaTracker et, userInfo ui, socInfo si)
- public bool leaveSoc(EntropiaTracker et, userInfo ui, socInfo si)
- public int getPlayerInternalHuntingRank(EntropiaTracker et, string playerName)
- public int getPlayerInternalMiningRank(EntropiaTracker et, string playerName)
- public int getPlayerInternalCraftingRank(EntropiaTracker et, string playerName)
- public socInfo getSocInfo(EntropiaTracker et, string socName)


Class Player: (should I rename it Playah? :D )
- public PlayerInfo getPlayerInfo(EntropiaTracker et, string avatarname)




+ Various other stuff that isent important here as it isent "features" but "connection classes" + "Data handeling classes" and so on...
 
Code:
public object[] GetLootbyMobMatDate(String Mob,String Maturity,DateTime d)
{
String SQL = "select lootvalue,avatar,MAtime from loots where Mob='{0}' and Maturity='{1}' and MAdate = {2}";
SQL=String.Format(SQL,Mob,Maturity,d);

}

I assume the code will not exact be like this but I guess you know what I mean
 
PHP example...

The following is a PHP example to get a persons last 50 globals.

PHP:
<?php
/*Disclaimer: This code comes without any warrenty. This code should not be run on mission critical - people will die if it doent work - systems.*/
$username      = "XXXXXXXXXXX";					/*Your Entropia Tracker username, used to login with - NOT your avatar name*/
$apiKey        = "YYYYYYYYYYYYY";		/*Your Entropia Tracker API Key - Found under settings on Entropia tracker*/
$apiCall       = "getLastGlobalsAvatarname";	/**/
$apiParam      = "playerName";					/**/
$paramInput    = "Ms Kazzza Milla Starfinder";	/*Avatar / team you want the last 50 globals from*/

/*Create the API call*/
$xml = simplexml_load_file("http://www.entropiatracker.com/api/api.asp?APIUSER=". $username ."&KEY=". $apiKey ."&mode=". $apiCall ."&". $apiParam ."=" . $paramInput);
echo "<table border=\"1\"><tr><td><strong>Category</strong></td><td><strong>What</strong></td><td><strong>Value</strong></td><td><strong>Time stamp</strong></td></td>";
/*Loop through all the child nodes in the XML structure*/
foreach($xml->children() as $child)
{
	echo "<tr>";
	foreach($child->children() as $subChild)
	{
		/*Loop through all the values in the current child*/
		echo "<td>" . $subChild . "</td>";
	}
    echo "</tr>";
}
echo "</table>";
?>

Note: This is the first php code ive ever written, so dont kill me if it can be done in a better way.. I was just asked to provide a quick PHP example.. so.. here it is.. :p
 
The following is a PHP example to get a persons last 50 globals.

PHP:
<?php
/*Disclaimer: This code comes without any warrenty. This code should not be run on mission critical - people will die if it doent work - systems.*/
$username      = "XXXXXXXXXXX";					/*Your Entropia Tracker username, used to login with - NOT your avatar name*/
$apiKey        = "YYYYYYYYYYYYY";		/*Your Entropia Tracker API Key - Found under settings on Entropia tracker*/
$apiCall       = "getLastGlobalsAvatarname";	/**/
$apiParam      = "playerName";					/**/
$paramInput    = "Ms Kazzza Milla Starfinder";	/*Avatar / team you want the last 50 globals from*/

/*Create the API call*/
$xml = simplexml_load_file("http://www.entropiatracker.com/api/api.asp?APIUSER=". $username ."&KEY=". $apiKey ."&mode=". $apiCall ."&". $apiParam ."=" . $paramInput);
echo "<table border=\"1\"><tr><td><strong>Category</strong></td><td><strong>What</strong></td><td><strong>Value</strong></td><td><strong>Time stamp</strong></td></td>";
/*Loop through all the child nodes in the XML structure*/
foreach($xml->children() as $child)
{
	echo "<tr>";
	foreach($child->children() as $subChild)
	{
		/*Loop through all the values in the current child*/
		echo "<td>" . $subChild . "</td>";
	}
    echo "</tr>";
}
echo "</table>";
?>

Note: This is the first php code ive ever written, so dont kill me if it can be done in a better way.. I was just asked to provide a quick PHP example.. so.. here it is.. :p

Got an better idea, just output XML-data from your site, and the client will use AJAX to read the data.. not all servers like to connect to other servers getting data..


don't have an example though, but then it's the client collecting data, not server.. wich will speed things up at little.

And for those who can't do ajax, it's just to google :)
 
Got an better idea, just output XML-data from your site, and the client will use AJAX to read the data.. not all servers like to connect to other servers getting data..


don't have an example though, but then it's the client collecting data, not server.. wich will speed things up at little.

And for those who can't do ajax, it's just to google :)

Not quite sure what you mean... This PHP script reads the XML feed from Entropia Tracker.. and makes it "pretty"... You can do whatever you like with it.. loads it in via Ajax or a java applet for all i care :p
 
The following is a PHP example to get a persons last 50 globals.

PHP:
<?php
/*Disclaimer: This code comes without any warrenty. This code should not be run on mission critical - people will die if it doent work - systems.*/
$username      = "XXXXXXXXXXX";					/*Your Entropia Tracker username, used to login with - NOT your avatar name*/
$apiKey        = "YYYYYYYYYYYYY";		/*Your Entropia Tracker API Key - Found under settings on Entropia tracker*/
$apiCall       = "getLastGlobalsAvatarname";	/**/
$apiParam      = "playerName";					/**/
$paramInput    = "Ms Kazzza Milla Starfinder";	/*Avatar / team you want the last 50 globals from*/

/*Create the API call*/
$xml = simplexml_load_file("http://www.entropiatracker.com/api/api.asp?APIUSER=". $username ."&KEY=". $apiKey ."&mode=". $apiCall ."&". $apiParam ."=" . $paramInput);
echo "<table border=\"1\"><tr><td><strong>Category</strong></td><td><strong>What</strong></td><td><strong>Value</strong></td><td><strong>Time stamp</strong></td></td>";
/*Loop through all the child nodes in the XML structure*/
foreach($xml->children() as $child)
{
	echo "<tr>";
	foreach($child->children() as $subChild)
	{
		/*Loop through all the values in the current child*/
		echo "<td>" . $subChild . "</td>";
	}
    echo "</tr>";
}
echo "</table>";
?>

Note: This is the first php code ive ever written, so dont kill me if it can be done in a better way.. I was just asked to provide a quick PHP example.. so.. here it is.. :p

I have seen lots of worse code for a first try :D

Personally i dont like the foreach statement but well...
And if i where you , i would simple quote with echo , so you dont have to escape the doublequote in html..
exemple :
echo '<table border="1"><tr><td>';


you can put an ob_start(); in the begining of page to make the whole code faster (its a buffer that stack up all code and send it to browser when work is finish.. no need to bother to end it , php do it alone).
 
Personally i dont like the foreach statement but well....
How would you have done it then? - id like to know since im new to all of this... If there is a "getallsubchilds()" thing :)
 
Back
Top