- GetPlayerDataByPIN : this function returns a JSON structure containing the data of the player referred by the PIN. You can invoke it directly :
https://www.europeangodatabase.eu/EGD/GetPlayerDataByPIN.php?pin=12098053
- GetPlayerDataByData : this function, much more interesting, returns a JSON structure containing an array of all the players who match the request.
You must specify at least 2 characters of the last name, and the system will look for all the players whose last name contains the given string.
You can optionally search for players whose last name starts with the given string, instead of looking into the whole name. To achieve this, you have to type a
"@" as the first character.
(e.g.: "@pod" matches Podavini, but not Hospodar, while "pod" matches both)
Besides the last name, you can also give additional parameters: name, country and club. For instance:https://www.europeangodatabase.eu/EGD/GetPlayerDataByData.php?lastname=poda&name=an
EGD will add to the HTTP response a specific header in order to tell the browsers to accept to load data coming from these services.
This takes away the need to write server-side proxies and makes the use of these services extremely simple and straightforward.
Live example
To see the services in action, look at the example below; try typing some letters in the last name field, and see what happens: after the third letter, a combo appears with the list of all the players (if any) whose last names match the string typed in. Adding more letters, the search is dinamically refined. Select one of the entries clicking on it, and all the other fields will be automagically filled :