getWaitTimes

context(service: Service)
suspend fun getWaitTimes(pickupLat: Double, pickupLon: Double, dropOffLat: Double? = null, dropOffLon: Double? = null, brandIds: List<String> = emptyList()): Result<GofsFeedResponse<WaitTimes>>(source)

Fetches wait time information for services.

If either dropOffLat or dropOffLon is provided, both must be provided.

Return

Result wrapping response containing wait time information, or an error

Context Parameters

service

The GOFS service containing feed URLs

Parameters

pickupLat

Latitude where the user will be picked up

pickupLon

Longitude where the user will be picked up

dropOffLat

Latitude where the user will be dropped off (optional)

dropOffLon

Longitude where the user will be dropped off (optional)

brandIds

List of brand IDs to filter wait times (optional)