Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/elliotwutingfeng/train_arrival

Extract train arrival information from the SMRT Train Arrival Information API.
https://github.com/elliotwutingfeng/train_arrival

api arrival arrival-times estimated-time-of-arrival eta metro mrt rail singapore smrt subway train trip-planning

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

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

```python
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](LICENSE) for your use of this application.

## Credits

- [RailRouter SG](https://github.com/cheeaun/railrouter-sg) for information on accessing the SMRT API.
- Logo modified from public domain vector at [svgrepo.com](https://www.svgrepo.com/svg/63666/singapore-metro-logo).