Gets the mobile number for the currently logged-in user.
mobile number
ParkrunDataNotAvailableError Error when no data is available, usually because of a new account with no runs.
Get an array of all the user's freedom runs.
ParkrunNetError ParkrunJS Networking Error.
Create a new freedom run, given the event number, run year, month, day and time of completion.
Please note that Freedom Runs CANNOT be deleted.
The newly created Freedom Run ID.
ParkrunNetError ParkrunJS Networking Error.
Error Input data error.
const user = [...]
await user.createFreedomRun(953, "2020", "02", "15", "00:15:45")
// example output - 166164059
The year of the run (4 digits)
The month of the run. (2 digits)
The day of the run. (2 digits)
The time of the run (hh:mm:ss)
Get the user's Parkrun Clubs (for milestone runs / duties)
if you want data from only a single club.
ParkrunJS Networking Error.
Error when no data is available, usually because of a new account with no runs.
const user = .....
await user.getClubs()
// Example Response:
[
{ type: ClubType.ADULT, club: Clubs.TWO_HUNDRED_AND_FIFTY },
{ type: ClubType.JUNIOR, club: Clubs.NONE },
{ type: ClubType.VOLUNTEER, club: Clubs.TWENTY_FIVE }
]
Get an array of Event objects for each parkrun that the athlete has run, in alphabetical order.
(Borrows from getAthleteParkruns)
ParkrunNetError ParkrunJS Networking Error.
Protected
Readonly
_coreGenerated using TypeDoc
A class representing the currently-logged in user.