Skip to content

Latest commit

 

History

History
58 lines (51 loc) · 1.56 KB

README.md

File metadata and controls

58 lines (51 loc) · 1.56 KB

Puksun bussit -Twitter-botti

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
            ]
          ]
        ]
      }
    }
  ]
}
Loading

Techy stuff

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: