GofsV1Client

HTTP client for fetching GOFS v1 feeds.

Constructors

Link copied to clipboard
constructor(block: HttpClientConfig<*>.() -> Unit = {})
constructor(engine: HttpClientEngine, block: HttpClientConfig<*>.() -> Unit = {})

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
context(service: Service)
suspend fun getBookingRules(): GofsFeedResponse<BookingRules>

Fetches booking rules for the service.

Link copied to clipboard
context(service: Service)
suspend fun getCalendars(): GofsFeedResponse<Calendars>

Fetches calendar definitions for service availability.

Link copied to clipboard
context(service: Service)
suspend fun getFares(): GofsFeedResponse<Fares>

Fetches fare structures and pricing information.

Link copied to clipboard
context(service: Service)
suspend fun getOperatingRules(): GofsFeedResponse<OperatingRules>

Fetches operating rules governing the service.

Link copied to clipboard
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>

Fetches real-time booking information.

Link copied to clipboard
context(service: Service)
suspend fun getServiceBrands(): GofsFeedResponse<ServiceBrands>

Fetches information about service brands used in the system.

Link copied to clipboard

Fetches system information including name, operator, timezone, and contact details.

Link copied to clipboard

Fetches the GOFS manifest (auto-discovery file) from the given URL.

Link copied to clipboard
context(service: Service)
suspend fun getVehicleTypes(): GofsFeedResponse<VehicleTypes>

Fetches information about vehicle types available in the system.

Link copied to clipboard

Fetches the list of GOFS versions supported by this system.

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

Fetches wait time information for services.

Link copied to clipboard
context(service: Service)
suspend fun getZones(): GofsFeedResponse<Zones>

Fetches zone definitions where services operate.