Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/elliotwutingfeng/train_arrival
- Owner: elliotwutingfeng
- License: mit
- Created: 2023-12-21T05:58:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-19T03:40:43.000Z (10 months ago)
- Last Synced: 2024-02-19T04:38:52.174Z (10 months ago)
- Topics: api, arrival, arrival-times, estimated-time-of-arrival, eta, metro, mrt, rail, singapore, smrt, subway, train, trip-planning
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Train Arrival
Extract train arrival information from the SMRT Train Arrival Information API.
Output format: JSON string
**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).