CHPP Development/XML/arenaDetails: Difference between revisions

From Hattrick
Jump to navigationJump to search
No edit summary
RebelClown (talk | contribs)
m Category
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
actionType
__TOC__
Indicates what type of action the page should perform.
This page offers XML and HTML interfaces to the arena details page and to the supporter statistics about arenas (only available for supporters of course). The XML interface enables CHPP developers to integrate these data into their applications.  


Value Default Description
{{XML Current version | version=1.2}}
view Default View the data about an arenas details.
stats Shows the distribution among training types for all leagues or for a specific league. Requires that the logged on user is a Hattrick Supporter.


==Syntax==
<code>
arenaDetails.asp?
      outputType = {HTML | XML}
      actionType = {view | stats}
      [arenaID = integer]
      [StatsType = {MyArena | OtherArenas}]
      [MatchType = {All | LeagueOnly | CompOnly | FriendlyOnly}]
      [FirstDate = date]
      [LastDate = date]
      [StatsLeagueID = integer]
</code>
==Indata parameters==


arenaID
{{XML outputType}}
Which arena to show details for. Defaults to users own arena if not specified. Only relevant for actionType=view.


StatsType
===actionType===
Which type of statistics that will be showed. Only relevant for actionType=stats.
Indicates what type of action the page should perform. <br><br>
<table border="0" cellpadding="2" cellspacing="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 data about an arenas details.</td>
</tr>
<tr bgcolor="#dddddd">
<td valign="top">stats</td>
<td valign="top"></td>
<td valign="top">Shows the distribution among training types for
all leagues or for a specific league. Requires that the logged on user
is a Hattrick Supporter.</td>
</tr>
</table>
===arenaID===
Which arena to show details for. Defaults to users own arena
if not specified. Only relevant for actionType=view.


Value Default Description
===StatsType===
MyArena Default Show visitor statistics for the users own arena.
Which type of statistics that will be showed. Only
OtherArenas Shows statistics ower biggest arenas.
relevant for actionType=stats.<br><br>
<table border="0" cellpadding="2" cellspacing="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">MyArena</td>
<td valign="top">Default</td>
<td valign="top">Show visitor statistics for the users own arena.</td>
</tr>
<tr bgcolor="#dddddd">
<td valign="top">OtherArenas</td>
<td valign="top"></td>
<td valign="top">Shows statistics ower biggest arenas.</td>
</tr>
</table>


===MatchType===
Which type of matches that will be included in the statistics.
Only relevant for StatsType=MyArena.<br><br>
<table border="0" cellpadding="2" cellspacing="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">All</td>
<td valign="top">Default</td>
<td valign="top">Show statistics for all types of games.</td>
</tr>
<tr bgcolor="#dddddd">
<td valign="top">CompOnly</td>
<td valign="top"></td>
<td valign="top">Shows statistics for all competition games.</td>
</tr>
<tr bgcolor="#dddddd">
<td valign="top">LeagueOnly</td>
<td valign="top"></td>
<td valign="top">Shows statistics only for series games.</td>
</tr>
<tr bgcolor="#dddddd">
<td valign="top">FriendlyOnly</td>
<td valign="top"></td>
<td valign="top">Shows statistics only for friendly games.</td>
</tr>
</table>


MatchType
===FirstDate===
Which type of matches that will be included in the statistics. Only relevant for StatsType=MyArena.
The first date the statistics should cover. Only
relevant for StatsType=MyArena. Default is date for first
match on arena.  


Value Default Description
===LastDate===
All Default Show statistics for all types of games.
The last date the statistics should cover. Only
CompOnly Shows statistics for all competition games.
relevant for StatsType=MyArena. Default is todays date.
LeagueOnly Shows statistics only for series games.
FriendlyOnly Shows statistics only for friendly games.


===StatsLeagueID===
Which league to show statistics for. The default,
LeagueID=0, gives global statistics. Only relevant
for StatsType=OtherArenas.


FirstDate
==Outdata parameters==
The first date the statistics should cover. Only relevant for StatsType=MyArena. Default is date for first match on arena.
{{XML default outparams}}


LastDate
===Arena (Within HattrickData)===
The last date the statistics should cover. Only relevant for StatsType=MyArena. Default is todays date.
Container for the data about the arena. Only provided for actionType = view.


