Aan external application can get the TOP list of players sorted by their score, the number of their wins and the total number of played games. For getting this information the application should send a POST request to the following API script:
http://www.iggamecenter.com/api_top_list.php
containing the following parameters:
Field Name |
Field Content |
Field Format |
app_id |
Application unique ID |
mandatory, numeric |
app_code |
Application secret passcode |
mandatory, alpha-numeric |
gid |
The ID of the game. |
mandatory, numeric |
uid |
The ID of the currently authorized member whose position in the TOP list is requested |
optional, numeric |
session_id |
Unique session ID of the currently authorized member that was received during authorization procedure) |
optional, alpha-numeric |
topScore |
Non-zero value specifies that a game statistics should be included in the response. |
optional, numeric |
topWin |
Non-zero value specifies that a log of 20 last games should be included in the response. |
optional, numeric |
topGames |
Non-zero value specifies that a log of 20 last games should be included in the response. |
optional, numeric |
If both uid and session_id are specified then the response will include the position of the currently authorized member in the requested TOP lists.
The returned response will be one of the following:
Failure response:
<errorMessage>--Some error message--</errorMessage>
Success response:
<topLists totalNum="1234">
<topScore>
<member pos="1" uid="7426" name="Arimabuff" score="1918" />
<member pos="2" uid="9332" name="Zickzack" score="1879" />
<member pos="3" uid="9477" name="PCM" score="1862" />
...
</topScore>
<topWin>
<member pos="1" uid="7426" name="Arimabuff" numWin="383" />
<member pos="2" uid="9332" name="Zickzack" numWin="308" />
<member pos="3" uid="7673" name="karthik" numWin="180" />
...
</topWin>
<topGames>
<member pos="1" uid="7426" name="Arimabuff" numGames="512" />
<member pos="2" uid="7673" name="karthik" numGames="444" />
<member pos="3" uid="9332" name="Zickzack" numGames="352" />
...
</topGames>
</topLists>
where
Field Name |
Field Content |
topLists |
A container for all the TOP lists. |
totalNum |
The total number of players who has played the specified game. |
topScore |
A container for the TOP list of players sorted by their score.
This container is included in the response only if the parameter topScore was sent in the POST request containing non-zero value. |
topWin |
A container for the TOP list of players sorted by their score.
This container is included in the response only if the parameter topWin was sent in the POST request containing non-zero value. |
topGames |
A container for the TOP list of players sorted by their score.
This container is included in the response only if the parameter topGames was sent in the POST request containing non-zero value. |
member |
A container for an information about a player. |
pos |
The position in the TOP list |
uid |
Member ID of the player. |
name |
Player's nickname. |
score |
Player's score. |
numGames |
Number of games played by this member |
numWin |
Number of games won by this member |
|