CHPP Development/XML/nationalPlayers.asp: Difference between revisions
categorized |
RebelClown (talk | contribs) m Category |
||
| Line 129: | Line 129: | ||
The number of matches that this player have played in this National Team. Integer. | The number of matches that this player have played in this National Team. Integer. | ||
[[Category:CHPP XML Pages]] | [[Category:CHPP XML Pages|National players]] | ||
Latest revision as of 17:46, 23 March 2007
CHPP Documentation - nationalPlayers.asp
This page offers XML and HTML interfaces to see the players of a national team. This only lists the players enlisted in the national team. For further details about a specific player, use playerDetails.asp. The XML interface enables CHPP developers to integrate these data into their applications.
Current version
Current version of the XML output is 1.1 Latest available version of the XML output is 1.1
Syntax
nationalPlayers.asp?
outputType = {HTML | XML}
[outputVersion = float]
actionType = {view | SupporterStats}
TeamID = integer
[MatchTypeCategory = {NT | WC} ]
[ShowAll = {true | false} ]
Indata parameters
outputType
Indicates whether the output to the client should be an HTML document or an XML file. Only the XML document may be used for CHPP use.
outputVersion
What version to show. During transition to a new version, both old and new versions may be available. Default may vary, according to information given in the CHPP conference.
actionType
Indicates what type of action the page should perform.
| Value | Default | Description |
|---|---|---|
| view | Default | View the national teams of a specific type ("regular" or U-20). Also list the teams still in the ongoing World Cup. |
| SupporterStats | View the number of matches that players have played in the national team. Only available for Supporters and may only be shown to Supporters. |
TeamID
What national team type to list.
MatchTypeCategory
What national team type to list. Only used in combination with actionType = "SupporterStats"
| Value | Default | Description |
|---|---|---|
| NT | Default | View all matches played in this National Team |
| WC | View all matches in the World Cup played in this National Team |
ShowAll
Signifies the number of players shown in statistics. Only used in combination with actionType = "SupporterStats"
| Value | Default | Description |
|---|---|---|
| true | View all players that have performed for this National Team | |
| false | Default | View a maximum of 20 players that have performed for this National Team, ordered by number of matches played. |
Outdata parameters
The XML output can contain the following tags/containers:
HattrickData
Generic tag wrapped around all XML data from Hattrick.
FileName (Within HattrickData)
The name of the file that your request was sent to.
Version (Within HattrickData)
The current version number of the XML output.
UserID (Within HattrickData)
The logged on User's UserID (not to be confused with TeamID). If not logged on, it defaults to 0.
UserIsSupporter (Within HattrickData)
Indicated if the fetching user has a supporter subscription or not. Return 1 if the user has a supporter subscription. 0 otherwise.
UserHasClubhouse (Within HattrickData)
Indicated if the fetching user has a ClubHouse or not. Return 1 if the user has a ClubHouse. 0 otherwise.
FetchedDate (Within HattrickData)
Date and time when the XML file was fetched. Format is YYYY-MM-DD HH:MM:SS.
ActionType (Within HattrickData)
The requested ActionType.
ActionResult (Within HattrickData)
Has 1 attribute: "Success" with value 1 if everything went ok, otherwise 0. Content in ActionResult is OK if the request was successful, otherwise a short error message should be returned.
TeamID (Within HattrickData)
The requested TeamID.
TeamName (Within HattrickData)
The name of the requested team.
Players (Within HattrickData)
Container for the players. An attribute named Count specifies how many players it contains. This is 0 if no players exist. This container only exists if actionType = "view".
Player (Within Players)
A player enlisted in this national team. An attribute called Index signifies the number of the players in the list (not to be confused with PlayerID which is globally unique). Index ranges from 0 to (Count - 1).
PlayerID (Within Player)
The globally unique identifier of the player.
PlayerName (Within Player)
The name of the player.
Stats (Within HattrickData)
Container for the supporter statstics. This container only exists if actionType = "SupporterStats".
MatchTypeCategory (Within Stats)
Shows what kind of matches the statistics is selected for. Values are "NT" and "WC".
ShowAll (Within Stats)
Echoes the in-parameter ShowAll. Values are "true" or "false".
MoreRecordsAvailable (Within Stats)
If ShowAll = "false" and there are more records available than in the output, the value is "true". Otherwise "false". To get the rest of the records, re-post with ShowAll = "true".
Players (Within Stats)
Container for the players. An attribute named Count specifies how many players it contains. This is 0 if no players exist. This container only exists if actionType = "view".
Player (Within Players)
A player enlisted in this national team. An attribute called Index signifies the number of the players in the list (not to be confused with PlayerID which is globally unique). Index ranges from 0 to (Count - 1).
PlayerID (Within Player)
The globally unique identifier of the player.
PlayerName (Within Player)
The name of the player.
NrOfMatches (Within Player)
The number of matches that this player have played in this National Team. Integer.