CHPP Development/XML/players: Difference between revisions

From Hattrick
Jump to navigationJump to search
Neohugin (talk | contribs)
No edit summary
Neohugin (talk | contribs)
No edit summary
Line 1: Line 1:
This page offers XML and HTML interfaces to the list of '''players''' for a team. The XML interface enables CHPP developers to integrate these data into their applications.
This page offers XML and HTML interfaces to see the basic data for a team. The XML interface enables CHPP developers to integrate these data into their applications.
 
Note: It appears that the custom dress kit resets the chpp settings for Dress and DressAlternate.


{{CHPP Documentation}}
{{CHPP Documentation}}
Line 5: Line 7:


== Current version ==
== Current version ==
Current version of the XML output is 1.2.6
This documentation applies to version 1.7 of the XML output.




== Syntax ==
== Syntax ==
players.asp?
teamDetails.asp?
       outputType = {HTML | XML}
       outputType = {HTML | XML}
       actionType = {view | viewOldies | supporterStats}
       actionType = {view}
       [orderBy = {PlayerNumber | Lastname | PlayerID | Age | MarketValue}]
       [{teamID = integer |
      [teamID = integer]
       userID = integer}]
      [matchTypeCategory = {ALL | LQC | F | NT | WC}]
       [showAll = {false | true}]




Line 35: Line 35:
| view
| view
| Default
| Default
| View the list of players belonging to a team.
| View the basic team data.
|- bgcolor="#dddddd" valign="top"
| viewOldies
|
| View the list of players who no longer belong to the club but were promoted from the youth squad of this team, or who were part of the start-up squad of the team.
|- bgcolor="#dddddd" valign="top"
| supporterStats
|
| Show players who have played matches for the team, ordered by the number of matches they have played for the team. Requires that the logged on user is a Hattrick Supporter.
|- bgcolor="#dddddd" valign="top"
| orderBy
|
| The field that the outdata PlayerList should be sorted by. Not relevant for actionType = supporterStats.
|}
|}




=== teamID ===
=== teamID ===
The team for which the data should apply to. Defaults to the logged on user's own TeamID if not supplied.
What team/user to show the data for. teamID and userID generates the same result, except that ownerless teams can only be accessed if submitting a teamID and that users without a team can only be accessed if userID is submitted.




=== matchTypeCategory ===
=== userID ===
Only relevant for actionType = supporterStats. Indicates one of the following types of matches:
What team/user to show the data for. teamID and userID generates the same result, except that ownerless teams can only be accessed if submitting a teamID and that users without a team can only be accessed if userID is submitted. If neither userID or teamID is supplied, userID defaults to the logged on user's userID.
 
{|  border="0" cellpadding="2" cellspacing="2"
|- bgcolor="#cccccc" align="left"
! Value
! Default
! Description
|- bgcolor="#dddddd" valign="top"
| ALL
| Default
| All matches.
|- bgcolor="#dddddd" valign="top"
| LQC
|
| League, qualification and cup matches.
|- bgcolor="#dddddd" valign="top"
|F
|
|Friendlies only.
|}
 


=== showAll ===
Boolean value only relevant for actionType supporterStats. Defaults to false, which means that only the 20 players with most matches are shown. If true, all players are returned.




Line 103: Line 69:
=== FetchedDate (Within HattrickData) ===
=== FetchedDate (Within HattrickData) ===
Date and time when the XML file was fetched. Format is YYYY-MM-DD HH:MM:SS.
Date and time when the XML file was fetched. Format is YYYY-MM-DD HH:MM:SS.
=== User (Within HattrickData) ===
Container for the data about the user ("owner").
=== UserID (Within User) ===
The globally unique UserID for the owner of the team. Teams without an owner have UserID = 0.
=== Language (Within User) ===
Container for the data about the language the user has chosen as his/her default language.
=== LanguageID (Within Language) ===
The globally unique LanguageID.
=== LanguageName (Within Language) ===
The Language name.
=== HasSupporter (Within User) ===
Boolean value indicating whether the user is currently a Hattrick Supporter. Not supplied if the team is ownerless.
=== Loginname (Within User) ===
The "username" or "nickname" used in conferences and for login. Not supplied if the team is ownerless.
=== Name (Within User) ===
The user's personal name or the value HIDDEN to indicate that the user has chosen to hide it. Not supplied if the team is ownerless.
=== ICQ (Within User) ===
The user's ICQ number (if any). Not supplied if the team is ownerless.
=== SignupDate (Within User) ===
The date and time when the user signed up for Hattrick. Not supplied if the team is ownerless.
=== ActivationDate (Within User) ===
The date and time when the user gained control of this team. Not supplied if the team is ownerless.
=== LastLoginDate (Within User) ===
The date and time when the user last logged on. Not supplied if the team is ownerless.
=== NationalTeamCoach (Within User) ===
Container for the national teams. An attribute named Count specifies how many national teams this user coaches. If 0, the child node does not exist.
=== NationalTeam (Within NationalTeamCoach) ===
Container for a National Team. An attribute called Index signifies the number of the national team in the list (not to be confused with NationalTeamID which is globally unique). Index ranges from 0 to (Count - 1).
=== NationalTeamID (Within NationalTeam) ===
The globally unique identifier of the national team.
=== NationalTeamName (Within NationalTeam) ===
The name of the national team




