getRealtimeBookings

context(service: Service)
suspend fun getRealtimeBookings(pickupLat: Double, pickupLon: Double, dropOffLat: Double? = null, dropOffLon: Double? = null, brandIds: List<String> = emptyList(), pickupAddress: String? = null, dropOffAddress: String? = null): GofsFeedResponse<RealtimeBookings>(source)

Fetches real-time booking information.

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

Optionally, full addresses for pickup and drop-off locations can be provided. so that the addresses do not get lost during reverse geocoding.

Return

Response containing real-time booking information

Parameters

service

The GOFS service containing feed URLs

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)

pickupAddress

Full address where the user will be picked up (optional)

dropOffAddress

Full address where the user will be dropped off (optional)