CHPP Development/XML/bookmarks

From Hattrick
Revision as of 01:19, 22 February 2007 by RebelClown (talk | contribs)
Jump to navigationJump to search

This page offers XML and HTML interfaces to the logged on user's bookmarks page. 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

bookmarks.asp?
     outputType = {HTML | XML}
     actionType = {all | users | players | matches | llu | conf | addConfirm | bookmarkRemoveConfirm | bookmarkRemoveConfirmConf}
     [BookmarkID = integer]
     [BookmarkTypeID = integer]
     [ObjectID = 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
all Default View all bookmarks.
users View all user bookmarks.
players View all player bookmarks.
matches View all match bookmarks.
llu View all series (LeagueLevelUnit) bookmarks.
conf View all conference bookmarks.
addConfirm Add a bookmark.
bookmarkRemoveConfirm Remove a (non-conference) bookmark.
bookmarkRemoveConfirmConf Remove a conference bookmark.

BookmarkID

The globally unique BookmarkID. Required for actionTypes addConfirm, bookmarkRemoveConfirm and bookmarkRemoveConfirmConf. Ignored for other actionTypes.

ObjectID

Integer specifying relevant indentifier for the bookmark object: UserID (for users or conf), PlayerID (for players), MatchID (for matches), LeaguelevelUnitID for (llu).

BookmarkTypeID

Required for and only relevant for actionType addConfirm. Indicates the type of bookmark.

Value Description
1 Users
2 Players
3 Matches
4 ConferencePostings
5 LeagueLevelUnits

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.

ActionType (Within HattrickData)

The initial actionType that was submitted for the page.

UserBookmarks (Within HattrickData)

Container for all user bookmarks. Has an attribute named Count specifying how many bookmarks it contains.

UserBookmark (Within UserBookmarks)

Container for a user bookmark. Has an attribute named Index.

TeamID (Within UserBookmarks)

The globally unique TeamID for the bookmarked user's team.

TeamName (Within UserBookmarks)

The full team name.

Loginname (Within UserBookmarks)

The LoginName of the bookmarked user.

BookmarkID (Within UserBookmark, PlayerBookmark, MatchBookmark, LeagueLevelUnitBookmark or ConfBookmark)

The globally unique BookmarkID.

Comment (Within UserBookmark, PlayerBookmark, MatchBookmark, LeagueLevelUnitBookmark)

The user comment for a bookmark (if any). Empty if no comment entered.

PlayerBookmarks (Within HattrickData)

Container for all player bookmarks. Has an attribute named Count specifying how many bookmarks it contains.

PlayerBookmark (Within PlayerBookmarks)

Container for a player bookmark. Has an attribute named Index.

PlayerID (Within PlayerBookmark)

The globally unique PlayerID.

PlayerName (Within PlayerBookmark)

The Player name.

MatchBookmarks (Within HattrickData)

Container for all match bookmarks. Has an attribute named Count specifying how many bookmarks it contains.

MatchBookmark (Within MatchBookmarks)

Container for a match bookmark. Has an attribute named Index.

MatchID (Within MatchBookmark)

The globally unique MatchID.

MatchDate (Within MatchBookmark)

The start date of the match.

HomeTeamName (Within MatchBookmark)

The name of the away team. For matches from the previous (not the current one) seasons, this value is not always available and will be replaced with a dummy value.

AwayTeamName (Within MatchBookmark)

The name of the away team. For matches from the previous (not the current one) seasons, this value is not always available and will be replaced with a dummy value.

LeagueLevelUnitBookmarks (Within HattrickData)

Container for all LeagueLevelUnit bookmarks. Has an attribute named Count specifying how many bookmarks it contains.

LeagueLevelUnitBookmark (Within LeagueLevelUnitBookmarks)

Container for a LeagueLevelUnit bookmark. Has an attribute named Index.

LeagueLevelUnitID (Within LeagueLevelUnitBookmark)

The globally unique LeagueLevelUnitID.

LeagueLevelUnitName (Within LeagueLevelUnitBookmark)

The name of the LeagueLevelUnit.

LeagueID (Within LeagueLevelUnitBookmark)

The globally unique LeagueID of the league that this LeaguelevelUnit is part of.

LeagueName (Within LeagueLevelUnitBookmark)

The name of the league.

ConfBookmarks (Within HattrickData)

Container for all conference bookmarks. Has an attribute named Count specifying how many bookmarks it contains.

ConfBookmark (Within ConfBookmarks)

Container for a conference bookmark. Has an attribute named Index.

UserID (Within ConfBookmark)

The globally unique UserID of the bookmarked user.

Loginname (Within ConfBookmark)

The LoginName of the bookmarked user.