These PHP scripts create desired views of Tourneopal API (http://spl.torneopal.fi/taso/rest/help). The main interest is to create pages to be shown with Yodeck info screen system.
To access the API you need to get a key and set it at settings.php
(see settings.php.sample
).
First you need to find out the ids of your field(s). Start by setting $ALLOW_DEBUG
as true
in
settings.php
.
- Find your district by getting
debug.php?f=getDistricts
. Note thedistrict
of your district (a string, e.g.splhelsinki
). - Find one club which plays in your venue by getting
debug.php?f=getClubs&district=splhelsinki
. Note theclub_id
(an integer, e.g.5
). - Get the venue ID by searching with your
district
andclub_id
:debug.php?f=getVenues&district=splhelsinki&club_id=5
. Note thevenue_id
of your field(s) (an integer, e.g.355
,2673
,2674
). - Try to make a search of matches with your
venue_id
:debug.php?f=getMatches&venue_id=355
. You can combine several venue IDs with commas (355,2673,2674
). If your venue IDs appear to be OK you can enter the IDs tosettings.php
,$API_PARAMETERS->venues
.
Don't forget to set $ALLOW_DEBUG
as false
in settings.php
to avoid unwanted use of API with your key.
Get screen.php
with following parameters:
f
, currently the only implemented function isgetMatches
limit
, set maximum number of games (defaults to 5)nopassed
, 1 = don't show games which have passed. By defaultgetMatches
shows all games from the current day.
Examples:
screen.php?f=getMatches&limit=10
Shows 10 matches todayscreen.php?f=getMatches&nopassed=1
Shows 5 matches but skip those which have passed