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

new app: Caltrain #2194

Merged
merged 7 commits into from
Jan 11, 2024
Merged

new app: Caltrain #2194

merged 7 commits into from
Jan 11, 2024

Conversation

quacksire
Copy link
Contributor

@quacksire quacksire commented Jan 9, 2024

Description

Adds a new Caltrain app to check departures of stations and features a BYOK (Bring Your Own Key) system to deal with rate limiting.

I had to make the cache TTL low enough that the time sensitive information would not be too out of date, making people late for their train.

  • Train Number colors are dependent on what type of service it is.
  • Station names are truncated to fit on screen
  • 511 Rate Limit is 60 requests per hour (one per minute), so it shouldn't be a problem
  • API key instructions are concise and easy to understand

Future things

  • Detect Rate limiting
  • Add Alerts (either to this app or others)

EDIT: By default, the API key is not provided, so here's the .gif of it working.

caltrain

Copilot

copilot:all

@quacksire quacksire requested a review from matslina as a code owner January 9, 2024 06:53
@tidbyt
Copy link

tidbyt bot commented Jan 9, 2024

⚠️ The automated review process is experimental and likely has bugs. Please bear with us as we iron out the kinks and enable you to ship changes at high velocity 🚀

Next Steps

Hello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:

  • Sign the CLA if you haven't already
  • Ensure your build is green! Any problem will display a proposed solution to try out
  • Get a review, either by Tidbyt Bot or by a Tidbyt engineer

Manual Review Required

Hang tight! A Tidbyt engineer will be by shortly to review your change. Here is what they will be looking for:

Test Details
App Dir All files are in a single app directory
🟡 Modules Usage of http.star requires review
Original Author The original author matches the PR author

Previews

apps/caltrain/caltrain.star:

@quacksire
Copy link
Contributor Author

@matslina this is ready to be merged

@matslina matslina merged commit 077e957 into tidbyt:main Jan 11, 2024
2 checks passed
@tidbyt tidbyt locked as resolved and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants