CHPP Development/XML/challanges: Difference between revisions
No edit summary |
RebelClown (talk | contribs) m Category |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
__TOC__ | |||
This page offers XML and HTML interfaces to see the logged on user's challanges, made by him/herself or by others. The XML interface enables CHPP developers to integrate these data into their applications. | |||
or | {{XML Current version | version=1.1}} | ||
==Syntax== | |||
Indicates what type of action the page should perform. | <code> | ||
< | challanges.asp? | ||
< | outputType = {HTML | XML} | ||
actionType = {view} | |||
</code> | |||
</ | ==Indata parameters== | ||
< | |||
{{XML outputType}} | |||
===actionType=== | |||
</ | Indicates what type of action the page should perform. | ||
</ | <TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2"> | ||
<TR BGCOLOR="#CCCCCC"> | |||
<TD VALIGN="top"><B>Value</B></TD> | |||
<TD VALIGN="top"><B>Default</B></TD> | |||
<TD VALIGN="top"><B>Description</B></TD> | |||
</TR> | |||
<TR BGCOLOR="#DDDDDD"> | |||
<TD VALIGN="top">view</TD> | |||
<TD VALIGN="top">Default</TD> | |||
<TD VALIGN="top">View the general data.</TD> | |||
</TR> | |||
</TABLE> | |||
==Outdata parameters== | |||
{{XML default outparams}} | |||
===Team (Within HattrickData)=== | |||
Container for the data about the team. | |||
===TeamID (Within Team)=== | |||
The globally unique TeamID. | |||
===TeamName (Within Team)=== | |||
The name of the team. | |||
===ChallengesByMe (Within Team)=== | |||
Container for the challenges that the user has done. | |||
===Challenge (Within ChallengesByMe)=== | |||
Container for a particular challenge. An attribute named Index indicate the relative count within the ChallengesByMe container. | |||
===OffersByOthers (Within Team)=== | |||
Container for the offers of friendlies that other teams have given to the logged on user's team. | |||
===Offer (Within OffersByOthers)=== | |||
Container for a particular offer. An attribute named Index indicate the relative count within the OffersByOthers container. | |||
===TrainingMatchID (Within Challenge or Offer)=== | |||
The globally unique indentifier for the challenge/offer. | |||
===MatchTime (Within Challenge or Offer)=== | |||
The match start time. | |||
===FriendlyType (Within Challenge or Offer)=== | |||
Integer defining the type of friendly: | |||
<TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2"> | |||
<TR BGCOLOR="#CCCCCC"> | |||
<TD VALIGN="top"><B>FriendlyType</B></TD> | |||
<TD VALIGN="top"><B>Description</B></TD> | |||
</TR> | |||
<TR BGCOLOR="#DDDDDD"><TD VALIGN="top">0</TD><TD VALIGN="top">Normal rules</TD></TR> | |||
<TR BGCOLOR="#DDDDDD"><TD VALIGN="top">1</TD><TD VALIGN="top">Cup rules</TD></TR> | |||
<TR BGCOLOR="#DDDDDD"><TD VALIGN="top">12</TD><TD VALIGN="top">National team friendly.</TD></TR> | |||
</TABLE> | |||
===Opponent (Within Challenge or Offer)=== | |||
Container for the data about the opponent. | |||
===TeamID (Within Opponent)=== | |||
The globally unique TeamID. | |||
===TeamName (Within Opponent)=== | |||
The full team name of the opponent. | |||
===Arena (Within Challenge or Offer)=== | |||
Container for the data about the arena for the friendly. | |||
===ArenaID (Within Arena)=== | |||
The globally unique ArenaID. | |||
===ArenaName (Within Arena)=== | |||
The name of the arena. | |||
===League (Within Challenge or Offer)=== | |||
Container for the data about the league that the friendly would be played in. | |||
===LeagueID (Within League)=== | |||
The globally unique LeagueID. | |||
===LeagueName (Within League)=== | |||
The name of the league. | |||
===IsAgreed (Within Challenge or Offer)=== | |||
Boolean value indicating whether the challenge/offer has been accepted and the match arranged. | |||
Note: Date format is always YYYY-MM-DD HH:MM:SS. | |||
==Addendum== | |||
The name of this page is misspelled, it should be chall'''e'''nges.asp. (Listed in [[Bugs]]) | |||
[[Category:CHPP XML Pages|Challenges]] | |||
Latest revision as of 17:33, 23 March 2007
This page offers XML and HTML interfaces to see the logged on user's challanges, made by him/herself or by others. 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
challanges.asp?
outputType = {HTML | XML}
actionType = {view}
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 general data. |
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.
Team (Within HattrickData)
Container for the data about the team.
TeamID (Within Team)
The globally unique TeamID.
TeamName (Within Team)
The name of the team.
ChallengesByMe (Within Team)
Container for the challenges that the user has done.
Challenge (Within ChallengesByMe)
Container for a particular challenge. An attribute named Index indicate the relative count within the ChallengesByMe container.
OffersByOthers (Within Team)
Container for the offers of friendlies that other teams have given to the logged on user's team.
Offer (Within OffersByOthers)
Container for a particular offer. An attribute named Index indicate the relative count within the OffersByOthers container.
TrainingMatchID (Within Challenge or Offer)
The globally unique indentifier for the challenge/offer.
MatchTime (Within Challenge or Offer)
The match start time.
FriendlyType (Within Challenge or Offer)
Integer defining the type of friendly:
| FriendlyType | Description |
| 0 | Normal rules |
| 1 | Cup rules |
| 12 | National team friendly. |
Opponent (Within Challenge or Offer)
Container for the data about the opponent.
TeamID (Within Opponent)
The globally unique TeamID.
TeamName (Within Opponent)
The full team name of the opponent.
Arena (Within Challenge or Offer)
Container for the data about the arena for the friendly.
ArenaID (Within Arena)
The globally unique ArenaID.
ArenaName (Within Arena)
The name of the arena.
League (Within Challenge or Offer)
Container for the data about the league that the friendly would be played in.
LeagueID (Within League)
The globally unique LeagueID.
LeagueName (Within League)
The name of the league.
IsAgreed (Within Challenge or Offer)
Boolean value indicating whether the challenge/offer has been accepted and the match arranged. Note: Date format is always YYYY-MM-DD HH:MM:SS.
Addendum
The name of this page is misspelled, it should be challenges.asp. (Listed in Bugs)