=== Team (Within HattrickData) ===
=== Team (Within HattrickData) ===
Container for the team to which the data applies.
Container for the data about the team (not supplied for user without team).




Line 117: Line 147:




=== PlayerList (Within Team) ===
=== ShortTeamName (Within Team) ===
Container for the list of players. An Attribute named Count specifies how many players it contains.
The short team name.




=== Player (Within PlayerList) ===
=== Arena (Within Team) ===
Container for a player. An Attribute named Index works as a counter.
Container for the data about the team's home ground.




=== PlayerID (Within Player) ===
=== ArenaID (Within Arena) ===
The globally unique PlayerID.
The globally unique ArenaID.




=== PlayerName (Within Player) ===
=== ArenaName (Within Arena) ===
The Player name.
The arena name.




=== PlayerNumber (Within Player) ===
=== League (Within Team) ===
The number (1 to 99) that the owner (if he/she is Ht Supporter) of the team has assigned this player.
Container for the data about the league ("Sverige", "England" and so on) the team is part of.




=== Age (Within Player) ===
=== LeagueID (Within League) ===
The age of the player.
The globally unique LeagueID.




=== TSI (Within Player) ===
=== LeagueName (Within League) ===
The Total Skill Index (TSI) of the player.
The League name.




=== PlayerForm (Within Player) ===
=== Region (Within Team) ===
The current form, given as an integer with 1 indicating disastrous, 2 for wretched and so on.
Container for the data about the region theteam is located in.




=== Statement (Within Player) ===
=== RegionID (Within Region) ===
If the owner is a HT Supporter, he may have provided a Statement from his players.
The globally unique RegionID.




=== Experience (Within Player) ===
=== RegionName (Within Region) ===
The experience of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on.
The Region name.




=== Leadership (Within Player) ===
=== Trainer (Within Team) ===
The leadership of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on.
The player that is trainer ("coach") for the team. (Not to be confused with the "owner"/"user").




=== Salary (Within Player) ===
=== PlayerID (Within Trainer) ===
The salary of the player, given in the default currence (Currency rate 1. There are 10 default currency units per US$).
The globally unique PlayerID of the player that has the job as trainer of the team.




=== IsAbroad (Within Player) ===
=== PlayerName (Within Trainer) ===
The abroad status of the player, given as an integer. 0 for beeing in home country, 1 for beeing in a team abroad.
The name of the trainer.




=== Agreeability (Within Player) ===
=== HomePage (Within Team) ===
The agreeability of the player, given as an integer with 1 indicating the lowest level (se Denominations appendix of rules).
The home page URL that the team has specified.




=== Aggressiveness (Within Player) ===
=== Clubhouse (Within Team) ===
The aggressiveness of the player, given as an integer with 1 indicating the lowest level (se Denominations appendix of rules).
Exists only if the team has a Clubhouse and if so holds the name of that clubhouse. The URL of the clubhouse will then be http://club.hattrick.org/ClubhouseName/ where ClubhouseName is a placeholder for the value in tag Clubhouse.




=== Honesty (Within Player) ===
=== Cup (Within Team) ===
The honesty of the player, given as an integer with 1 indicating the lowest level (se Denominations appendix of rules).
Data about the team's cup status. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.




=== LeagueGoals (Within Player) ===
=== StillInCup (Within Cup) ===
The number of goals in the league this season. If the team the player belongs to is currently playing a match, a string with value NOT AVAILABLE is returned instead of the actual number of goals. Please note that some of these data can sometimes be somewhat corrupt.
Boolean value stating if the team is still in the cup.




