public function createWorkout(Workout $workout)
    {
        $response = $this->request(self::CREATE_WORKOUT_ENDPOINT, [
            'workoutId' => '-' . $this->bigRandomNumber(16),
            'duration' => $workout->getDuration(),
            'sport' => $workout->getTypeId(),
            'extendedResponse' => 'true',
            'gzip' => 'true',
        ], $workout->getPointsAsString());

        if (!isset($response['workout.id'])) {
            throw new EndomondoApiOldException('Workout create failed.');
        }

        $workout->setId($response['workout.id']);

        return $this->updateWorkout($workout);
    }