CHPP Development/XML/playerEvents: Difference between revisions

From Hattrick
Jump to navigationJump to search
RebelClown (talk | contribs)
No edit summary
RebelClown (talk | contribs)
m Category
 
(One intermediate revision by one other user not shown)
Line 67: Line 67:
===EventText (Within PlayerEvent)===
===EventText (Within PlayerEvent)===
The description of the event, as shown in the HTML-output. May contain HTML-tags. Is in the language specified with the LanguageID-parameter, or in the language of the user.
The description of the event, as shown in the HTML-output. May contain HTML-tags. Is in the language specified with the LanguageID-parameter, or in the language of the user.
[[Category:CHPP XML Pages|Player events]]

Latest revision as of 17:47, 23 March 2007

CHPP Documentation - playerEvents.asp

This page offers XML and HTML interfaces to view the memorable moments a player has experienced throught his career. 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

playerEvents.asp?
     outputType = {HTML | XML}
     actionType = {view}
     playerID = integer
     [LanguageID = 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 Shows the memorable moments for a player

playerID

What player to show the data for.

LanguageID

Optional parameter indicating what language the event text should be in. Defaults to the requesting user's LanguageID if no parameter is sent.

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.

LanguageID (Within HattrickData)

The LanguageID used to fetch the event texts.

Player (Within HattrickData)

Container for the data about the player.

PlayerID (Within Player)

The globally unique playerID.

PlayerEvents (Within Player)

Container for the data about the player events. Has one or two attributes, depending if the player is currently playing a match. Attribute Available is either true or false. If the player is playing a match, it is set to false, otherwise to true. If available="true", another attribute is shown: Count. Count is the number of Events this player has. It ranges from 0 to infinity.

PlayerEvent (Within PlayerEvents)

Container for the data about a specific event. Has one attribute, Index. This index is incremented by one for each event shown and is in the range of 0 to (Count - 1).

EventDate (Within PlayerEvent)

Date and time when the event was recorded. Format is YYYY-MM-DD HH:MM:SS.

PlayerEventTypeID (Within PlayerEvent)

An identifier to show which type of event it is. No list of events will be available. Each CHPP will have to collect an eventlist him-/herself. (See: List of player events)

EventText (Within PlayerEvent)

The description of the event, as shown in the HTML-output. May contain HTML-tags. Is in the language specified with the LanguageID-parameter, or in the language of the user.