|
FlexSport On Demand
Technology
FlexSport On Demand is built atop open standards and open protocols. Its technical objective is to make our content as easy as possible to integrate into websites, applications, databases and editorial systems:
Supported FormatsOur platform supports multiple formats for the free listings and for the documents themselves. The most common combination is RSS for listings, and SportsML for documents. RSS, commonly known as "Rich Site Syndication" or "Really Simple Syndication," is employed by hundreds of thousands of users worldwide. It comes in many flavors, and XML Team supports them all, so you can take your pick. If you're unsure which way to go, we recommend RSS 1.0. If you're new to RSS, then here are some excellent technical resources: SportsML is the open XML vocabulary for sports data, and is the only international standard designed for scores, standings, schedules, and statistics designed to accommodate every sport, country and language. For more information on SportsML, visit our Why XML? page or SportsML.com.
How to request listingsListings are requested by making a standard, authenticated http request. You can manually request listings by just typing the appropriate URL into a web browser. Use our Query Builder tool to determine the parameters within the URL, or read our API Specification for details. Broken down and documented for clarity, one sample URL for Listings might look like this: http://fod.xmlteam.com/api/getListings.php?
league-keys = l.nhl.com & // Metadata code for the NHL fixture-keys = event-stats & // Metadata code for a Box Score max-result-count = 10 & // List only the most recent 10 date-window = 24:00 & // List content published in past 24 hours stylesheet = sportsml-set2rss-1.0 // Display Listings in RSS 1.0 format
FlexSport On Demand uses standard http authentication. When using a web browser to display Listings, this means that a small popup window appears asking for your username and password. Login information can also be included in the URL itself, as in: http://username:password@fod.xmlteam.com/.... Please note that Microsoft's Internet Explorer has dropped support for this type of URL. Microsoft cites security issues, and current updates of Internet Explorer no longer support adding the "username:password@" string to the start of a URL. See Microsoft's support page on this issue for more details. How to request documentsDepending upon which format you've chosen for the Listings, you'll be able to determine what URL to use to retrieve the actual documents themselves. If you've selected RSS, then the final-form URLs for the various documents are included in the <link> elements. Broken down and documented for clarity, one sample URL for Document might look like this: <link>
http://fod.xmlteam.com/api/getDocuments?doc-ids=xt.1115498-box // The Document ID of a file.
</link>
Other parts of the RSS Listing give you the title of the document, its publication date, and other useful pieces of metadata. Like with the Listings URL, document retrieval uses standard http authentication. How to request scoreboardsYou can also retrieve scoreboards from FOD, which are slightly different in scope from documents and are not included in the sample library. Scoreboards allow you to query for all game time and score information for a given date. You will also be able to see the latest document id's associated with that event for fixtures such as boxscores, recaps and previews (these are documents that you will find in the Sample Showcase). You can retrieve the current linescores for every game for a given day. SportsML query to find all MLB games for today: http://fod.xmlteam.com/api/getScoreboard?league-keys=l.mlb.com&max-result-count=15&date-offset=0&
The same query but returns HTML:date-offset-midnight=1600&publisher-keys=sportsnetwork.com http://fod.xmlteam.com/api/getScoreboard?league-keys=l.mlb.com&max-result-count=15&date-offset=0&
date-offset-midnight=1600&stylesheet=sportsml2html-scoreboard&publisher-keys=sportsnetwork.com Key practices when automating listing requests and doc retrievalXML Team does not provide software for querying the webservice — all clients have different needs and operating environments — but the mechanics are not difficult for an experienced programmer. Here are some key requirements for any such software:
|
|||||||||