MdbV1Client

HTTP client for the Mobility Database Catalog API v1.

Constructors

Link copied to clipboard
constructor(auth: CatalogAuth, baseUrl: String = DefaultBaseUrl, block: HttpClientConfig<*>.() -> Unit = {})

Creates a client that uses the platform default engine.

constructor(engine: HttpClientEngine, auth: CatalogAuth, baseUrl: String = DefaultBaseUrl, block: HttpClientConfig<*>.() -> Unit = {})

Creates a client that uses the given engine.

Types

Link copied to clipboard
object Companion

Named constants for MdbV1Client.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard

Fetches one hosted GTFS dataset.

Link copied to clipboard
suspend fun getFeed(id: FeedId): Result<Feed>

Fetches one feed by catalog id.

Link copied to clipboard
suspend fun getFeeds(query: FeedQuery = FeedQuery()): Result<List<Feed>>

Lists catalog feeds.

Link copied to clipboard
suspend fun getGbfsFeed(id: FeedId): Result<Feed.Gbfs>

Fetches one GBFS feed.

Link copied to clipboard
suspend fun getGbfsFeeds(query: GbfsFeedQuery = GbfsFeedQuery()): Result<List<Feed.Gbfs>>

Lists GBFS feeds.

Link copied to clipboard
suspend fun getGtfsFeed(id: FeedId): Result<Feed.Gtfs>

Fetches one GTFS feed.

Link copied to clipboard

Returns historical availability checks for a GTFS feed.

Link copied to clipboard
suspend fun getGtfsFeedDatasets(id: FeedId, query: DatasetQuery = DatasetQuery()): Result<List<GtfsDataset>>

Lists datasets for a GTFS feed, newest first.

Link copied to clipboard

Lists GTFS Realtime feeds related to a GTFS feed.

Link copied to clipboard

Returns the Seal of Reliability breakdown for a GTFS feed.

Link copied to clipboard
suspend fun getGtfsFeeds(query: GtfsFeedQuery = GtfsFeedQuery()): Result<List<Feed.Gtfs>>

Lists GTFS feeds.

Link copied to clipboard

Fetches one GTFS Realtime feed.

Link copied to clipboard
suspend fun getGtfsRtFeeds(query: GtfsRtFeedQuery = GtfsRtFeedQuery()): Result<List<Feed.GtfsRt>>

Lists GTFS Realtime feeds.

Link copied to clipboard

Fetches one license, including its rules.

Link copied to clipboard
suspend fun getLicenses(query: LicenseQuery = LicenseQuery()): Result<List<License>>

Lists licenses.

Link copied to clipboard
suspend fun getLocations(query: LocationQuery = LocationQuery()): Result<LocationSearchResponse>

Searches catalog locations.

Link copied to clipboard

Resolves a license URL to catalog licenses.

Link copied to clipboard
suspend fun getMetadata(): Result<Metadata>

Fetches API process metadata.

Link copied to clipboard
suspend fun searchFeeds(query: SearchFeedsQuery = SearchFeedsQuery()): Result<SearchFeedsResponse>

Full-text search over feeds.