API.

There are two methods of showing data in a users own web site:
  • An API to return the raw data.
  • Special pages without the headers an menus that can be embedded eg with an IFrame.

API

There is an experimental API to allow return of the data into a users own web site. It is a REST Service and in theory will accept requests in these formats:
  • application/json
  • application/x-www-form-urlencoded
  • application/xml
  • multipart/form-data
  • text/xml
and will return data in the following formats:
  • bencode
  • json
  • jsonp
  • php
  • xml
which is what the settings in the Drupal Services modules say. I have created the following example codes to call it: Feel free to copy these and amend as necessary. The requests are sent to http://ecflms.org.uk/lms/lmsrest/league with the appropriate type of request added as per the table below. For example for a table request, the URL would be: http://ecflms.org.uk/lms/lmsrest/league/table.json Each request expects 2 parameters
  • org - the numeric organisation id which can be found by looking at the url for the home page, for example for the test league with url http://ecflms.org.uk/lms/node/10/home, the id is 10.
  • name - as described in the table below
RequestDescriptionname
table.json returns league table for a league event, a knockout table for a knockout event, or the standings for an individual event. name of the event. Looks for events with this exact name in active seasons
match.json returns the match cards for a team event or the round results for an individual event. name of the event. Looks for events with this exact name in active seasons
event.json returns the fixtures for a league event, a knockout table for a knockout event, or the rounds and dates for an individual event. name of the event. Looks for events with this exact name in active seasons
club.json returns the fixtures for a club. ECF Club code of the club

Plain Pages

The plain pages are just ordinary web pages that don't show all the headers and menus. The URLs follow a similar patern to the above. Here are a couple of examples.
  • League table for division 1 in organisation nn. Note replace blanks by +. http://ecflms.org.uk/lms/league/plain/table/nn/Division+1
  • Fixtures for club with ECF club code CCCC in organisation nn. http://ecflms.org.uk/lms/league/plain/club/nn/CCCC