In order for SquashLevels to be a fully inclusive system it needs player details and match results from all players. We already have quite a few systems sending us results from events, leagues and boxes (see the community overview page. for details) and are actively working with others to bring them on line as well.
There are good reasons to get connected:
Note that we're trying to hard to link all systems together using ESR membership number as this is a unique number available to all players across the country. See linkage information below on how to include ESR membership number with player results.
It's surprisingly easy to get connected so please ask your webmaster to take a look at the guidelines below, get can get in touch with us and we'll have you on board in no time!
The is the first step of being able to pull your results from the system that collects them. That system (such as a league management system or internal club boxes system) needs to add a special web page that has the most recent results (and any that have been updated recently) in CSV format.
SquashLevels just opens that page each night and reads the results in. Simple! We normally advise some undocumented parameters to keep the data unavailable to unauthorised systems but these are also simple. Here's an example from BADsquash. Just click here to view.
Each row represents a single match result between two players. Each column contains the data for each of the players, the result and the type of match. If data about a player is received then that player's information on the system can be updated. That way, player data can be maintained by the source system without individual players having to maintain it themselves. Provide as much of the following data as you have available on the source system:
Ideally the source system can provide all of this information but SquashLevels will assume players are senior, males with no country or ESM number. MatchtypeID and FixtureID are also optional. The remaining fields are mandatory.
Note that information about the players can be derived from the match type such as Mens O45 is for O45. Or York Ladies is for ladies!
So that the systems form a community for the players (and not just a set of isolated systems) there should be two way links between the source systems and SquashLevels. This is part of the requirements of getting connected.
If possible, players should be referenced using their ES&R membership number allowing all systems to use the same reference for players. If the ES&R number is not available then systems should use their own ID along with the reference name of their system. All source systems are allocated a name when they link up.
Links from SquashLevels to the source systems
These links provide single click access back to the source systems allowing the players fast access to the pages that are of most interest and specific to them. If you have a page you'd like us to link to them please let us know.
If you have a logo URL we would like to use it!
Links from the source systems to SquashLevels
These links provide single click access to SquashLevels pages of most interest to the players such as rankings and player history. Note that any links can be used but page content will depend on whether the player has previously logged on to SquashLevels. If so then then full page content will be available otherwise it will be slightly reduced. This feature relies on the player using cookies.
These links work well from the source system home page.
www.squashlevels.com/players.php?all&source=<source name>&list=county. Click here for example.
Please use our logo URL at
www.squashlevels.com/images/squashlevels.png with your links.
These links work well from the source system player detail page.
www.squashlevels.com/player_detail.php?player=<source player ID>&source=<source name>. Click here for example.
www.squashlevels.com/players.php?all&player=<source player ID>&source=<source name>&list=club. Click here for example. Non members will not have their position highlighted.
www.squashlevels.com/players.php?all&player=<source player ID>&source=<source name>&list=county. Click here for example. Non members will not have their position highlighted
Many of the user readable web pages on SquashLevels can be returned in JSON format for system consumption by adding
format=json. All parameters are passed in using the GET method - which is the equivalent of
typing in the URL on your browser.
for an example.
The data is returned as a JSON list with value:ID pairs for each piece of data. This allows source systems to include the SquashLevels ranking lists directly on their own pages.
All returned JSON structures use the following format:
"message":"<Text message explaining result or failure>",
"user_message":"<Text message for the user - generic news or telling them that they need to be a member>",
The message text is mainly to use if something goes wrong - it will tell you what. The user text message is to show the user. This might be generic news such as system downtime planned (not that we ever take it down) or, more likely, that the feature they're asking for needs them to be logged on as a member. Mostly, this user message will be blank. The data that was requested will be returned in the 'data' field.
Player listings (rankings)
The players.php page is used for player listings for both the web page and JSON output. The listings are controlled using the following parameters:
The defaults are set to list all players for the last 12 months with no other restrictions but they can be overridden by cookies which are set to the filters used for the last player listings selected. This allows users to set up the player listings that they want to see and then that's what they'll always see if they don't change it.
Access to club and county IDs
It may help to be able to list the full set of club and county IDs used by the system. They are dynamically added to but once defined, not normally changed (unless duplicated clubs are merged). Use the following page for JSON output:
Finding out processing state and results upload history
If you intend to cache any data locally to your own system, you should be aware that SquashLevels reprocesses its levels over night and may have made changes during that process. You can use the URL below to return a JSON structure that will tell you what the processing state currently is and when it last changed state. The state is shown as 'completed' at the end of processing. You can use this to determine when to refresh your cached data.
This URL also returns a summary of the uploaded results for the last 7 days. You will find a structure showing the upload count for each source/matchtype/date combination for the last 7 days. You should be able to find out how many results SquashLevels has received from your system using this structure.