Sports Feed
Description
This feed returns a list of subsports and periods and the amount of lines
(linecount) for each available for the general public at
Justbet.cx limited according to the specified criteria. It can be useful
to get an initial list of what’s available. These lines, by default, have a delay
of up to 10 minutes which is lowerable to 5 minutes. If an affiliate or partner
needs it lowered even further a special key parameter can be provided on
a case by case basis. This XML cache system has been created in order to protect
our resources from abuse or misuse but, by no means, is intended to limit affiliates
that need greater line accuracy.
NOTE: At the moment, feeds are only available in
XML format but upon request they can be trasformed to CSV, RSS or other
formats and depending on their popularity, they will be documented here.
Request
|
Script Location
|
http://feeds.justbet.cx/xml/getLiveFeedSports.asp
|
|
Usage
|
This script should be run using a web browser or anything that can communicate via
the HTTP protocol – POST or GET.
|
|
Input
|
Fourteen optional arguments in the URL query string – all of them can be empty
or zeroes. If not specified, default value will be used.
|
|
sports
|
comma separated list of sports or one sportDefault:
” – empty stringType: list of strings
of up to 20 characters
|
|
leagues
|
comma separated list of leagues or one leagueDefault:
” – empty stringType: list of strings
of up to 12 characters
|
|
periods
|
comma separated list of periods or one periodDefault:
” – empty stringType: list of integers
between 0 and 4
|
|
teamsportsonly
|
either ‘Y’ (yes) or ‘N’ (no) to indicate if to include sports such as Golf and Tennis
in the resultsDefault: ‘Y’Type:
string of up to one character
|
|
graded
|
either ‘N’ (no), ‘Y’ (yes) or ‘B’ (both) to indicate if to not return graded games,
only graded games or both graded and ungraded respectivelyDefault:
‘B’Type: string of up to one character
|
|
popindex
|
either ‘Y’ (yes) or ‘N’ (no) to indicate whether to return the popularity index
or notDefault: ‘N’Type:
string of up to one character
|
|
fromminutes
|
number minutes in future or negative for pastDefault:
0Type: integer
|
|
tominutes
|
number minutes in future or negative for past – must be greater than fromminutes
and if both are zero, date to lookup defaults to onedateDefault:
0Type: integer
|
|
onedate
|
a single date to return line results forDefault:
” – empty string – or current date if no other date related parameters
are specifiedType: date in YYYY-MM-DD format
|
|
begindate
|
an inclusive begin date to return results forDefault:
” – empty stringType: date in YYYY-MM-DD
format
|
|
enddate
|
an inclusive end date to return results forDefault:
” – empty stringType: date in YYYY-MM-DD
format
|
|
orderby
|
‘period desc’ (by period number descending), ‘period asc’ (by period number ascending),
‘popindex desc’ (by popularity index descending), ‘popindex asc’ (by popularity
index ascending), ‘sport desc’ (by sport descending) or ‘sport asc’ (by sport ascending)Default: ‘date asc’Type:
string of up to 12 characters
|
|
limit
|
maximum number of results to return – if zero no limit is specifiedDefault:
0Type: positive integer
|
|
refresh
|
number of seconds to refresh XML data if already exists – minimum is 300 unless
special key parameter is sent as wellDefault: 600
(10 minutes)Type: positive integer
|
|
Notes
|
• All parameters documented here except refresh and orderby are used
to limit the returned list of sports and the information included in the XML
• If parameters aren’t in the required format then their default is used instead
• There are 5 date related parameters: fromminutes, tominutes, begindate,
enddate and onedate but only up to two should be used at a time so
the precedence for their use is as follows:
° If either fromminutes or tominutes or both are specified and they
both aren’t or default to zero and the later is greater than the former then they
are used to determine the dates used to limit the lines
° Otherwise, if both begin date (begindate) and end date (enddate)
are specified and the later is greater or equal to than the former then they are
used instead
° Otherwise, if onedate is specified then this single date is used
° Lastly, if no parameters are specified the onedate parameter defaults to
the current date
• All dates are in the server timezone we use which is PST (GMT -8) or PDT (GMT
-7) depending on if daylight savings time is currently being used
• The popularity index are not all-time-records but pertain only to the scope defined
by your query – also you can only order by this index if you have set popindex=Y
• All parameters that are lists aren’t qualified – that is, they lack any
quotation marks
|
RESPONSE
The response is delivered in
XML format encoded in the
UTF-8 character set with a number of almost self explanatory tags which
are further described below:
NOTE : Errors aren’t reported in the XML itself since we attempt
to handle them internally as much as possible. However, we’d like to improve the
response so that certain common errors are reported so if a fatal error occurs that
prevents the XML from properly being displayed, please let us know.
|
Tag
|
Attributes
|
Description
|
|
livefeedsports
|
root tag – it’s attributes are the non-default parameters used to limit
the results
|
|
paramstr
|
this is used for debugging purposes only – the contents of the tag is the
string used to query the database
|
|
generator
|
by what means was the XML file generated? (currently only two possibilities: ASP
or automated VBS script)
|
|
generated
|
date in which the database was queried and the XML was generated
|
|
subsport
|
one of these for each unique sporttype, league and periodnum
|
|
sporttype
|
the sport
|
|
league
|
the league
|
|
periodnum
|
the number of the period
|
|
perioddesc
|
the name of the period
|
|
linecount
|
the number of lines associated to this sporttype, league and periodnum
|
|
popularity
|
if requested, the popularity for the parent subsport tag
|
|
index
|
the index associated to this line or game – 1 being the most popular (that
is, with most amount of wagers) and as the index increases, less popular
|