def _populateActivity(self, rawRecord):
        ''' Populate the 1st level of the activity object with all details required for UID from  API data '''
        activity = UploadedActivity()
        activity.StartTime = dateutil.parser.parse(rawRecord["start"])
        activity.EndTime = activity.StartTime + timedelta(seconds=rawRecord["duration"])
        activity.Stats.Distance = ActivityStatistic(ActivityStatisticUnit.Meters, value=rawRecord["distance"])
        activity.GPS = rawRecord["hasGps"]
        activity.Stationary = not rawRecord["hasGps"]
        activity.CalculateUID()
        return activity
 Populate the 1st level of the activity object with all details required for UID from  API data 
tapiriik/services/TrainAsONE/trainasone.py