CHPP Development/XML/seriesCup: Difference between revisions

From Hattrick
Jump to navigationJump to search
SassineFC (talk | contribs)
categorized
RebelClown (talk | contribs)
m Category
 
Line 136: Line 136:
The first match date of the round.
The first match date of the round.


[[Category:CHPP XML Pages]]
[[Category:CHPP XML Pages|Series cup]]

Latest revision as of 17:48, 23 March 2007

CHPP Documentation - seriesCup.asp

This page offers XML and HTML interfaces to the main page for World Cup and national team matches. 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.0

Syntax

seriesCup.asp?
     outputType = {HTML | XML}
     actionType = {viewGroups | viewMatches}
     [cupID = integer]
     [season = integer]
     [matchRound = integer]
     [cupSeriesUnitID = 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
viewGroups Default View a list of the groups (with points, place etc) of a particular round, season and cup.
viewMatches View a list of the matches of a particular group.

season

The starting season of the cup. For instance, World Cup V which started with qualifications 2004-03-19, started global season 22, so the season of World Cup V is 22, even while it will continue onto global season 23.

matchRound

A key that indicates a certain round (which typically runs for either 10 weeks or 9 days). Qualification are always matchRound 1. You will retrieve a list of all available matchRounds for a certain cup in the output. Will default to the last initialized round of the chosen cup, if not supplied.

cupSeriesUnitID

The globally unique identifier of the CupSeriesUnit (a "group" of 4-6 teams). Required for actionType "viewMatches" else ignored.

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.

ActionType (Within HattrickData)

The initial actionType that was submitted for the page.

CupID (Within HattrickData)

RThe globally unique cupID.

Season (Within HattrickData)

The cup season. Always Equal to the current Season regardless of the Season IN parameter.

MatchRound (Within HattrickData)

The matchRound. Always Equal to the current matchRound regardless of the matchround IN parameter.

CupSeriesScores (Within HattrickData)

Container for the data about a group (CupSeriesUnit). Attribute Count exists.

Team (Within CupSeriesScores)

Container for a team in the group. Attribute Index exists.

TeamID (Within Team or HomeTeam or AwayTeam)

The globally unique teamID.

TeamName (Within Team or HomeTeam or AwayTeam)

The team name.

Place (Within CupSeriesScores)

The position of the team within the group (1 for the leader and so on).

CupSeriesUnitID (Within CupSeriesScores or HattrickData)

The globally unique cupSeriesUnitID of the Group that the team (if actionType = viewGroups) or match (if viewMatches) is part of.

CupSeriesUnitName (Within CupSeriesScores)

The name of the group.

MatchesPlayed (Within CupSeriesScores)

The number of matches that the team has played in the group.

GoalsFor (Within CupSeriesScores)

The number of goals that the team has scored.

GoalsAgainst (Within CupSeriesScores)

The number of goals that the team has allowed.

Points (Within CupSeriesScores)

The number of points for the team.

Matches (Within HattrickData)

Container for the data about the matches of a group. Attribute Count exists.

Match (Within Matches)

Container for a match. Attribute Index exists.

MatchID (Within Match)

The globally unique matchID.

HomeTeam (Within Match)

Container for the home team.

AwayTeam (Within Match)

Container for the home team.

MatchDate (Match)

The starting date of the match.

FinishedDate (Within Team)

The ending date of the match. Empty if the match is not finished.

HomeGoals (Within Team)

The number of goals for the home team. Empty if the match is not finished.

AwayGoals (Within Team)

The number of goals for the away team. Empty if the match is not finished.

Rounds (Within HattrickData)

Container for the listing of rounds. Attribute Count exists. Qualifications is a round. Round II (the set of 3 matches played between the 32 teams that advance from the qualification) is another round. Semifinals is a round. Final is a round, and so on.

Round (Within Rounds)

Container for a round. Attribute Index exists.

MatchRound (Within Round)

An integer used to identify the round among other rounds of the same cup.

StartDate (Within Round)

The first match date of the round.