Botti, joka kertoo Blueskyhin @puksunbussit.bluesky.bot, jos bussit kaahaavat Pukinmäessä kuvan alueella:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": 1,
"properties": {
"ID": 0
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
24.990907,
60.247617
],
[
24.990907,
60.243575
],
[
24.994711,
60.243575
],
[
24.994711,
60.247617
],
[
24.990907,
60.247617
]
]
]
}
}
]
}
Ensure ts-node is installed: npm install -g ts-node. Then build with npm install and run with npm start for production or npm dev for development. Run tests with npm test.
Create an app password for the bot and then fill in the Bluesky secrets into the .env file for development mode or environment variables in production mode.
SQLite persistence defaults to /data/hsl-bus-observations.db on Fly.io. Override the path locally with SQLITE_DB_PATH.
Uses the Digitransit API: https://digitransit.fi/en/developers/apis/5-realtime-api/vehicle-positions/high-frequency-positioning/
Relies on the following libraries: