CHPP Development/XML/training: Difference between revisions
RebelClown (talk | contribs) mNo edit summary |
RebelClown (talk | contribs) m Version 1.2 |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 6: | Line 6: | ||
{{CHPP Documentation}} | {{CHPP Documentation}} | ||
{{XML Current version | version=1.1}} | {{XML Current version | version=1.1}} Latest available version of the XML output is 1.2 | ||
==Syntax== | ==Syntax== | ||
| Line 38: | Line 38: | ||
== Outdata parameters == | == Outdata parameters == | ||
{{XML default outparams}} | {{XML default outparams verbose}} | ||
===Team (Within HattrickData)=== | ===Team (Within HattrickData)=== | ||
| Line 99: | Line 99: | ||
| Defensive Positions | | Defensive Positions | ||
|} | |} | ||
===StaminaTrainingPart (Within Team)=== | |||
The current part of training level, in percent, used on stamina training. | |||
===Trainer (Within Team)=== | ===Trainer (Within Team)=== | ||
| Line 162: | Line 165: | ||
===FractionOfTeams (Within TrainingStat)=== | ===FractionOfTeams (Within TrainingStat)=== | ||
Percentege of teams with this training type in this league. | Percentege of teams with this training type in this league. | ||
[[Category:CHPP XML Pages|Training]] | |||
Latest revision as of 15:45, 19 July 2007
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.
Current version
Current version of the XML output is 1.1 Latest available version of the XML output is 1.2
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.
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.
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 |
StaminaTrainingPart (Within Team)
The current part of training level, in percent, used on stamina training.
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.