Skip to content

elliotwutingfeng/train_arrival

Repository files navigation

Train Arrival

Train

Extract train arrival information from the SMRT Train Arrival Information API.

Output format: JSON string

Python

MIT license Coveralls

Disclaimer: This project is not sponsored, endorsed, or otherwise affiliated with SMRT Corporation.

Requirements

Python 2.7+/3.2.6+

Usage

get_all_station_info()
"""
'{"count": 166, "next": null, "previous": null, "results": [{"name": "Admiralty", "code": "NS10", ...'
"""

get_all_station_names()
"""
['Admiralty',
 'Aljunied',
 'Ang Mo Kio',
 'Bakau',
 ...
]
"""

get_train_arrival_time_by_id("Paya Lebar")
"""
'{"results":[{"status":1,"platform_ID":"CPYL_A","code":"CC9,EW8","next_train_arr":"7","mrt":"Paya Lebar", ...'
"""

get_all_train_arrival_time()
"""
'{"Admiralty": {"results": [{"status": 1, "platform_ID": "ADM_A", "code": "NS10", "next_train_arr": "6", ...'
"""

Warning

  • This API appears not to be intended by SMRT for public use. You are solely responsible for your use of this application.

Credits

About

Extract train arrival information from the SMRT Train Arrival Information API.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages