Input data formats

Input data formats

 

This article describes the format of various input-strings for all the methods looks like in order for the API to understand them properly. There are a number of different parameters and they should all be listed here.

API-key

The API-key is your personal key which you received upon registration and e-mail validation. It is found under "My Account" when you are logged in at http://www.xmlsoccer.com.

For more information on how to get one if you don't have on already, please go to "Getting started ".

League

In some methods, it is necessary to specify what league you want data from. GetLiveScoreByLeague is an example of this.

The league parameter is a string and can either be the alphanumeric complete name, or the numeric ID: Both are valid and is understood by the API.

Examples

Both of these inputs will result in the API returning data from the English Premier League:

English Premier League
1

Obviously, the strings needs to be exact. This means that if you make a misspelling like:

English Premier League

The API will simply return nothing.

Team

In some methods, it is necessary to specify what team you want data from. GetTeam  is an example of this.

The team parameter is a string and can either be the alphanumeric complete name, or the numeric ID: Both are valid and is understood by the API. In some methods the requested field is labeled "teamId" and in some others "teamName". This makes no difference: both values are still valid.

Examples

Both of these inputs will result in the API returning data from Birmingham City F.C.:

Inverness CT
1

Obviously, the strings needs to be exact. This means that if you make a misspelling like:

Brrmingham

The API will simply return nothing.

SeasonDateString

The seasonDateString parameter is the indicator of what season you are looking for. GetAllTeamsByLeagueAndSeason is an example of a method taking this input parameter. 

Valid inputs for seasons is the last two digits of the beggining of the season-year appended by the last two digits of the following year. NOTE - If you are using the .net dll, the input is StartYear (yyyy) - so for the 2012-2013 season, the .dll input value would be 2012.

Examples

To get the 2012-2013 season of the English Premier League, you specify:

1213

The 2008-2009 season subsequently would be:

0809

As of August 2013, it is now possible to get the current season by simply passing an empty string ("") as seasonDateString parameter.  Bear in mind that as more leagues are added, we now see some leagues that do not follow the "traditional" cross-year strategy. The American "Major league" and the Swedish "Allsvenskan" is two examples of this, as they start in the beginning of the year and end in the end of the year. Despite of this, they too follow the same seasonDateString rules. So the 2013 season of the American "Major League" will need the input:

1314

StartDateString and endDateString

Many of the methods require either startDateString, endDateString or both. They use the same formats and is basically a date filter parameter for the API. The format follows "YYYY-MM-DD hh:mm" format. This means that if you would like specify the 3rd of April 2011 at 5 PM CET you input (times are CET):

2011-04-03 17:00

You don't have to specify the time, but if you do not 00:00 is defaulted:

2011-04-03
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk