GbfsV2Client

HTTP client for fetching GBFS v2 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 getFreeBikeStatus(): GbfsFeedResponse<FreeBikeStatus>

Fetches real-time status of free-floating vehicles not currently docked.

Link copied to clipboard

Fetches geofencing zones that define geographic restrictions.

Link copied to clipboard

Fetches static information about stations in the system.

Link copied to clipboard
context(service: Service)
suspend fun getStationStatus(): GbfsFeedResponse<StationStatus>

Fetches real-time status of stations including available bikes and docks.

Link copied to clipboard
context(service: Service)
suspend fun getSystemAlerts(): GbfsFeedResponse<SystemAlerts>

Fetches current system alerts about service disruptions or changes.

Link copied to clipboard
context(service: Service)
suspend fun getSystemCalendar(): GbfsFeedResponse<SystemCalendar>

Fetches the operating calendar for seasonal systems.

Link copied to clipboard
context(service: Service)
suspend fun getSystemHours(): GbfsFeedResponse<SystemHours>

Fetches hours of operation for the system.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Fetches pricing plans for the system.

Link copied to clipboard
context(service: Service)
suspend fun getSystemRegions(): GbfsFeedResponse<SystemRegions>

Fetches information about geographic regions in the system.

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

Fetches information about vehicle types available in the system.

Link copied to clipboard

Fetches the list of GBFS versions supported by this system.