=== CupGoals (Within Player) ===
=== CupID (Within Cup) ===
The number of goals in the cup this season. If the team the player belongs to is currently playing a match, a string with value NOT AVAILABLE is returned instead of the actual number of goals. Please note that some of these data can sometimes be somewhat corrupt.
The globally unique CupID of the cup that the team is still in. Only provided if team is still in cup.




=== FriendliesGoals (Within Player) ===
=== CupName (Within Cup) ===
The number of goals in friendlies this season. If the team the player belongs to is currently playing a match, a string with value NOT AVAILABLE is returned instead of the actual number of goals. Please note that some of these data can sometimes be somewhat corrupt.
The name of the cup that the team is still in. Only provided if team is still in cup.




=== CareerGoals (Within Player) ===
=== FriendlyBooked (Within Team) ===
The total number goals throughout this player's carreer. If the team the player belongs to is currently playing a match, a string with value NOT AVAILABLE is returned instead of the actual number of goals. Please note that some of these data have become somewhat corrupt over the years, something that cannot be fixed.
This element is obsolete and will probably be removed within 1-2 months.
The team's status about if friendly is booked. The value is true if team has booked a friendly, false if not. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.




=== CareerHattricks (Within Player) ===
=== FriendlyTeamID (Within Team) ===
The total number hattricks throughout this player's carreer. If the team the player belongs to is currently playing a match, a string with value NOT AVAILABLE is returned instead of the actual number of hattricks. Please note that some of these data have become somewhat corrupt over the years, something that cannot be fixed.
The team's status about if a friendly is booked. The value is the opponents globally unique teamID if the team has booked a friendly, 0 if not. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.




=== Specialty (Within Player) ===
=== LeagueLevelUnit (Within Team) ===
Integer indicating the specialty (if any) of the player:
Data about the team's LeagueLevelUnit ("series"). If the team is playing a qualification match, an attribute named Available is set to false and the container is empty, otherwise to true.


{|  border="0" cellpadding="2" cellspacing="2"
|- bgcolor="#cccccc" align="left"
! Value
! Description
|- bgcolor="#dddddd" valign="top"
| 0
| No specialty.
|- bgcolor="#dddddd" valign="top"
| 1
| Technical.
|- bgcolor="#dddddd" valign="top"
| 2
| Quick.
|- bgcolor="#dddddd" valign="top"
| 3
| Powerful.
|- bgcolor="#dddddd" valign="top"
| 4
| Unpredictable.
|- bgcolor="#dddddd" valign="top"
| 5
| Head specialist.
|}


=== LeagueLevelUnitID (Within LeagueLevelUnit) ===
The globally unique LeagueLevelUnitID.


=== TransferListed (Within Player) ===
Returns 1 if the player is on the transfer list, otherwise 0.


=== LeagueLevelUnitName (Within LeagueLevelUnit) ===
The name of the LeagueLevelUnit.


=== NationalTeamID (Within Player) ===
If the player is enrolled on a national team, this is that national team's ID. Otherwise will return 0.


=== LeagueLevel (Within LeagueLevelUnit) ===
Integer value stating the relative level of the LeagueLevelUnit, with 1 indicating the league's top series.


=== Cards (Within Player) ===
The number of currently accumulated cards. If the player is suspended, this will return 3 (whether the player has actually accumulated 3 bookings, or if he has become suspended by being sent off after 2 bookings in the same game). If the team the player belongs to is currently playing a match, a string with value NOT AVAILABLE is returned instead of the actual number of cards.


=== NumberOfVictories (Within Team) ===
If the team is in a winning streak of at least 2 matches, this integer indicates how many victories in a row it currently has. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


=== InjuryLevel (Within Player) ===
The number of weeks the player is predicted to be injured. If the player is bruised, a value of 0 is returned. If the player is healthy, a value of -1 is returned. If the team the player belongs to is currently playing a match, a string with value NOT AVAILABLE is returned instead of the actual InjuryLevel.


=== NumberOfUndefeated (Within Team) ===
If the team is in a streak of at least 2 matches as undefeated, this integer indicates how many matches in a row it is undefeated. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


=== StaminaSkill (Within Player) ===
The stamina skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== LogoURL (Within Trainer) ===
The logo URL that the team has specified. Only supplied if the user has Hattrick Supporter


=== KeeperSkill (Within Player) ===
The keeper skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== Fanclub (Within Team) ===
Container for the data about the team's fanclub. Only supplied if the user has Hattrick Supporter.


