CHPP Development/XML/playerEvents: Difference between revisions
RebelClown (talk | contribs) CHPP Development/XML/playerEvents moved to List of player events |
RebelClown (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
# | __TOC__ | ||
==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. | |||
{{CHPP Documentation}} | |||
{{XML Current version | version=1.1}} | |||
==Syntax== | |||
<code> | |||
playerEvents.asp? | |||
outputType = {HTML | XML} | |||
actionType = {view} | |||
playerID = integer | |||
[LanguageID = integer] | |||
</code> | |||
==Indata parameters== | |||
{{XML outputType}} | |||
===actionType=== | |||
Indicates what type of action the page should perform. | |||
{| border="0" cellpadding="2" cellspacing="2" | |||
|- bgcolor="#cccccc" align="left" | |||
! Value | |||
! Default | |||
! Description | |||
|- bgcolor="#dddddd" valign="top" | |||
| 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== | |||
{{XML default outparams verbose}} | |||
===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. | |||
Revision as of 17:43, 28 February 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.
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.