Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • chartText(curVar: string): string
  • Changes second word in a weather variable to lower case if present so that the second word is not capitalised in a sentence. For example, the weather variable 'Wind Direction' would be changed to 'Wind direction'.

    Parameters

    • curVar: string

      The weather variable to be changed.

    Returns string

    The converted string.

  • csrfToken(): string
  • Obtains the CSRF token with the key XSRF-TOKEN from the stored cookie.

    Returns string

    The CSRF toke.

  • locationPutObject(locationName: string, longitude: string, latitude: string): Record<string, unknown>
  • Creates put options with a GeoJSON representation of the location in the body.

    Parameters

    • locationName: string

      The name of the location to be put to the server.

    • longitude: string

      The longitute coordinate of the location.

    • latitude: string

      The latitude coordinate of the location.

    Returns Record<string, unknown>

    The put options create, which include a X-XSRF-TOKEN header for the CSRF token.

  • problemConnecting(): void
  • Displays a message to te user that there was a problem connecting to the server.

    Returns void

  • today(): string
  • Cretes a string for tomorros's date.

    Returns string

    Tomorrow's date formatted in terms of day of the month, month, and year.

  • tomorrow(): string
  • Cretes a string for tomorrow's date.

    Returns string

    Tomorrow's date formatted in terms of day of the month, month, and year.

  • varMapping(varCur: string): string
  • Converts a weather variable that may be selected by the user to a mapping suffix for an endpoint on the server. The initial character of the weather variable is changed to lower case and words are concatenated. For example, 'Wind Direction' is converted to 'windDirection'.

    Parameters

    • varCur: string

      The weather variable.

    Returns string

    The converted string.

Generated using TypeDoc