=== PlaymakerSkill (Within Player) ===
The playmaker skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== FanclubID (Within Fanclub) ===
The globally unique FanclubID. Only supplied if the user has Hattrick Supporter.


=== ScorerSkill (Within Player) ===
The scorer skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== FanclubName (Within Fanclub) ===
The name of the fanclub. Only supplied if the user has Hattrick Supporter.


=== PassingSkill (Within Player) ===
The passing skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== Guestbook (Within Team) ===
Container for the data about the user's guestbook. Only supplied if the user has Hattrick Supporter.


=== WingerSkill (Within Player) ===
The winger skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== NumberOfGuestbookItems (Within Guestbook) ===
The number of postings in the user's guestbook. Only supplied if the user has Hattrick Supporter.


=== DefenderSkill (Within Player) ===
The defender skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== PressAnnouncement (Within Team) ===
Container for the data about the user's most recent PressAnnouncement. Only supplied if the user has Hattrick Supporter.


=== SetPiecesSkill (Within Player) ===
The set pieces skill of the player, given as an integer with 1 indicating disastrous, 2 for wretched and so on. Only provided if the player belongs to the logged on user.


=== Subject (Within PressAnnouncement) ===
The subject text specified for the PressAnnouncement. Only supplied if the user has Hattrick Supporter.


=== OwningTeam (Within Player) ===
Container for the team that owns the player. Only provided for actionType viewOldies.


=== Body (Within PressAnnouncement) ===
The body of the PressAnnouncement. Only supplied if the user has Hattrick Supporter.


=== TeamID (Within OwningTeam) ===
The globally unique TeamID of the team owning the player.


=== SendDate (Within PressAnnouncement) ===
The time and date when the PressAnnouncement was submitted. Only supplied if the user has Hattrick Supporter.


=== TeamName (Within OwningTeam) ===
The full team name of the team owning the player.


=== Dress (Within Team) ===
7 character string representing the dress of the team: First characters is a letter indicating type pf dress. Next two numbers indicate the shirt colour, next two indicate pants colour and final two numbers indicate socks colour.


=== LeagueName (Within OwningTeam) ===
The name of the league that team owning the player is located in.


=== DressAlternate (Within Team) ===
Same as dress, except that it shows the alternate dress.


=== TrainerData (Within Player) ===
Container for the skills that relate to coach/trainer ability. Only provided if the player has been made into a trainer, "has gained trainer license". It is provided irrespective of if he is actually serving as the appointed coach of the club or not.


=== BotStatus (Within Team) ===
Container for the data indicating if a team is a "bot", that is, has a default and random lineup and players.


=== TrainerType (Within TrainerData) ===
Integer indicating the type of trainer:


{|  border="0" cellpadding="2" cellspacing="2"
=== IsBot (Within BotStatus) ===
|- bgcolor="#cccccc" align="left"
Boolean. Specifies whether a team is currently a bot or not.
! Value
! Description
|- bgcolor="#dddddd" valign="top"
| 0
| Defensive
|- bgcolor="#dddddd" valign="top"
| 1
| Offensive
|- bgcolor="#dddddd" valign="top"
| 2
| Balanced
|}
 
 
=== TrainerSkill (Within TrainerData) ===
The trainer skill, given as an integer with 1 indicating disastrous, 2 for wretched and so on.




=== CountryID (Within Player) ===
=== BotSince (Within BotStatus) ===
The CountryID that the player is native of. This is the value that is used to identify what national team the player can be enrolled to. Please note that CountryID is often not the same as LeagueID. You can use (for instance) worldDetails.asp to map a certain CountryID to a LeagueID.
The date when the team was made a bot, or 1997-08-30 if the team was made a bot before 2005-12-08. If the team is not a bot, this will return 1900-01-01.




=== Caps (Within Player) ===
=== TeamRank (Within Team) ===
The number of matches played for the national team.
If the team has an owner, this is the League Rank, a number based on LeagueLevel, postion etc, only counting teams with an owner. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.




=== CapsU20 (Within Player) ===
Note: Date format is always YYYY-MM-DD HH:MM:SS.
The number of matches played for the U-20 national team.




Line 336: Line 327:
Requests may be posted as either GET or POST.
Requests may be posted as either GET or POST.


