Giter Site home page Giter Site logo

elliotwutingfeng / train_arrival Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 46 KB

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

License: MIT License

Python 100.00%
api arrival arrival-times estimated-time-of-arrival eta metro mrt rail singapore smrt

train_arrival's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.