CHPP Development/XML/training

From Hattrick
Revision as of 13:52, 12 March 2007 by RebelClown (talk | contribs)
Jump to navigationJump to search

CHPP Documentation - training.asp

This page offers XML and HTML interfaces to the logged on user's training page and to the supporter statistics about training (only available for supporters of course). 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.1

Syntax

training.asp?
     outputType = {HTML | XML}
     actionType = {view | stats}
     [StatsLeagueID = 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 data about the team's training, formation experience, team spirit and confidence.
stats Shows the distribution among training types for all leagues or for a specific league. Requires that the logged on user is a Hattrick Supporter.

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.

Team (Within HattrickData)

Container for the data about the team. Only provided for actionType = view.

TeamID (Within Team)

The globally unique TeamID.

TeamName (Within Team)

The name of the team.

TrainingLevel (Within Team)

The current training level for the team in percent.

NewTrainingLevel (Within Team)

The goal training level for the team in percent. If the team is not about to change training level, an attribute named Available is set to false and the container is empty, otherwise to true.

TrainingType (Within Team)

Integer defining the type of training:

TrainingType Description
0 General
1 Stamina
2 Set Pieces
3 Defending
4 Scoring
5 Cross Pass (Winger)
6 Shooting
7 Short Passes
8 Playmaking
9 Goaltending
10 Through Passes
11 Defensive Positions

Trainer (Within Team)

Container for the data about the trainer of the team.

TrainerID (Within Trainer)

The globally unique PlayerID for the trainer.

TrainerName (Within Trainer)

The name of the trainer.

ArrivalDate (Within Trainer)

The date the trainer became trainer of the team.

Morale (Within Team)

The morale/team spirit of the team given as an integer with 4 indicating composed, 5 calm and accordingly. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.

SelfConfidence (Within Team)

The self confidence of the team given as an integer with 4 indicating decent, 5 strong and accordingly. If the team is playing a match, an attribute named Available is set to false and the container is empty, otherwise to true.

Experience433 (Within Team)

The team's experience of playing 4-3-3, given as an integer with 1 indicating disastrous, 2 for wretched and so on.

Experience451 (Within Team)

The team's experience of playing 4-5-1, given as an integer with 1 indicating disastrous, 2 for wretched and so on.

Experience352 (Within Team)

The team's experience of playing 3-5-2, given as an integer with 1 indicating disastrous, 2 for wretched and so on.

Experience532 (Within Team)

The team's experience of playing 5-3-2, given as an integer with 1 indicating disastrous, 2 for wretched and so on.

Experience343 (Within Team)

The team's experience of playing 3-4-3, given as an integer with 1 indicating disastrous, 2 for wretched and so on.

Experience541 (Within Team)

The team's experience of playing 5-4-1, given as an integer with 1 indicating disastrous, 2 for wretched and so on.

League (Within HattrickData)

Container for the training supporter stats. Only provided for actionType = stats.

LeagueID (Within League)

The globally unique LeagueID. LeaguID=0 for global stats.

LeagueName (Within League)

The name of the league. Not provided for global stats.

CreatedDate (Within League)

The date when the statistics were created/updated.

TrainingStatList (Within League)

Container for training stats for the league. An attribute named Count tells how many training stats there are in the list.

TrainingStat (Within TrainingStatList)

Container for a particular training stat. An attribute named Index gives a counter.

TrainingType (Within TrainingStat)

Integer defining the type of training, see TrainingType

NumberOfTeams (Within TrainingStat)

Number of teams with this training type in this league.

FractionOfTeams (Within TrainingStat)

Percentege of teams with this training type in this league.