Skip to content

Mapping group in get_endurance_score() #321

@Taxuspt

Description

@Taxuspt

The get_endurance_score method returns a structure like:

{'userProfilePK': 1111111,
 'startDate': '2026-01-01',
 'endDate': '2026-01-28',
 'avg': 5642,
 'max': 5740,
 'groupMap': {'2026-01-01': {'groupAverage': 5558,
   'groupMax': 5587,
   'enduranceContributorDTOList': [{'activityTypeId': 3,
     'group': None,
     'contribution': 8.692857},
    {'activityTypeId': 3, 'group': None, 'contribution': 7.057143},
    {'activityTypeId': None, 'group': 0, 'contribution': 85.68428},
    {'activityTypeId': None, 'group': 1, 'contribution': 2.4385715},
    {'activityTypeId': None, 'group': 8, 'contribution': 3.9199998}]},
(...)

The activityTypeId can be mapped using the activity type mapping returned by get_activity_types() however I'm not being able to find a way to map group to an activity type or an activity group. E.g. Trail Running and Treadmill running will be mapped to the same group, but I need a way to get those groups.
Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions