Sports Lib API - v21.3.0
    Preparing search index...

    Class SportsLib

    Primary facade for importing activities and routes, exporting route files, and restoring Sports Lib's native JSON representation.

    Index

    Constructors

    Methods

    • Converts a FIT course file to a GPX route file.

      Parameters

      Returns Promise<string>

    • Converts a GPX route file to a FIT course file.

      Parameters

      • gpxString: string
      • OptionaldomParser: any

        custom DOMParser (case of NodeJs usage)

      • Optionaloptions: RouteParsingOptions

      Returns Promise<ArrayBuffer>

    • Restores an event from Sports Lib's native JSON format.

      Explicit stats are preserved except terrain summaries excluded for Diving activities. Missing pace, swim-pace, and grade-adjusted-pace summaries are hydrated from compatible speed summaries on the event, its activities, and their laps.

      Parameters

      Returns EventInterface

      The restored event with canonical stat keys and additive speed-derived summaries.