Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StravaActivityDataDTO

label

STRAVA

description

This class defines the fields and methods of an activity as defined by the Strava API.

The fields of this class take values as defined in the Strava documentation for the DetailedActivity model, see below for a link to the fields documentation.

Note that we do not extract and interpret all fields that are shared by Strava.

link

https://developers.strava.com/docs/reference/#api-models-DetailedActivity

since

v0.4.0

Hierarchy

Index

Constructors

Properties

calories: number

The number of kilocalories consumed during this activity. This field is filled only for activities with a high-enough intensity.

Note that this field contains a number of kilocalories.

access

public

var

{number}

columns: string[] = ...

The column names as they are represented in the backend runtime database for activities.activityData documents.

Note that the fields listed here will be stored in documents.

access

public

readonly
var

{string[]}

distance: number

The total distance covered with this activity. This represents the total number of meters covered.

Note that this field contains a number of meters.

access

public

var

{number}

elapsedTime: number

The total number of seconds elapsed for completion of this activity. This represents the time that was necessary to complete the activity from begin to end (including breaks).

Note that this field contains a number of seconds.

access

public

var

{number}

elevation: number

The total elevation gain with this activity. This represents the total number of meters that were "climbed" during the execution of the activity.

Note that this field contains a number of meters.

access

public

var

{number}

endLocation: number[]

A geolocation pair of latitude/longitude expressed in an array of float numbers which represents the end location of an activity.

If the end-user disables sharing of geolocation, this field will contain an empty array.

link

https://developers.strava.com/docs/reference/#api-models-LatLng

access

public

var

{number[]}

hasTrainerDevice: boolean

Whether this activity was recorded on a training maching (device).

access

public

var

{boolean}

isManual: boolean

Determines whether the activity was crafted by hand or if it is the result of an actual activity.

Note that manual activities are not considered for payouts.

access

public

var

{boolean}

kilojoules: number

The total work done in kilojoules during this activity. This field is filled only for rides.

Note that this field contains a number of kilojoules.

access

public

var

{number}

movingTime: number

The total number of seconds during which the end-user has been moving during execution of this activity. This represents the time during which some movement(s) were recorded.

Note that this field contains a number of seconds.

access

public

var

{number}

name: string

The name of the activity.

access

public

var

{string}

sport: string

A text value that determines the type of sport.

link

https://developers.strava.com/docs/reference/#api-models-SportType

access

public

var

{string}

startLocation: number[]

A geolocation pair of latitude/longitude expressed in an array of float numbers which represents the start location of an activity.

If the end-user disables sharing of geolocation, this field will contain an empty array.

link

https://developers.strava.com/docs/reference/#api-models-LatLng

access

public

var

{number[]}

startedAt: number

The time at which the activity was started, expressed in milliseconds since the UTC epoch.

access

public

var

{number}

sufferScore: number

The suffer score attributed to this activity by Strava. We store a copy of this value so that we can evaluate its usage in our formulas.

Note that this field is sometimes null when received from Strava, in those cases this field is set to -1.

access

public

var

{sufferScore}

timezone: string

The local timezone used during completion of this activity. This is the timezone of the end-user and can be used to format startedAt accordingly.

access

public

var

{string}

type: OAuthEntityType = OAuthEntityType.Activity

The type of entity represented in this object.

access

public

var

{OAuthEntityType}

Methods

  • toDocument(): ObjectLiteral
  • This method shall extract an entity's definition (field values) from an API response object.

    In the implementation below, the right-hand-side values use the field names as defined by the data provider and the left-hand-side values use the field names as defined by the runtime database.

    This method is a requirement defined in OAuthEntity.

    access

    public

    static

    Parameters

    • data: any

      The data field of the API Response (contains the entity columns).

    Returns StravaActivityDataDTO

    The extracted object literal that contains the entity columns.

Generated using TypeDoc