All calls take the same second parameter - postOptions. This is a JS object that sets up CORS so that your
code may access the API.
{
method: 'POST',
mode: 'cors',
body: JSON.stringify({}), // see each call on what properties are valid for that call
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json;charset=utf-8'
}
}
members
This is analogous to the membersData() call in v1 of the API. It returns an array of details about the requested members. The
information returned hasn't been massaged in the way that it has in v1, direction is simply zero or one for example rather than
"CW" or "ACW", the given name, family name and deceased information aren't combined into one value.
The body of the options object takes the following properties.
{
members: [],
// An array of comma separated membership numbers.
name:,
// The surname of a member or members. Only needs to be three letters or more.
club: ,
// A club name. Only needs to be a minimum of three letters.
year: -1,
// A particular year. Choose a decade by just entering the first three digits.
columns: []
// (optional) An array of column names.
// If not specified returns the full set of columns.
}
Information returned
{
gn: // given name
fn: // family name.
died: // year of death
orig: // For second rounds this is the original membership number.
season: // 0 (summer), 1 (winter) or 2 (mid-winter).
opt: // 0 (SM -> HR), 1 (HR -> SM)
dir: // 0 (clockwise) or 1 (anti-clockwise)
weekNum: // the ISO week number in which the round took place
age: // their age on the day that they did their round.
gender: // Male or Female.
date: // the date of their round.
time: // the time taken to do the round.
record: // rounds that were part of the progression of the record.
lr: // rounds that were part of the progression of the women's record.
nationality: // obvious
club: // obvious. Note that this is the club the person belonged to when they did the round,
// we don't monitor changes to club membership.
prev: // The number of previous attempts (only since 2014)
postcode: // The first part of the postcode before the space.
}
assists
This call returns how an individual has helped other members.
The body of the options object takes the following properties.
{
members: [],
// An array of comma separated membership numbers.
columns: []
// (optional) An array of column names.
// If not specified returns the full set of columns.
}
Information returned
The data returned consists of an array of objects containing the following fields:
{
name: // full name
mem_num: // membership number
leg_one: // the number to times help has been provided on each leg.
leg_two:
leg_three:
leg_four:
leg_five:
road: // the number of times help provided at road crossings.
total: // total number of members helped
assists: // a space separated list of membership numbers helped by the individual
}
Note that “total” isn’t the sum of legs one to five but the number of individuals helped. If someone has paced legs
one and two for just one person then leg_one = 1, leg_two = 1, total = 1.
Also note that if someone hasn't helped on other rounds then the function will return “undefined” rather than zero for them. You
might wish to clean this up. See the example at the foot of the page.
The body of the options object takes the following properties.
{
member: ,
// The membership number of the person you are interested in.
columns: []
// (optional) An array of column names.
// If not specified returns the full set of columns.
}
Information returned
The data returned consists of an array of objects containing the following fields:
{
name: // full name
mem_num: // membership number
leg_one: // the number to times help has been provided on each leg.
leg_two:
leg_three:
leg_four:
leg_five:
road: // the number of times help provided at road crossings.
total: // total number of members helped
assists: // a space separated list of membership numbers helped by the individual
}
Note that “total” isn’t the sum of legs one to five but the number of individuals helped. If someone has paced legs
one and two for just one person then leg_one = 1, leg_two = 1, total = 1.
Also note that if someone hasn't helped on other rounds then the function will return “undefined” rather than zero for them. You
might wish to clean this up. See the example at the foot of the page.