Class User

A class representing a Parkrun User.

Hierarchy

Constructors

Properties

_core: Parkrun

Methods

  • Get the URL for the user's avatar.

    Returns

    URL

    Returns string

  • Get the user's club name

    Returns

    club name

    Returns string

  • Get the user's first name

    Returns

    first name

    Returns any

  • Gets the user's full name.

    Returns

    full name

    Returns string

  • Get the user's Parkrun Clubs (for milestone runs / duties)

    See

    if you want data from only a single club.

    Throws

    ParkrunJS Networking Error.

    Throws

    Error when no data is available, usually because of a new account with no runs.

    Example


    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 }
    ]

    Returns Promise<{ type: ClubType; club: Club }[]>

Generated using TypeDoc