StatsLeagueID
===ArenaID (Within Arena)===
Which league to show statistics for. The default, LeagueID=0, gives global statistics. Only relevant for StatsType=OtherArenas.
The globally unique arenaID.
 
===ArenaName (Within Arena)===
The name of the arena.
 
===Team (Within Arena)===
Container for the data about the team owning this arena.
 
===TeamID (Within Team)===
The globally unique teamID.
 
===TeamName (Within Team)===
The name of the team.
 
===League (Within Arena)===
Container for the data about the league of the arena's team.
 
===LeagueID (Within League)===
The globally unique leagueID.
 
===LeagueName (Within League)===
The name of the league.
 
===Region (Within Arena)===
Container for the data about the region of the arena.
 
===RegionID (Within Region)===
The globally unique regionID.
 
===RegionName (Within Region)===
The name of the region.
 
===CurrentCapacity (Within Arena)===
Container for the data about the current capacity of the arena.
 
===RebuiltDate (Within CurrentCapacity)===
The date when current capacity was reached. If the arena is under construction an attribute named Available is set to true, otherwise to false and the container is then empty.
 
===Terraces (Within CurrentCapacity)===
The current capacity on the terraces.
 
===Basic (Within CurrentCapacity)===
The current capacity on the basic seats.
 
===Roof (Within CurrentCapacity)===
The current capacity on the seats under roof.
 
===VIP (Within CurrentCapacity)===
The current capacity in the VIP lounge.
 
===Total (Within CurrentCapacity)===
The arenas current total capacity.
 
===ExpandedCapacity (Within Arena)===
Container for the data about the expanded capacity of the arena during construction. If the arena is under an attribute named Available is set to true, otherwise to false and the container is then empty.
 
===ExpansionDate (Within ExpandedCapacity)===
The preliminary date when the expansion is finished.
 
===Terraces (Within ExpandedCapacity)===
The expanded capacity on the terraces.
 
===Basic (Within ExpandedCapacity)===
The expanded capacity on the basic seats.
 
===Roof (Within ExpandedCapacity)===
The expanded capacity on the seats under roof.
 
===VIP (Within ExpandedCapacity)===
The expanded capacity in the VIP lounge.
 
===MyArena (Within HattrickStat)===
Container for the statistics for the user's own arena. Only provided for StatsType = MyArena.
 
===ArenaID (Within MyArena)===
The globally unique arenaID.
 
===ArenaName (Within MyArena)===
The name of the arena.
 
===MatchTypes (Within MyArena)===
String defining the type of matches included in visitor statistics:
 
<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">All</TD>
<TD VALIGN="top">Default</TD>
<TD VALIGN="top">Show statistics for all types of games.</TD>
 
</TR>
<TR BGCOLOR="#DDDDDD">
<TD VALIGN="top">CompOnly</TD>
<TD VALIGN="top"></TD>
<TD VALIGN="top">Shows statistics for all competition games.</TD>
</TR>
<TR BGCOLOR="#DDDDDD">
<TD VALIGN="top">LeagueOnly</TD>
 
<TD VALIGN="top"></TD>
<TD VALIGN="top">Shows statistics only for series games.</TD>
</TR>
<TR BGCOLOR="#DDDDDD">
<TD VALIGN="top">FriendlyOnly</TD>
<TD VALIGN="top"></TD>
<TD VALIGN="top">Shows statistics only for friendly games.</TD>
 
</TR>
</TABLE>
 
===FirstDate (Within MyArena)===
The first date the statistics cover.
 
===LastDate (Within MyArena)===
The last date the statistics cover.
 
===NumberOfMatches (Within MyArena)===
Number of matches of specified type within given period.
 
===VisitorsAverage (Within MyArena)===
Container for average visitor statistics.
 
===VisitorsMost (Within MyArena)===
Container for most visitor statistics.
 
===VisitorsLeast (Within MyArena)===
Container for least visitor statistics.
 
===Terraces (Within VisitorsAverage, VisitorsMost, VisitorsLeast)===
Visitors on terraces.
 
===Basic (Within VisitorsAverage, VisitorsMost, VisitorsLeast)===
Visitors on basic seats.
 
