CHPP Development/XML/allianceDetails

From Hattrick
Jump to navigationJump to search

This page offers XML and HTML interfaces to see the details of a federation of Hattrick. The XML interface enables CHPP developers to integrate these data into their applications.

Current version

Current version of the XML output is 1.0 Latest available version of the XML output is 1.0

Syntax

allianceDetails.asp?
     outputType = {HTML | XML}
     [outputVersion = float]
     actionType = {view | roles | viewRole | members | membersSubset}
     allianceId = Integer
     [allianceRoleId = Integer]
     [Subset = Integer]
     [ShowLoggedIn = true]
     [ShowRules = true]

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

Value Default Description
view View the details of a specific federation.
roles View the roles of a federation.
viewRole View details for a role of a federation.
members List the members of a federation.
membersSubset List a subset of the members of a federation.

allianceId

ID of federation you search information for.

allianceRoleId

Role within federation you search information for.

ShowLoggedIn

Extend the details With information of presently logged in users. Only relevant for actionType view.

ShowRules

Extend the details with list of rules. Only relevant for actionType view.

Subset

Starting character names to show A = 65 .... Z = 90. Use 0 for other than english starting characters. Only relevant for actionType membersSubset.

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.

Alliance (Within HattrickData)

Container for the data of the federation.

AllianceID (Within Alliance)

The globally unique AllianceID.

AllianceName (Within Alliance)

The name of the federation.

AllianceAbbreviation (Within Alliance)

The abbreviation of the federation. Left out if abbreviation is missing for federation.

AllianceDescription (Within Alliance)

Description of the federation.

LogoURL (Within Alliance)

The URL of the logo of the federation. Left out if logo is missing for federation.

TopRole (Within Alliance)

Name of role within federation for the top user of the federation.

TopUserID (Within Alliance)

Globally unique UserID for the top user of the federation.

TopLoginname (Within Alliance)

Loginname for the top user of the federation.

CreationDate (Within Alliance)

Creation date of the federation.

HomePageURL (Within Alliance)

URL for home page of the federation.

NumberOfMembers (Within Alliance)

Number of members in the federation.

Languages (Within Alliance)

Container for the list of languages the federation has declared As used languages. An Attribute named Count specifies how many federations it contains.

Language (Within Languages)

Container for a language. An Attribute named Index works as a counter.

LanguageID (Within Language)

Globally unique id for the language. If the choice of language is 'All' the id is 0.

LanguageName (Within Language)

Name of the language or 'All' for id 0.

Message (Within Alliance)

Internal message to members of federation.

LoggedInUsers (Within Alliance)

Container for the list of logged in users. An Attribute named Count specifies how many federations it contains. Only present if indata ShowLoggedIn is 'true'.

LoggedInUser (Within LoggedInUsers)

Container for a logged in user. An Attribute named Index works as a counter.

UserID (Within LoggedInUser)

Container for a logged in user. An Attribute named Index works as a counter.

Loginname (Within LoggedInUser)

Container for a logged in user. An Attribute named Index works as a counter.

Rules (Within Alliance)

Internal message to members of federation. Only present if indata ShowRules is 'true'.

UserRole (Within Alliance)

Container for role of fetching user in federation.

RoleId (Within UserRole)

Id of role within federation.

RoleName (Within UserRole)

Name of role within federation.

HasRightTo... (Within UserRole and Role)

Set to '1' if fetching user (actionType view) or described role (actionType viewRole) has the right. A missing tag either means that the right is missing or that the fetching user does not have the right to take part of information regarding the specific right. The rights are: EditPublicProperties, AcceptRequests, ExcludeMembers, CreateRoles, EditRoles, Moderate, SendNewsLetter, CreatePolls, EditRules, EditMessage (not in CHPP Help page, but is in the XML)

AwaitingRequests (Within Alliance)

Show number of awaiting requests for a fetching user with the right to accept requests. Only applicable for actionType view.

DissolutionEndDate (Within Alliance)

The date the federation is dissoluted if it has not reached enough members withn time.

ListSubset (Within Alliance)

Subset of members in federation to list for actionType membersSubset.

Members (Within Alliance)

Container for the list of members, or a subset thereof, of the federation. An Attribute named Count specifies how many federations it contains.

Member (Within Members)

Container for a member. An Attribute named Index works as a counter.

UserID (Within Member)

Globally unique user id of member.

Loginname (Within Member)

Loginname of member.

RoleID (Within Member)

Role id within federation of member.

RoleName (Within Member)

Role name within federation of user.

MemberShipDate (Within Member)

Date when member last changed role within federation.

Roles (Within Alliance)

Container for list of roles in federation. An Attribute named Count specifies how many federations it contains.

Role (Within Roles)

Container for a role. An Attribute named Index works as a counter.

RoleID (Within Role)

Id of role within federation.

RoleName (Within Role)

Name of role within federation.

RoleRank (Within Role)

Rank of role within federation.

RoleMemberCount (Within Role)

Number of members in federation.

RoleMaxMembers (Within Role)

Max number of members in role.

RoleRequestType (Within Role) Way to become member of a role in federation.

RoleDescription (Within Role)

Description of role within federation.