CHPP Development/XML/nationalTeams.asp

From Hattrick

Jump to: navigation, search

Contents


CHPP Documentation - nationalTeams.asp

This page offers XML and HTML interfaces to see the national teams of Hattrick. 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 Latest available version of the XML output is 1.1

Syntax

nationalTeams.asp?
     outputType = {HTML | XML}
     [outputVersion = float]
     actionType = view
     [LeagueOfficeTypeID = 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 View the national teams of a specific type ("regular" or U-20). Also list the teams still in the ongoing World Cup.

LeagueOfficeTypeID

What national team type to list.

Value Default Description
2 Default National teams
4 U-20 teams

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.

LeagueOfficeTypeID (Within HattrickData)

The requested LeagueOfficeTypeID.

NationalTeams (Within HattrickData)

Container for the national teams. An attribute named Count specifies how many teams it contains. This is 0 if no teams exists.

NationalTeam (Within NationalTeams)

A national team. An attribute called Index signifies the number of the team in the list (not to be confused with NationalTeamID which is globally unique). Index ranges from 0 to (Count - 1).

NationalTeamID (Within NationalTeam)

The globally unique identifier of the national team.

NationalTeamName (Within NationalTeam)

The team name of the national team.

Dress (Within NationalTeam)

7 character string representing the dress of the team: First characters is a letter indicating type of dress. Next two numbers indicate the shirt colour, next two indicate pants colour and final two numbers indicate socks colour.

RatingScore (Within NationalTeam)

A integer that indicates the current rating score of the national team.

NationalTeams (Within HattrickData)

Container for the national teams. An attribute named Count specifies how many teams it contains. This is 0 if no teams exists.

Cup (Within HattrickData)

Container for the national teams still in the World Cup.

CupID (Within Cup)

The globally unique identifier of the World Cup.

CupTeams (Within Cup)

Container for the teams in the World Cup. An attribute named Available specifies if the list of teams is available. If Available = true, an attribute named Count exists and specifies how many teams it contains. This is 0 if no teams exists. If Available = false, the attribute Count is not available.

CupTeam (Within CupTeams)

A national team still in the World Cup. An attribute called Index signifies the number of the team in the list (not to be confused with NationalTeamID which is globally unique). Index ranges from 0 to (Count - 1).

CupNationalTeamID (Within CupTeam)

The globally unique identifier of the national team.

CupNationalTeamName (Within CupTeam)

The team name of the national team.

Personal tools