===Roof (Within VisitorsAverage, VisitorsMost, VisitorsLeast)===
Visitors on seats under roof.
 
===VIP (Within VisitorsAverage, VisitorsMost, VisitorsLeast)===
Visitors in VIP lounge.
 
===Total (Within VisitorsAverage, VisitorsMost, VisitorsLeast)===
Total amount of visitors.
 
===LeagueArenaStats (Within HattrickStat)===
Container for the biggest arena statistics. Only provided for StatsType = OtherArenas.
 
===LeagueID (Within LeagueArenaStats)===
The globally unique LeagueID. LeaguID=0 for global statistics.
 
===LeagueName (Within LeagueArenaStats)===
The name of the league. Not provided for global statistics.
 
===CreatedDate (Within LeagueArenaStats)===
The date when the statistics were created/updated.
 
===OtherArenasStatList (Within LeagueArenaStats)===
Container for biggest arena statistics for the league. An attribute named Count tells how many training statistics there are in the list.
 
===ArenaStat (Within OtherArenasStatList)===
Container for a particular arena's statistics. An attribute named Index gives a counter.
 
===ArenaID (Within ArenaStat)===
The globally unique arenaID.
 
===ArenaName (Within ArenaStat)===
The name of the arena.
 
===ArenaSize (Within ArenaStat)===
The size of the arena.
 
===ArenaLeagueID (Within ArenaStat)===
The leagueID for where the arena is used. Only provided when LeagueID=0.
 
===ArenaLeagueName (Within ArenaStat)===
The name of the league for where the arena is used. Only provided when LeagueID=0.
 
===ArenaRegionID (Within ArenaStat)===
The regionID for where the arena is placed. Not provided when LeagueID=0.
 
===ArenaRegionName (Within ArenaStat)===
The name of the region for where the arena is placed. Not provided when LeagueID=0.
 
[[Category:CHPP XML Pages|Arena details]]

Latest revision as of 17:31, 23 March 2007

This page offers XML and HTML interfaces to the arena details page and to the supporter statistics about arenas (only available for supporters of course). The XML interface enables CHPP developers to integrate these data into their applications.

Current version

Current version of the XML output is 1.2

Syntax

