Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/iamgyz/tra-timetable

台鐵時刻查詢微服務@now.sh
https://github.com/iamgyz/tra-timetable

js node now railway zeit

Last synced: 17 days ago
JSON representation

台鐵時刻查詢微服務@now.sh

Awesome Lists containing this project

README

        

# TRA TimeTable micro service
[![Build Status](https://travis-ci.org/iamgyz/tra-timetable.svg?branch=master)](https://travis-ci.org/iamgyz/tra-timetable)

A simple serverless function host on now.sh, provide timetable information from TRA.

台鐵時刻查詢2019最新版,查詢起訖站從當前到23:59的所有車次

# Usage
Request
```
https://tra.now.sh/?s=台北&e=台中
s=起站
e=迄站
```
Response
```json
{"status":"ok","data":[["自強135","15:00","17:13","2 小時 13 分","山線","詳細","$ 375","$ 188"],["區間2223","15:14","18:33","3 小時 19 分","山線","詳細","$ 241","$ 121"],["普悠瑪273","15:45","17:23","1 小時 38 分","山線","詳細","$ 375","$ 188"],["自強175","16:00","18:13","2 小時 13 分","山線","詳細","$ 375","$ 188"],["區間2233","16:10","19:24","3 小時 14 分","山線","詳細","$ 241","$ 121"],["自強139","17:00","19:13","2 小時 13 分","山線","詳細","$ 375","$ 188"],["區間2243","17:04","20:15","3 小時 11 分","山線","詳細","$ 241","$ 121"],["自強141","17:30","19:46","2 小時 16 分","山線","詳細","$ 375","$ 188"],["自強177","17:50","20:18","2 小時 28 分","山線","詳細","$ 375","$ 188"],["區間2253","17:54","21:20","3 小時 26 分","山線","詳細","$ 241","$ 121"],["自強143","18:00","19:54","1 小時 54 分","山線","詳細","$ 375","$ 188"],["自強147","18:42","21:03","2 小時 21 分","山線","詳細","$ 375","$ 188"],["區間2263","18:49","22:20","3 小時 31 分","山線","詳細","$ 241","$ 121"],["自強149","19:00","21:14","2 小時 14 分","山線","詳細","$ 375","$ 188"],["自強181","19:30","21:40","2 小時 10 分","山線","詳細","$ 375","$ 188"],["區間2273","20:06","23:31","3 小時 25 分","山線","詳細","$ 241","$ 121"],["普悠瑪283","20:15","21:59","1 小時 44 分","山線","詳細","$ 375","$ 188"],["自強155","21:00","23:16","2 小時 16 分","山線","詳細","$ 375","$ 188"]],"msg":""}
```

# Install
```
npm install
```

# Publish
```
now
```

# Local test
```
now dev
```

# How to deploy with Zeit Now
https://github.com/zeit/now/blob/canary/README.md