MCLA.us "Expert API" documentation - v 1.0

Introduction

The MCLA.us "Expert API" offers web developers direct access to Official MCLA team rosters, team schedules, final game scores, and player statistics. Use of the API requires a developer be able to: create properly formatted request strings, parse request results from XML, and cache data. For developers unable to work with this API, a less technical (and less customizable) may be available in the future.

UPDATES

2/10/2010 - Warranty / Support details clarified.
2/3/2010 - Penalties for violation of "Terms of Use" clarified.
1/6/2010 - Now returning 2010 data on all requests.

Accessing the API

Developers interested in accessing MCLA data must first register for an "API Key". This is a unique 32 encoded character string identifying the user and the site running the API. Applying is currently manually done by and including 1) the site that will be making requests and 2) a contact name, email and telephone number. By requesting and using this API you are agreeing to all terms of use as detailed below.

Terms of Use / Rules

By applying for an API key you agree to these Terms of Use / Rules. Refusal to follow as stated will result in your API key being temporarily or permanently disabled.

Your API Key:

  • Individual API keys can be disabled at the discretion of the MCLA Executive Board without notification.
  • You are responsible for safe guarding your API key. Do not share your key with anyone.
  • The API request server may occasionally be disabled for maintenance. A notice will be posted here with expected return time when possible.

Branding Requirements:

  • Credit must be attributed by displaying the "Powered by MCLA.us" graphic in a prominent location (at least once per page) next to any data being provided. See code.
  • When displaying team or game info on your site, you must provide a link to the team or game URL as provided in the XML.

Usage:

  • Limit requests to no more than 6 per hour / 144 per day (24 hour period). Accounts exceeding this limit will be disabled automatically.
  • Redistribution, reselling, or transferring data retrieved via the API to a third party will result in your API key being temporarily or permanently disabled.
  • Attempts to improperly access data, as not defined in this document, will result in your API key being temporarily or permanently disabled.
  • All requests are monitored and logged. This data is used for security of MCLA.us data only and does not contain personal information about you, your server, or your visitors.
  • Direct web access (as seen in our examples) is disabled for all other keys.

Technical:

  • All requests must currently be GET - not POST.
  • API responses are currently valid UTF-8 XML.
  • As a general good practice, cache data when possible. Specifically, we recommend you cache static data on your servers, such as the team list or roster, when data is not expected to change on a regular basis. Requesting data less frequently eliminates unnecessary traffic and strain on your web server as well as ours.

Disabled Keys:

  • Any violation of the "Terms of Use" will result in your API key being disabled for a period of at least seven (7) days.
  • Multiple violations of the "Terms of Use" will result in access being disabled for 30 days and a full evaluation by the MCLA Executive Board.

Versions

  • Utilize the 'version' variable to pass the requested API version in your request string.
  • The current version is v1.0.

Methods Available in v1.0

Team:

  • div (optional) - You may choose to specify division. Acceptable variables are "1" or "2". Default shows both.
  • conf (optional) - You may also choose to specify conference. See all acceptable conference abbreviations. Default shows all.
  • CCLA, SELC, GRLC, UMLL, PCLL, WCLL, PNCLL, RMLC, LSA, SLC

Game:

  • date - All dates must be in MM/DD/YYYY format.
  • start / end (optional) - Set a range of dates in MM/DD/YYYY format. Date range limited to 30 days.
  • team (optional) - Pull a single team schedule by sending the team slug (as defined in the 'show all teams' XML as "team_slug").

Roster:

  • team (required) - Pull a single team roster by sending the team slug (as defined in the 'show all teams' XML as "team_slug").
  • Note: only verified and eligible players will be shown.

Building a Request

Combine your API key, the desired version, a method, and additional variables and submit to the base request URL: http://api.mcla.us/request/

Example API Requests

Show all teams:

Example Request and XML Reply - http://api.mcla.us/request/?api_key=your_key_here&version=1.0&method=team

Show teams in a specific division and conference:

Example Request and XML Reply - http://api.mcla.us/request/?api_key=your_key_here&version=1.0&method=team&div=1&conf=LSA

Show schedule on specific date:

Example Request and XML Reply - http://api.mcla.us/request/?api_key=your_key_here&version=1.0&method=game&date=01/30/2010

Show schedule between two dates:

Example Request and XML Reply - http://api.mcla.us/request/?api_key=your_key_here&version=1.0&method=game&start=01/10/2010&end=01/30/2010

Show schedule for a team:

Example Request and XML Reply - http://api.mcla.us/request/?api_key=your_key_here&version=1.0&method=game&team=chapman

Show roster for a team:

Example Request and XML Reply - http://api.mcla.us/request/?api_key=your_key_here&version=1.0&method=roster&team=pittsburgh

No Warranties; No Support

This API and MCLA content is provided "as is", "with all faults" and "as available" without warranty, of any kind and at your sole risk. The MCLA disclaims any warranty that your use of the API will be uninterrupted, secure, timely or error free. For the avoidance of doubt, you acknowledge and agree that the API agreement does not entitle you to any support for the API. No advice or information, whether oral or in writing, obtained by you from the MCLA will create any warranty not expressly stated in the API agreement.

On occasion the MCLA provides limited technical support pertaining to building proper API requests as a courtesy to partners but is under no obligation to do so.

All communication (telephone, email, etc) with MCLA representatives regarding the API will be handled in the order they are received. The estimated response time for normal API correspondence is 36-72 hours.

Contact

Questions, comments, complaints or feature requests can be sent to: .