Options
All
  • Public
  • Public/Protected
  • All
Menu

SDK class that expose the Connected Drive API.

Note that login() does not need to be called explicitly. The SDK will lazily call login() to (re)authenticate when necessary.

Type parameters

  • Test: boolean = false

Hierarchy

  • ConnectedDrive

Index

Constructors

  • new ConnectedDrive<Test>(username: string, password: string, configuration?: DeepPartial<Configuration<Test>>): ConnectedDrive<Test>
  • The generic type parameter should be either omitted or false in production.

    Type parameters

    • Test: boolean = false

    Parameters

    • username: string
    • password: string
    • Optional configuration: DeepPartial<Configuration<Test>>

    Returns ConnectedDrive<Test>

Methods

  • executeRemoteService(vehicleVin: string, service: RemoteService): Promise<void>
  • Execute a Connected Drive remote service. This may throw if:

    • specified vin isn't registered on the user
    • remote services aren't activated on the car
    • the car isn't online
    • the car-user relation hasn't been confirmed
    • the remote service takes too long time to complete. Default timeout 1 min.
    • if a new remote service command is sent to the car before this action has completed.

    Parameters

    Returns Promise<void>

  • getStatusOfAllVehicles(): Promise<GetStatusOfAllVehiclesResponse>
  • Returns a list of vehicles detailing their connectivity and Connected Drive service status.

    Returns Promise<GetStatusOfAllVehiclesResponse>

  • getVehicleDetails(vehicleVin: string): Promise<GetVehicleDetails>
  • Returns details describing the Connected Drive services supported by the vehicle.

    Parameters

    • vehicleVin: string

    Returns Promise<GetVehicleDetails>

  • getVehicleTechnicalDetails(vehicleVin: string): Promise<GetTechnicalVehicleDetails>
  • Returns technical details of the vehicle such as milage, fuel reserve and service messages.

    Parameters

    • vehicleVin: string

    Returns Promise<GetTechnicalVehicleDetails>

  • getVehicles(): Promise<GetVehiclesResponse>
  • Returns a list specifying the physical configuration of vehicles.

    Returns Promise<GetVehiclesResponse>

  • login(): Promise<void>
  • Authenticate with the Connected Drive API and store the resulting access_token on 'this'. This function is also called lazily by the SDK when necessary.

    Returns Promise<void>