Stat.getWinners
From FreePokerAlliance wiki
Contents |
Description
Returns winners of given type.
Parameters
| Required | Name | Type | Default value | Description |
|---|---|---|---|---|
| required | Command | string | getWinners | API method name |
| required | Evaluation_ID | int | Numeric evaluation ID (provided by our support team, but can be retrieved using the GetEvaluations command). Our system can evaluate winners on a yearly, monthly, weekly or daily basis in various types, including fixed-level or top-ranking. | |
| optional | tz | string | +01:00 | Your local time zone related to GMT (like +01:00 which means GMT +1, or -05:00 like GMT -5). |
Example Requests
Replace XXXXXXXXXX with actual data.
| Winners list in UTC: http://api.freepokeralliance.com/statservices.php?command=getwinners&evaluation_id=XXXXXXXXX&tz=+00:00 |
Response
In the response XML, each <item> node has an attribute described here.
| Attribute name | Type | Description |
|---|---|---|
| id | int | Unique id for syncing purposes. |
| date | string | The exact date the evaluation happened. |
| level | int | *The fixed level of points which the player has achieved. |
| prize | string | *The prize the player won at the actual level. |
| loginname | string | The login name of the player. |
| username | string | The MGame username of the player. |
| balance | money | Player's actual balance. |
| playedrounds | int | Number of rounds played. |
| wonrounds | int | Number of rounds won. |
| delta_balance | int | **Delta of player's actual and previous balance. |
| delta_playedrounds | int | ***Delta of player's actual and previous number of rounds played. |
| delta_wonrounds | int | ****Delta of player's actual and previous number of rounds won. |
Response example
<?xml version="1.0" encoding="UTF-8"?> <root> <winners> <item date="2009-03-09" level="200000.0000" gift="branded t-shirt" loginname="mogyi86" username="mogyi86" balance="3070000.3000" playedrounds="12274" wonrounds="5178" delta_balance="2400.0000" delta_playedrounds="59" delta_wonrounds="54"/> <item date="2009-03-09" level="200000.0000" gift="branded t-shirt" loginname="payya33" username="payya33" balance="1401508.2000" playedrounds="4483" wonrounds="1151" delta_balance="1245.0000" delta_playedrounds="442" delta_wonrounds="34"/> <item date="2009-03-09" level="200000.0000" gift="branded t-shirt" loginname="spay" username="spay" balance="1388400.0" playedrounds="1850" wonrounds="715" delta_balance="-46.0000" delta_playedrounds="21" delta_wonrounds="31" /> </winners > </root>
Error Codes
| Code | Description |
|---|---|
| <errormessage> | Node contains error message. Only set when an error occurs. |
Notes
Evaluation is done per affiliate thus results contain your players only. A player can win a prize only once per evaluation (see evaluation_id in Parameters section above).
* Only if evaluation type is 'fixed'
** Only if evaluation type is 'delta balance'
*** Only if evaluation type is 'delta playedrounds'
**** Only if evaluation type is 'delta wonrounds'
