User Tools

Site Tools


coplayers

/igg/coplayers

Retreive a list of possible co-players to book a teetime. When the user has entered a name or part of a name, you should request a list of people with that name that are a member at the same course as the player is. The list will only contain people that have not set the “privacy” check box (see /igg/login). If the user himself has set the privacy checkbox a message will be returned.

You can also use this interface to retrieve a list of friends byspecifying the friendsyn parameter or a list of people the user has played with in the past 1.5 years.

If you are editting an existing booking you need to specify the fltnr parameter. This will make sure the current golfers in the booking are also included in the resultset. This will make sure the user can reselect the current golfers in the teebooking when editing it.

The user should be encouraged to click one of the names in the list. It is also possible to just type the name and not select someone from the list, but the golfcourses are not pleased with that, because they will need to change the booking manually.

parameters:

auth the authorisation code you received from Intogolf BV (mandatory)
relnr client id of the user that is making the booking (mandatory)
relkey the hash key that was provided upon login (mandatory if relnr>0)
search name or part of the name to search (it is good practise to filter out any name prefixes beforehand (van der))
friendsyn 1 = include friends in the resultset
historyyn 1 = include golfer the user has played with in the past 1.5 years
fltnr include the current golfers in this tee booking
lng 1 english 2 dutch (default 2 if parameter is omitted)

Please note that the relnr parameter is mandatory, this means that the user that is making the booking should have logged in by now.

You can combine the parameters friendsyn, historyyn, fltnr and search to get a full list of all possible co-players

example: https://backend.ikgagolfen.nl/igg/coplayers?auth=<your authorisation code>&relnr=707025&search=Boe&historyyn=1&friendsyn=1&fltnr=4523568

result:

{
  "coplayers": [
    {
      "type": 3,
      "relnr": 305464,
      "descr": "Dhr. Wil Adriaans"
    },
    {
      "type": 1,
      "relnr": 311826,
      "descr": "Mevr. Lucy Boele - de Vries"
    },
    {
      "type": 1,
      "relnr": 311835,
      "descr": "Dhr. Frans Boer"
    },
    {
      "type": 1,
      "relnr": 311827,
      "descr": "Dhr. Johann de Boer"
    },
    {
      "type": 1,
      "relnr": 311828,
      "descr": "Mevr. Derthie de Boer - Schimmel (mel)"
    },
    {
      "type": 1,
      "relnr": 560051,
      "descr": "Mevr. Dianne Boer - van de Meulengraaf"
    },
    {
      "type": 1,
      "relnr": 664116,
      "descr": "Mevr. Liesbeth Boer - van Oss"
    },
    {
      "type": 1,
      "relnr": 604725,
      "descr": "Mevr. LOES Boermans"
    },
    {
      "type": 3,
      "relnr": 659095,
      "descr": "Dhr. Ton Boertien"
    },
    {
      "type": 3,
      "relnr": 553222,
      "descr": "Dhr. Dipankar Ray"
    },
    {
      "type": 2,
      "relnr": 689861,
      "descr": "Dhr. Wil Scheffers"
    },
    {
      "type": 4,
      "relnr": 312978,
      "descr": "Mevr. Adje Wildenberg - Cantrijn"
    }
  ]
}
type 1 result of search
2 in history
3 in friends list
4 in current tee booking

if someone is for instance both on the friends list and in the history, he will be returned only once with the max value for type. The resultset is always ordered alphabetically on last name.

If the user has switched on the “privacy” option you will receive this:

coplayers.txt · Last modified: 2012/12/14 15:37 (external edit)