VehicleApi

class VehicleApi(authProvider: AuthProvider, sharedClient: HttpClient? = null) : Closeable

Client for the VW BFF vehicle data endpoints.

Provides read access to the vehicle list and per-vehicle selective status. All calls automatically retry once on a 401 by refreshing the bearer token.

Parameters

authProvider

supplies valid OAuth tokens

sharedClient

optional HttpClient -- if null, an internal client is created and owned by this instance

Constructors

Link copied to clipboard
constructor(authProvider: AuthProvider, sharedClient: HttpClient? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
suspend fun getStatus(vin: String): VehicleStatus

Fetches the selective status for a vehicle (battery, charging, climate, access, parking, etc.).

Link copied to clipboard
suspend fun listVehicles(): List<Vehicle>

Returns all vehicles registered under the authenticated account.