CHPP Development/XML/matchOrders

From Hattrick

Jump to: navigation, search

Contents


CHPP Documentation - matchOrders.asp

This page offers XML and HTML interfaces to the match order data and form. The XML interface enables CHPP developers to integrate these data into their applications.

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

Current version of the XML output is 1.2.1

Syntax

matchOrders.asp?
     outputType = {HTML | XML}
     [outputVersion = version]
     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

Indicates what version of the XML to put out. Not used at the moment.

matchID

Which match to show match order data 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.

UserID (Within HattrickData)

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

Version (Within HattrickData)

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.

MatchID (Within HattrickData)

The globally unique matchID.

MatchData (Within HattrickData)

Container for the data about the match. If the match isn't one of your's or isn't available for laying orders an attribute named Available is set to false and the container is empty, otherwise it is set to true.

HomeTeam (Within MatchData)

The home (formal, not taking arena location into account) team of the match. An attribute named ID indicates the TeamID of the home team.

HomeTeamID (Within HomeTeam)

The globally unique teamID of the home team.

HomeTeamName (Within HomeTeam)

The team name of the home team in the match.

AwayTeam (Within MatchData)

The away (formal, not taking arena location into account) team of the match. An attribute named ID indicates the TeamID of the away team.

AwayTeamID (Within AwayTeam)

The globally unique teamID of the away team.

AwayTeamName (Within AwayTeam)

The team name of the away team in the match.

Arena (Within HattrickData)

The arena that the match will be played on. An attribute named ID indicates the ArenaID of the arena.

ArenaID (Within Arena)

The globally unique arenaID .

ArenaName (Within Arena)

The name of the arena.

MatchDate (Within MatchData)

The kick-off date of the match.

MatchType (Within MatchData)

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.

Attitude (Within MatchData)

Integer value representing the the team attitude specified for the match. If the match is a training match an attribute named Available is set to false and the element is empty, otherwise the attribute is set to true.

Attitude Description
-1 Play it cool.
0 Normal.
1 Match of the season.

TacticType (Within MatchData)

An integer indicating what tactic is set for the users team.

TacticType Description
0 Normal.
1 Pressing.
2 Counter-attacks.
3 Attack in the middle.
4 Attack in wings.
7 Play Creatively

Lineup (Within MatchData)

Container for the lineup of the requested team.

Player (Within Lineup)

Container for a particular player that is part of the lineup. An attribute named ID indicates the playerID of the player. An attribute named Index gives a counter.

PlayerID (Within Player)

The globally unique playerID.

PlayerName (Within Player)

The full name of the player.

RoleID (Within Player)

An integer indicating which formal "slot" (Role) the player will fill in the match, before the repositionings take effect. So, there can only be one (or zero) player with a particular RoleID. Roles are coded like this:

RoleID Description
1 Keeper.
2 Right back.
3 Central Defender 1.
4 Central Defender 2.
5 Left Back.
6 Right winger.
7 Inner Midfield 1.
8 Inner Midfield 2.
9 Left winger.
10 Forward 1.
11 Forward 2.
12 Substitution (Keeper).
13 Substitution (Defender).
14 Substitution (Inner Midfield).
15 Substitution (Winger).
16 Substitution (Forward).
17 Set Pieces.
18 Captain.
19 Replaced player 1.
20 Replaced player 2.
21 Replaced player 3.

Behaviour (Within Player)

An integer indicating the individual order or repositioning that the player will play with:

Behaviour Description
0 Normal.
1 Offensive.
2 Defensive.
3 Towards Middle.
4 Towards Wing.
5 Extra forward.
6 Extra inner midfield.
7 Extra defender.
Personal tools