arenaDetails.asp?
     outputType = {HTML | XML}
     actionType = {view | stats}
     [arenaID = integer]
     [StatsType = {MyArena | OtherArenas}]
     [MatchType = {All | LeagueOnly | CompOnly | FriendlyOnly}]
     [FirstDate = date]
     [LastDate = date]
     [StatsLeagueID = 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 View the data about an arenas details.
stats Shows the distribution among training types for

all leagues or for a specific league. Requires that the logged on user

is a Hattrick Supporter.

arenaID

Which arena to show details for. Defaults to users own arena if not specified. Only relevant for actionType=view.

StatsType

Which type of statistics that will be showed. Only relevant for actionType=stats.

Value Default Description
MyArena Default Show visitor statistics for the users own arena.
OtherArenas Shows statistics ower biggest arenas.

MatchType

Which type of matches that will be included in the statistics. Only relevant for StatsType=MyArena.

Value Default Description
All Default Show statistics for all types of games.
CompOnly Shows statistics for all competition games.
LeagueOnly Shows statistics only for series games.
FriendlyOnly Shows statistics only for friendly games.

FirstDate

The first date the statistics should cover. Only relevant for StatsType=MyArena. Default is date for first match on arena.

LastDate

The last date the statistics should cover. Only relevant for StatsType=MyArena. Default is todays date.

StatsLeagueID

Which league to show statistics for. The default, LeagueID=0, gives global statistics. Only relevant for StatsType=OtherArenas.

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.

Arena (Within HattrickData)

Container for the data about the arena. Only provided for actionType = view.

ArenaID (Within Arena)

The globally unique arenaID.

ArenaName (Within Arena)

The name of the arena.

Team (Within Arena)

Container for the data about the team owning this arena.

TeamID (Within Team)

The globally unique teamID.

TeamName (Within Team)

The name of the team.

League (Within Arena)

Container for the data about the league of the arena's team.

LeagueID (Within League)

The globally unique leagueID.

LeagueName (Within League)

The name of the league.

Region (Within Arena)

Container for the data about the region of the arena.

RegionID (Within Region)

The globally unique regionID.

RegionName (Within Region)

The name of the region.

CurrentCapacity (Within Arena)

Container for the data about the current capacity of the arena.

RebuiltDate (Within CurrentCapacity)

The date when current capacity was reached. If the arena is under construction an attribute named Available is set to true, otherwise to false and the container is then empty.

Terraces (Within CurrentCapacity)

The current capacity on the terraces.

Basic (Within CurrentCapacity)

The current capacity on the basic seats.

Roof (Within CurrentCapacity)

The current capacity on the seats under roof.

VIP (Within CurrentCapacity)

The current capacity in the VIP lounge.

Total (Within CurrentCapacity)

The arenas current total capacity.

ExpandedCapacity (Within Arena)

Container for the data about the expanded capacity of the arena during construction. If the arena is under an attribute named Available is set to true, otherwise to false and the container is then empty.

ExpansionDate (Within ExpandedCapacity)

The preliminary date when the expansion is finished.

Terraces (Within ExpandedCapacity)

The expanded capacity on the terraces.

Basic (Within ExpandedCapacity)

The expanded capacity on the basic seats.

Roof (Within ExpandedCapacity)

The expanded capacity on the seats under roof.

VIP (Within ExpandedCapacity)

The expanded capacity in the VIP lounge.

MyArena (Within HattrickStat)

Container for the statistics for the user's own arena. Only provided for StatsType = MyArena.

ArenaID (Within MyArena)

The globally unique arenaID.

ArenaName (Within MyArena)

The name of the arena.

MatchTypes (Within MyArena)

String defining the type of matches included in visitor statistics:

Value Default Description
All Default Show statistics for all types of games.
CompOnly Shows statistics for all competition games.
LeagueOnly Shows statistics only for series games.
FriendlyOnly Shows statistics only for friendly games.

FirstDate (Within MyArena)

The first date the statistics cover.

LastDate (Within MyArena)

The last date the statistics cover.

NumberOfMatches (Within MyArena)

Number of matches of specified type within given period.

VisitorsAverage (Within MyArena)

Container for average visitor statistics.

VisitorsMost (Within MyArena)

Container for most visitor statistics.

VisitorsLeast (Within MyArena)

Container for least visitor statistics.

Terraces (Within VisitorsAverage, VisitorsMost, VisitorsLeast)

Visitors on terraces.

Basic (Within VisitorsAverage, VisitorsMost, VisitorsLeast)

Visitors on basic seats.

Roof (Within VisitorsAverage, VisitorsMost, VisitorsLeast)

Visitors on seats under roof.

VIP (Within VisitorsAverage, VisitorsMost, VisitorsLeast)

Visitors in VIP lounge.

Total (Within VisitorsAverage, VisitorsMost, VisitorsLeast)

Total amount of visitors.

LeagueArenaStats (Within HattrickStat)

Container for the biggest arena statistics. Only provided for StatsType = OtherArenas.

LeagueID (Within LeagueArenaStats)

The globally unique LeagueID. LeaguID=0 for global statistics.

LeagueName (Within LeagueArenaStats)

The name of the league. Not provided for global statistics.

CreatedDate (Within LeagueArenaStats)

The date when the statistics were created/updated.

OtherArenasStatList (Within LeagueArenaStats)

Container for biggest arena statistics for the league. An attribute named Count tells how many training statistics there are in the list.

ArenaStat (Within OtherArenasStatList)

Container for a particular arena's statistics. An attribute named Index gives a counter.

ArenaID (Within ArenaStat)

The globally unique arenaID.

ArenaName (Within ArenaStat)

The name of the arena.

ArenaSize (Within ArenaStat)

The size of the arena.

ArenaLeagueID (Within ArenaStat)

The leagueID for where the arena is used. Only provided when LeagueID=0.

ArenaLeagueName (Within ArenaStat)

The name of the league for where the arena is used. Only provided when LeagueID=0.

ArenaRegionID (Within ArenaStat)

The regionID for where the arena is placed. Not provided when LeagueID=0.

ArenaRegionName (Within ArenaStat)

The name of the region for where the arena is placed. Not provided when LeagueID=0.