Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling LRT ETA API status #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

desmondlsl
Copy link
Contributor

@desmondlsl desmondlsl commented Oct 26, 2024

LRT ETA API has a field status. This field is currently unused on our end. This PR adds handling the isdelay field and aligns with our handling of status in MTR ETA API.

https://opendata.mtr.com.hk/doc/LR_Next_Train_DataDictionary_v1.0.pdf
status
Number
system status code
value:
"1" = normal
“0” = error or alert

Our existing handling of status in MTR ETA API:

hk-bus-eta/src/mtr.ts

Lines 24 to 26 in e2b2020

.then(({ data, status }) =>
status === 0
? []

@desmondlsl desmondlsl closed this Oct 26, 2024
@desmondlsl desmondlsl deleted the lrt-respect-status branch October 26, 2024 19:07
@desmondlsl desmondlsl restored the lrt-respect-status branch October 26, 2024 19:07
@desmondlsl desmondlsl reopened this Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant