Skip to content
A simple Kotlin wrapper for LUAS timetables API, a tram/light rail system in Dublin.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
misc
src
.editorconfig
.gitignore
.travis.yml
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

Build Status codecov

LUAS API

A simple Kotlin/Java library for LUAS timetables.

How to use it

Add the JitPack repository to your root build.gradle file:

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}

Then add the following to your dependencies block:

implementation 'com.github.tslamic:luas-api:0.1.2'

Examples

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.
You can’t perform that action at this time.