=== Get a list of all players for your own team ===
=== Get the data for a specified team ===
players.asp?outputType=XML&actionType=view
teamDetails.asp?outputType=XML&actionType=view&teamID=373
 
 
=== Get a list of players that were brought up in a team (but is no longer in the team) ===
players.asp?outputType=XML&actionType=viewOldies&teamID=373




=== Get a list of all players that have played a competition match (League, Qual. cup) for your team ===
=== Get the data for your own team ===
players.asp?outputType=XML&actionType=supporterStats&matchTypeCategory=LQC&showAll=true
teamDetails.asp?outputType=XML&actionType=view

Revision as of 03:22, 16 October 2006

This page offers XML and HTML interfaces to see the basic data for a team. The XML interface enables CHPP developers to integrate these data into their applications.

Note: It appears that the custom dress kit resets the chpp settings for Dress and DressAlternate.

Important!
Please note that it is strictly forbidden to develop applications that works with this or other XML/hrf files unless you are a CHPP developer. It is also illegal to use other applications than standard browsers or CHPP approved programs to access the data on the site. Violation of these rules might render you to lose your team.
Only the XML version of this file may be included in CHPP applications.


Current version

This documentation applies to version 1.7 of the XML output.


Syntax

teamDetails.asp?

     outputType = {HTML | XML}
     actionType = {view}
     [{teamID = integer |
     userID = integer}]


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.


actionType

Indicates what type of action the page should perform.

Value Default Description
view Default View the basic team data.


teamID

What team/user to show the data for. teamID and userID generates the same result, except that ownerless teams can only be accessed if submitting a teamID and that users without a team can only be accessed if userID is submitted.


userID

What team/user to show the data for. teamID and userID generates the same result, except that ownerless teams can only be accessed if submitting a teamID and that users without a team can only be accessed if userID is submitted. If neither userID or teamID is supplied, userID defaults to the logged on user's userID.


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.


UserID (Within HattrickData)

The logged on User's UserID (not to be confused with TeamID). If not logged on, it defaults to 0.


Version

The current version number of the XML output.


FetchedDate (Within HattrickData)

Date and time when the XML file was fetched. Format is YYYY-MM-DD HH:MM:SS.


User (Within HattrickData)

Container for the data about the user ("owner").


UserID (Within User)

The globally unique UserID for the owner of the team. Teams without an owner have UserID = 0.


Language (Within User)

Container for the data about the language the user has chosen as his/her default language.


LanguageID (Within Language)

The globally unique LanguageID.


LanguageName (Within Language)

The Language name.


HasSupporter (Within User)

Boolean value indicating whether the user is currently a Hattrick Supporter. Not supplied if the team is ownerless.


Loginname (Within User)

The "username" or "nickname" used in conferences and for login. Not supplied if the team is ownerless.


Name (Within User)

The user's personal name or the value HIDDEN to indicate that the user has chosen to hide it. Not supplied if the team is ownerless.


ICQ (Within User)

The user's ICQ number (if any). Not supplied if the team is ownerless.


SignupDate (Within User)

The date and time when the user signed up for Hattrick. Not supplied if the team is ownerless.


ActivationDate (Within User)

The date and time when the user gained control of this team. Not supplied if the team is ownerless.


LastLoginDate (Within User)

The date and time when the user last logged on. Not supplied if the team is ownerless.


NationalTeamCoach (Within User)

Container for the national teams. An attribute named Count specifies how many national teams this user coaches. If 0, the child node does not exist.


NationalTeam (Within NationalTeamCoach)

Container for a National Team. An attribute called Index signifies the number of the national team in the list (not to be confused with NationalTeamID which is globally unique). Index ranges from 0 to (Count - 1).


NationalTeamID (Within NationalTeam)

The globally unique identifier of the national team.


NationalTeamName (Within NationalTeam)

The name of the national team


Team (Within HattrickData)

Container for the data about the team (not supplied for user without team).


TeamID (Within Team)

The globally unique TeamID.


TeamName (Within Team)

The full team name.


ShortTeamName (Within Team)

The short team name.


Arena (Within Team)

Container for the data about the team's home ground.


ArenaID (Within Arena)

The globally unique ArenaID.


ArenaName (Within Arena)

The arena name.


League (Within Team)

Container for the data about the league ("Sverige", "England" and so on) the team is part of.


LeagueID (Within League)

The globally unique LeagueID.


LeagueName (Within League)

The League name.


Region (Within Team)

Container for the data about the region theteam is located in.


RegionID (Within Region)

The globally unique RegionID.


RegionName (Within Region)

The Region name.


Trainer (Within Team)

The player that is trainer ("coach") for the team. (Not to be confused with the "owner"/"user").


PlayerID (Within Trainer)

The globally unique PlayerID of the player that has the job as trainer of the team.


PlayerName (Within Trainer)

The name of the trainer.


HomePage (Within Team)

The home page URL that the team has specified.


Clubhouse (Within Team)

Exists only if the team has a Clubhouse and if so holds the name of that clubhouse. The URL of the clubhouse will then be http://club.hattrick.org/ClubhouseName/ where ClubhouseName is a placeholder for the value in tag Clubhouse.


Cup (Within Team)

Data about the team's cup status. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


StillInCup (Within Cup)

Boolean value stating if the team is still in the cup.


CupID (Within Cup)

The globally unique CupID of the cup that the team is still in. Only provided if team is still in cup.


CupName (Within Cup)

The name of the cup that the team is still in. Only provided if team is still in cup.


FriendlyBooked (Within Team)

This element is obsolete and will probably be removed within 1-2 months. The team's status about if friendly is booked. The value is true if team has booked a friendly, false if not. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


FriendlyTeamID (Within Team)

The team's status about if a friendly is booked. The value is the opponents globally unique teamID if the team has booked a friendly, 0 if not. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


LeagueLevelUnit (Within Team)

Data about the team's LeagueLevelUnit ("series"). If the team is playing a qualification match, an attribute named Available is set to false and the container is empty, otherwise to true.


LeagueLevelUnitID (Within LeagueLevelUnit)

The globally unique LeagueLevelUnitID.


LeagueLevelUnitName (Within LeagueLevelUnit)

The name of the LeagueLevelUnit.


LeagueLevel (Within LeagueLevelUnit)

Integer value stating the relative level of the LeagueLevelUnit, with 1 indicating the league's top series.


NumberOfVictories (Within Team)

If the team is in a winning streak of at least 2 matches, this integer indicates how many victories in a row it currently has. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


NumberOfUndefeated (Within Team)

If the team is in a streak of at least 2 matches as undefeated, this integer indicates how many matches in a row it is undefeated. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


LogoURL (Within Trainer)

The logo URL that the team has specified. Only supplied if the user has Hattrick Supporter


Fanclub (Within Team)

Container for the data about the team's fanclub. Only supplied if the user has Hattrick Supporter.


FanclubID (Within Fanclub)

The globally unique FanclubID. Only supplied if the user has Hattrick Supporter.


FanclubName (Within Fanclub)

The name of the fanclub. Only supplied if the user has Hattrick Supporter.


Guestbook (Within Team)

Container for the data about the user's guestbook. Only supplied if the user has Hattrick Supporter.


NumberOfGuestbookItems (Within Guestbook)

The number of postings in the user's guestbook. Only supplied if the user has Hattrick Supporter.


PressAnnouncement (Within Team)

Container for the data about the user's most recent PressAnnouncement. Only supplied if the user has Hattrick Supporter.


Subject (Within PressAnnouncement)

The subject text specified for the PressAnnouncement. Only supplied if the user has Hattrick Supporter.


Body (Within PressAnnouncement)

The body of the PressAnnouncement. Only supplied if the user has Hattrick Supporter.


SendDate (Within PressAnnouncement)

The time and date when the PressAnnouncement was submitted. Only supplied if the user has Hattrick Supporter.


Dress (Within Team)

7 character string representing the dress of the team: First characters is a letter indicating type pf dress. Next two numbers indicate the shirt colour, next two indicate pants colour and final two numbers indicate socks colour.


DressAlternate (Within Team)

Same as dress, except that it shows the alternate dress.


BotStatus (Within Team)

Container for the data indicating if a team is a "bot", that is, has a default and random lineup and players.


IsBot (Within BotStatus)

Boolean. Specifies whether a team is currently a bot or not.


BotSince (Within BotStatus)

The date when the team was made a bot, or 1997-08-30 if the team was made a bot before 2005-12-08. If the team is not a bot, this will return 1900-01-01.


TeamRank (Within Team)

If the team has an owner, this is the League Rank, a number based on LeagueLevel, postion etc, only counting teams with an owner. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.


Note: Date format is always YYYY-MM-DD HH:MM:SS.


Examples

Requests may be posted as either GET or POST.

Get the data for a specified team

teamDetails.asp?outputType=XML&actionType=view&teamID=373


Get the data for your own team

teamDetails.asp?outputType=XML&actionType=view