An open API service indexing awesome lists of open source software.

https://github.com/christian-draeger/mobilitybox-kt

A kotlin client for https://themobilitybox.com
https://github.com/christian-draeger/mobilitybox-kt

Last synced: 3 months ago
JSON representation

A kotlin client for https://themobilitybox.com

Awesome Lists containing this project

README

          

# Mobilitybox Kotlin Client
A Kotlin client implementation for the [mobilitybox](https://developer.themobilitybox.com) API.

## Installation

### Gradle
```kotlin
implementation("io.github.christian-draeger:mobilitybox-kt:0.1.0")
```

### Maven
```xml

io.github.christian-draeger
mobilitybox-kt
0.1.0

```

## Usage
### Search for Stations
```kotlin
val response = mobilitybox(apiKey = "your-api-key") {
stations {
searchByName("gransee")
// or
searchById("...")
// or
searchByPosition(GeoPosition(.0, .0))
}
}
```

### Get Departures
```kotlin
val response = mobilitybox(apiKey = "your-api-key") {
departures {
get("vesputi-station-OW_67U4PIKCwCBxtnNWwZ2jnsNS2WZA1eNY9MyjyvKs")
}
}
```