CHPP Development/XML/matchDetails: Difference between revisions
cat |
RebelClown (talk | contribs) m Category |
||
| Line 237: | Line 237: | ||
Away team's ball possession in % for second half. | Away team's ball possession in % for second half. | ||
[[Category:CHPP XML Pages]] | [[Category:CHPP XML Pages|Match details]] | ||
Latest revision as of 17:44, 23 March 2007
This page offers XML and HTML interfaces to view the details and meta data (except the match events which are fetched from live.asp) for a particular match. The XML interface enables CHPP developers to integrate these data into their applications.
Current version
Current version of the XML output is 1.4 Latest available version of the XML output is 1.4
Syntax
matchDetails.asp?
outputType = {HTML | XML}
[outputVersion = float]
actionType = {view}
matchID = 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.
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 | Shows the basic information for a match |
matchID
Which match to show details for.
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.
Match (Within HattrickData)
Container for the data about the match.
MatchID (Within Match)
The globally unique matchID.
MatchType (Within Match)
Integer defining the type of match:
| MatchType | Description |
|---|---|
| 1 | League match. |
| 2 | Qualification match. |
| 3 | Cup match (standard league cup). |
| 4 | Friendly (normal rules). |
| 5 | Friendly (cup rules). |
| 6 | Not currently in use, but reserved for international competition matches with normal rules (may or may not be implemented at some future point). |
| 7 | Hattrick Masters |
| 8 | International friendly (normal rules). |
| 9 | International friendly (cup rules). |
| 10 | National teams competition match (normal rules). |
| 11 | National teams competition match (cup rules). |
| 12 | National teams friendly. |
MatchDate (Within Match)
The date and time when the match starts/started.
FinishedDate (Within Match)
The date and time when the match was finished. Not supplied until it is finished.
HomeTeam (Within Match)
The home (formal, not taking arena location into account) team of the match.
HomeTeamID (Within HomeTeam)
The globally unique teamID of the home team.
HomeTeamName (Within HomeTeam)
The team name of the home team in the match.
HomeGoals (Within HomeTeam)
The number of goals scored in the match by this team. Not shown until the match is over.
AwayTeam (Within Match)
The Away (formal, not taking arena location into account) team of the match.
AwayTeamID (Within AwayTeam)
The globally unique teamID of the Away team.
AwayTeamName (Within AwayTeam)
The team name of the Away team in the match.
AwayGoals (Within AwayTeam)
The number of goals scored in the match by this team. Not shown until the match is over.
Dress (Within HomeTeam or AwayTeam)
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.
RatingMidfield (Within HomeTeam or AwayTeam)
Integer value representing the midfield rating of the team, typically ranging 1 (indicating "very low disastrous") via 2 (for "low disastrous") to 80 (for "very high divine").
RatingRightDef (Within HomeTeam or AwayTeam)
Integer value representing the right defence rating of the team.
RatingMidDef (Within HomeTeam or AwayTeam)
Integer value representing the middle defence rating of the team.
RatingLeftDef (Within HomeTeam or AwayTeam)
Integer value representing the left defence rating of the team.
RatingRightAtt (Within HomeTeam or AwayTeam)
Integer value representing the right attack rating of the team.
RatingMidAtt (Within HomeTeam or AwayTeam)
Integer value representing the middle attack rating of the team.
RatingLeftAtt (Within HomeTeam or AwayTeam)
Integer value representing the left attack rating of the team.
TeamAttitude (Within HomeTeam or AwayTeam)
Integer value representing the the team attitude specified for the match. Only shown to the owner of the team - otherwise omitted.
| TeamAttitude | Description |
| -1 | Play it cool |
| 0 | Normal |
| 1 | Match of the season |
TacticType (Within HomeTeam or AwayTeam)
Integer value representing the the team tactic type specified for the match.
| TacticType | Description |
| 0 | Normal |
| 1 | Pressing |
| 2 | Counter-attacks |
| 3 | Attack in the middle |
| 4 | Attack in wings |
| 7 | Play creatively |
TacticSkill (Within HomeTeam or AwayTeam)
Integer value representing the tactic skill of the team, with 1 indicating disastrous, 2 indicating wretched and so forth.
Arena (Within Match)
Container for the data about the arena where the match was played.
ArenaID (Within Arena)
The globally unique ArenaID.
ArenaName (Within Arena)
The name of the arena.
WeatherID (Within Arena)
Integer defining the weather during the match:
| WeatherID | Description |
| 0 | Rain. |
| 1 | Overcast. |
| 2 | Partially Cloudy. |
| 3 | Sunny. |
SoldTotal (Within Arena)
The total number of sold tickets (number of spectators).
SoldTerraces (Within Arena)
The number of sold tickets for the teraces section. Only provided to the owner of the home team.
SoldBasic (Within Arena)
The number of sold tickets for the basic seating section. Only provided to the owner of the home team.
SoldRoof (Within Arena)
The number of sold tickets for the seating under roof section. Only provided to the owner of the home team.
SoldVIP (Within Arena)
The number of sold tickets for the VIP section. Only provided to the owner of the home team.
Scorers (Within Match)
Container for the data about the scorers. An attribute named Count tells how many scorers there are in the list.
Goal (Within Scorers)
Container for a certain goal. An atttribute named Index exists to give the relative number of the goal in the list.
ScorerPlayerID (Within Goal)
The globally unique PlayerID for the scorer.
ScorerPlayerName (Within Goal)
The name of the scorer.
ScorerTeamID (Within Goal)
The teamID of the team that scored,
ScorerHomeGoals (Within Goal)
The number of goals for the home team after the goal.
ScorerAwayGoals (Within Goal)
The number of goals for the away team after the goal.
ScorerMinute (Within Goal)
The minute that the goal was scored in.
Bookings (Within Match)
Container for the data about the warned or sent off players. An atttribute named Count exists to specify the number of cards given (warnings and sent off players in sum).
Booking (Within Bookings)
Container for a certain yellow/red card. An atttribute named Index exists to give the relative number of the booking in the list.
BookingPlayerID (Within Booking)
The globally unique PlayerID for the booked player.
BookingPlayerName (Within Booking)
The name of the booked player.
BookingTeamID (Within Booking)
The teamID of the team that suffered the booking.
BookingType (Within Booking)
Specifies whether it was a warning (BookingType=1) or red card (BookingType=2).
BookingMinute (Within Booking)
The minute that the booking happened.
PossessionFirstHalfHome (Within Match)
Home team's ball possession in % for first half.
PossessionFirstHalfAway (Within Match)
Away team's ball possession in % for first half.
PossessionSecondHalfHome (Within Match)
Home team's ball possession in % for second half.
PossessionSecondHalfAway (Within Match)
Away team's ball possession in % for second half.