Botti, joka (päällä ollessaan) kertoo Twitteriin @PuksunBussit-käyttäjänä, 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
. Run tests with npm test
.
Remember to fill in the Twitter secrets into secrets.ts
.
Uses the Digitransit API: https://digitransit.fi/en/developers/apis/4-realtime-api/vehicle-positions/
Relies on the following libraries: