https://github.com/tslamic/luas-api
A simple Kotlin wrapper for LUAS timetables API, a tram/light rail system in Dublin.
https://github.com/tslamic/luas-api
api dublin ireland java kotlin luas timetable
Last synced: 3 months ago
JSON representation
A simple Kotlin wrapper for LUAS timetables API, a tram/light rail system in Dublin.
- Host: GitHub
- URL: https://github.com/tslamic/luas-api
- Owner: tslamic
- Created: 2018-08-14T11:29:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T07:18:38.000Z (over 6 years ago)
- Last Synced: 2025-01-03T16:49:45.969Z (5 months ago)
- Topics: api, dublin, ireland, java, kotlin, luas, timetable
- Language: Kotlin
- Size: 72.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/tslamic/luas-api)
[](https://codecov.io/gh/tslamic/luas-api)# LUAS API
A simple Kotlin/Java library for [LUAS](https://www.luas.ie/) timetables.
## How to use it
Add the JitPack repository to your root `build.gradle` file:
```groovy
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```Then add the following to your `dependencies` block:
```groovy
implementation 'com.github.tslamic:luas-api:0.1.2'
```## Examples
```kotlin
val api = LuasApi()// Get LUAS lines and its corresponding stops
api.lines()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{ showLines(it) },
{ showError(it) }
)
// Show a forecast for the e.g. Sandyford stop.
api.forecast("SAN")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{ showForecast(it) },
{ showError(it) }
)
```## License
Copyright 2018 Tadej Slamic
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.