Stop

Dublin Bus API

Access to the Real Time Passenger Information (RTPI) for Dublin Bus services.

The API are focused on retrieving bus stop and timetables

Disclaimer

This service is in no way affiliated with Dublin Bus or the providers of the RTPI service.

Data are retrieved parsing the still-in-development RTPI site. As with any website scraping the html could change without notice and break the API.

Rtpi.ie html parsing work as {2015, 9, 4}

Test

Parsing function are tested both against fixture and the actual website, this could lead to failing test if an internet connection is missing. It also could find if something has changed in the rtpi.ie website html.

Run

mix Test
Source

Summary

get_info(id)

Return the requested Stop

last_time_checked()

Return the last time it was checked that the html parsing is still working

search(query)

Return a list of Stop matching the query provided

Types

row :: %Stop.Row{line: String.t, direction: String.t, time: String.t}

A struct that represent a row in a bus stop timetable, time could be an absolute (16:13) or relative time (5m).

stop :: %Stop{name: String.t, ref: String.t, lines: [String.t], timetable: [row]}

A struct that represent a single stop, it could contain the timetable or the lines that serve the stop.

name and ref are always available

Functions

get_info(id)

Specs:

Return the requested Stop

Source
last_time_checked()

Return the last time it was checked that the html parsing is still working

Source
search(query)

Specs:

Return a list of Stop matching the query provided

Source